Skip to content

Commit 0e5aac6

Browse files
Fix ESLint 9 linting in VSCode (#2417)
## Motivation for the change, related issues Upgrading to ESLint 9 broke real-time linter feedback in VSCode because ESLint 9 defaults to a new "flat config" format which we are not using. Fixes #2416 ## Implementation details This PR restores real-time ESLint feedback by adjusting VSCode workspace settings to use the legacy config format. This PR also adds an explicit "useFlagConfig: false" setting to Nx lint targets. Hopefully, this will prevent NX-based linting breakage when we upgrade to new major Nx version. ## Testing Instructions (or ideally a Blueprint) - CI - Open a `.ts` file in VSCode, add a `console.log()` statement, and observe the the console statement is included in the Problems tab. Co-authored-by: Adam Zieliński <[email protected]>
1 parent 38e889d commit 0e5aac6

File tree

27 files changed

+27
-0
lines changed

27 files changed

+27
-0
lines changed

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"eslint.validate": [
44
"json"
55
],
6+
"eslint.useFlatConfig": false,
67
"files.associations": {
78
"*.embeddedhtml": "html",
89
"api-extractor-base.json": "jsonc",

packages/docs/site/project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
"executor": "@nx/linter:eslint",
8484
"outputs": ["{options.outputFile}"],
8585
"options": {
86+
"useFlatConfig": false,
8687
"lintFilePatterns": ["packages/docs/site/**/*.ts"],
8788
"maxWarnings": 0
8889
}

packages/nx-extensions/project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"executor": "@nx/linter:eslint",
4242
"outputs": ["{options.outputFile}"],
4343
"options": {
44+
"useFlatConfig": false,
4445
"lintFilePatterns": [
4546
"packages/nx-extensions/**/*.ts",
4647
"packages/nx-extensions/generators.json",

packages/php-wasm/cli/project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
"executor": "@nx/linter:eslint",
100100
"outputs": ["{options.outputFile}"],
101101
"options": {
102+
"useFlatConfig": false,
102103
"lintFilePatterns": ["packages/php-wasm/cli/**/*.ts"],
103104
"maxWarnings": 0
104105
}

packages/php-wasm/fs-journal/project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"executor": "@nx/linter:eslint",
6363
"outputs": ["{options.outputFile}"],
6464
"options": {
65+
"useFlatConfig": false,
6566
"lintFilePatterns": ["packages/php-wasm/fs-journal/**/*.ts"],
6667
"maxWarnings": 0
6768
}

packages/php-wasm/logger/project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"executor": "@nx/linter:eslint",
6161
"outputs": ["{options.outputFile}"],
6262
"options": {
63+
"useFlatConfig": false,
6364
"lintFilePatterns": ["packages/php-wasm/logger/**/*.ts"],
6465
"maxWarnings": 0
6566
}

packages/php-wasm/node-polyfills/project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"executor": "@nx/linter:eslint",
6767
"outputs": ["{options.outputFile}"],
6868
"options": {
69+
"useFlatConfig": false,
6970
"lintFilePatterns": [
7071
"packages/php-wasm/node-polyfills/**/*.ts",
7172
"packages/php-wasm/node-polyfills/package.json"

packages/php-wasm/node/project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@
314314
"executor": "@nx/linter:eslint",
315315
"outputs": ["{options.outputFile}"],
316316
"options": {
317+
"useFlatConfig": false,
317318
"lintFilePatterns": ["packages/php-wasm/node/**/*.ts"],
318319
"maxWarnings": 0
319320
}

packages/php-wasm/progress/project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"executor": "@nx/linter:eslint",
5757
"outputs": ["{options.outputFile}"],
5858
"options": {
59+
"useFlatConfig": false,
5960
"lintFilePatterns": ["packages/php-wasm/progress/**/*.ts"],
6061
"maxWarnings": 0
6162
}

packages/php-wasm/scopes/project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"executor": "@nx/linter:eslint",
4141
"outputs": ["{options.outputFile}"],
4242
"options": {
43+
"useFlatConfig": false,
4344
"lintFilePatterns": ["packages/php-wasm/scopes/**/*.ts"],
4445
"maxWarnings": 0
4546
}

0 commit comments

Comments
 (0)