-
-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
Coming over from typescript-eslint/typescript-eslint#8226 -> typescript-eslint/typescript-eslint#9261: amusingly+ironically, the eslint-plugin/no-property-in-node rules doesn't detect any types in the https://github.com/typescript-eslint/typescript-eslint codebase. This is because typescript-eslint's types are defined at a path like:
/Users/josh/repos/typescript-eslint/packages/types/dist/generated/ast-spec.d.ts
...while the rule only checks node_modules/ style paths:
eslint-plugin-eslint-plugin/lib/rules/no-property-in-node.js
Lines 3 to 6 in 04e397b
| const typedNodeSourceFileTesters = [ | |
| /@types[/\\]estree[/\\]index\.d\.ts/, | |
| /@typescript-eslint[/\\]types[/\\]dist[/\\]generated[/\\]ast-spec\.d\.ts/, | |
| ]; |
I suppose we have two possible fixes:
- Add a third path like
/packages[/\\]types[/\\]dist[/\\]generated[/\\]ast-spec\.d\.ts/,to hardcode for typescript-eslint - Add an option to allow user configs to specify their own paths
Proposal: can we go for the latter fix, adding a rule option? I feel awkward asking to hardcode this rule for one project. 😄
aladdin-add
Metadata
Metadata
Assignees
Labels
No labels