Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ESLint v8 #29865

Merged
merged 18 commits into from Nov 16, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/create-next-app/create-app.ts
Expand Up @@ -230,7 +230,7 @@ export async function createApp({
/**
* Default devDependencies.
*/
const devDependencies = ['eslint@7', 'eslint-config-next']
const devDependencies = ['eslint', 'eslint-config-next']
/**
* TypeScript projects will have type definitions and other devDependencies.
*/
Expand Down
8 changes: 4 additions & 4 deletions packages/eslint-config-next/package.json
Expand Up @@ -10,17 +10,17 @@
},
"dependencies": {
"@next/eslint-plugin-next": "11.1.3-canary.67",
"@rushstack/eslint-patch": "^1.0.6",
"@typescript-eslint/parser": "^4.20.0",
"@rushstack/eslint-patch": "^1.0.8",
"@typescript-eslint/parser": "^5.0.0",
"eslint-import-resolver-node": "^0.3.4",
"eslint-import-resolver-typescript": "^2.4.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.23.1",
"eslint-plugin-react-hooks": "^4.2.0"
},
"peerDependencies": {
"eslint": "^7.23.0",
"eslint": "^7.23.0 || ^8.0.0-0",
ykzts marked this conversation as resolved.
Show resolved Hide resolved
"next": ">=10.2.0",
"typescript": ">=3.3.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/next/lib/eslint/runLintCheck.ts
Expand Up @@ -26,7 +26,7 @@ type Config = {
}

const requiredPackages = [
{ file: 'eslint/lib/api.js', pkg: 'eslint' },
{ file: 'eslint', pkg: 'eslint' },
{ file: 'eslint-config-next', pkg: 'eslint-config-next' },
]

Expand Down
10 changes: 8 additions & 2 deletions test/integration/telemetry/test/index.test.js
Expand Up @@ -518,7 +518,10 @@ describe('Telemetry CLI', () => {
})

it('emits telemetry for lint during build', async () => {
await fs.writeFile(path.join(appDir, '.eslintrc'), `{ "extends": "next" }`)
await fs.writeFile(
path.join(appDir, '.eslintrc'),
`{ "root": true, "extends": "next" }`
)
const { stderr } = await nextBuild(appDir, [], {
stderr: true,
env: { NEXT_TELEMETRY_DEBUG: 1 },
Expand All @@ -540,7 +543,10 @@ describe('Telemetry CLI', () => {
})

it('emits telemetry for `next lint`', async () => {
await fs.writeFile(path.join(appDir, '.eslintrc'), `{ "extends": "next" }`)
await fs.writeFile(
path.join(appDir, '.eslintrc'),
`{ "root": true, "extends": "next" }`
)
const { stderr } = await nextLint(appDir, [], {
stderr: true,
env: { NEXT_TELEMETRY_DEBUG: 1 },
Expand Down