Skip to content

chore: use parserOptions.projectService internally #9659

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,7 @@ export default tseslint.config(
...globals.node,
},
parserOptions: {
project: [
'tsconfig.json',
'packages/*/tsconfig.json',
/**
* We are currently in the process of transitioning to nx's out of the box structure and
* so need to manually specify converted packages' tsconfig.build.json and tsconfig.spec.json
* files here for now in addition to the tsconfig.json glob pattern.
*
* TODO(#4665): Clean this up once all packages have been transitioned.
*/
'packages/scope-manager/tsconfig.build.json',
'packages/scope-manager/tsconfig.spec.json',
],
projectService: true,
tsconfigRootDir: __dirname,
warnOnUnsupportedTypeScriptVersion: false,
},
Expand Down Expand Up @@ -458,7 +446,14 @@ export default tseslint.config(
'packages/eslint-plugin/src/rules/**/*.{ts,tsx,cts,mts}',
],
rules: {
'eslint-plugin/no-property-in-node': 'error',
'eslint-plugin/no-property-in-node': [
'error',
{
additionalNodeTypeFiles: [
'packages[\\/]types[\\/]src[\\/]generated[\\/]ast-spec.ts',
],
},
],
'eslint-plugin/require-meta-docs-description': [
'error',
{ pattern: '^(Enforce|Require|Disallow) .+[^. ]$' },
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"eslint": "^9.3.0",
"eslint-plugin-deprecation": "^2.0.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-eslint-plugin": "^5.5.0",
"eslint-plugin-eslint-plugin": "^6.2.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jsdoc": "^47.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"composite": false,
"rootDir": "."
},
"include": ["src", "typings", "tests", "tools", "index.d.ts", "rules.d.ts"],
"include": ["src", "typings", "tests", "tools", "*.d.ts"],
"references": [
{ "path": "../utils/tsconfig.build.json" },
{ "path": "../parser/tsconfig.build.json" },
Expand Down
37 changes: 7 additions & 30 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5877,7 +5877,7 @@ __metadata:
eslint: ^9.3.0
eslint-plugin-deprecation: ^2.0.0
eslint-plugin-eslint-comments: ^3.2.0
eslint-plugin-eslint-plugin: ^5.5.0
eslint-plugin-eslint-plugin: ^6.2.0
eslint-plugin-import: ^2.29.1
eslint-plugin-jest: ^27.9.0
eslint-plugin-jsdoc: ^47.0.2
Expand Down Expand Up @@ -9814,27 +9814,15 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-eslint-plugin@npm:5.5.1":
version: 5.5.1
resolution: "eslint-plugin-eslint-plugin@npm:5.5.1"
dependencies:
eslint-utils: ^3.0.0
estraverse: ^5.3.0
peerDependencies:
eslint: ">=7.0.0"
checksum: 0f0fcab3ba73d57f07d69852287563e4f7d00382f4e722011a99f58117d3f20b8fcb9dd1edc2f32ef539749b8372a2492087219f27c8a8c00e77e328b2ce8fb6
languageName: node
linkType: hard

"eslint-plugin-eslint-plugin@patch:eslint-plugin-eslint-plugin@npm%3A5.5.1#./.yarn/patches/eslint-plugin-eslint-plugin-npm-5.5.1-4206c2506d.patch::locator=%40typescript-eslint%2Ftypescript-eslint%40workspace%3A.":
version: 5.5.1
resolution: "eslint-plugin-eslint-plugin@patch:eslint-plugin-eslint-plugin@npm%3A5.5.1#./.yarn/patches/eslint-plugin-eslint-plugin-npm-5.5.1-4206c2506d.patch::version=5.5.1&hash=0c6729&locator=%40typescript-eslint%2Ftypescript-eslint%40workspace%3A."
"eslint-plugin-eslint-plugin@npm:^6.2.0":
version: 6.2.0
resolution: "eslint-plugin-eslint-plugin@npm:6.2.0"
dependencies:
eslint-utils: ^3.0.0
"@eslint-community/eslint-utils": ^4.4.0
estraverse: ^5.3.0
peerDependencies:
eslint: ">=7.0.0"
checksum: d46fb241fbcff5c7a9ec44c6f19930ad7bd2394c0cadb75a97bb151c86fc506da9dfbbcf34ec41151abf2024151945a0dd6ba9b031a3d75e87e58e7f267bf488
eslint: ">=8.23.0"
checksum: 1102e02bf0d837321b56dc297b457957679262a3d8c06738c2f5503ac0aa993ac4bd9908d965b15527e50880f21fa789ee9b5c13526f01c99a8e1eeed0b6055d
languageName: node
linkType: hard

Expand Down Expand Up @@ -10020,17 +10008,6 @@ __metadata:
languageName: node
linkType: hard

"eslint-utils@npm:^3.0.0":
version: 3.0.0
resolution: "eslint-utils@npm:3.0.0"
dependencies:
eslint-visitor-keys: ^2.0.0
peerDependencies:
eslint: ">=5"
checksum: 0668fe02f5adab2e5a367eee5089f4c39033af20499df88fe4e6aba2015c20720404d8c3d6349b6f716b08fdf91b9da4e5d5481f265049278099c4c836ccb619
languageName: node
linkType: hard

"eslint-visitor-keys@npm:^3.4.1":
version: 3.4.3
resolution: "eslint-visitor-keys@npm:3.4.3"
Expand Down
Loading