Definition for rule was not found
See original GitHub issueHello !
I’m trying to use eslint-config-airbnb-typescript
in my project but WebStorm throw this errors:
ESLint: Definition for rule '@typescript-eslint/comma-dangle' was not found.(@typescript-eslint/comma-dangle)
ESLint: Definition for rule '@typescript-eslint/no-loop-func' was not found.(@typescript-eslint/no-loop-func)
ESLint: Definition for rule '@typescript-eslint/no-redeclare' was not found.(@typescript-eslint/no-redeclare)
ESLint: Definition for rule '@typescript-eslint/no-shadow' was not found.(@typescript-eslint/no-shadow)
.eslintrc.js:
module.exports = {
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
extends: [
'airbnb-typescript/base',
],
parserOptions: {
project: './tsconfig.eslint.json',
},
};
tsconfig.eslint.json:
{
"extends": "./tsconfig.json",
"include": ["./src", ".eslintrc.js"]
}
Dev dependencies from package.json:
{
"@types/node": "^14.0.13",
"@typescript-eslint/eslint-plugin": "^2.29.0",
"@typescript-eslint/eslint-plugin-tslint": "^4.9.0",
"@typescript-eslint/parser": "^2.34.0",
"concurrently": "^5.3.0",
"eslint": "^7.15.0",
"eslint-config-airbnb-typescript": "^12.0.0",
"eslint-plugin-import": "^2.22.1",
"nodemon": "^2.0.6",
"typescript": "^4.1.2"
}
All this rules seems to be present from the lib/shared.js
file.
Did I missed something ?
Issue Analytics
- State:
- Created 3 years ago
- Comments:10
Top Results From Across the Web
eslint why does my plugin show Definition for rule was not ...
It means eslint cannot find rules in your index.js . Try having a look at your index ...
Read more >Definition for rule typescript-eslint no-shadow was not found
I am working on migrating from tslint to eslint. The basic migration seems ... Definition for rule typescript-eslint no-shadow was not found.
Read more >How To Write a Custom ESLint Rule | by Carrie Reid-Knox
If it identifies that a node is in violation of a defined rule, ... see that the linter rule did not fire, and...
Read more >Working with Rules - ESLint - Pluggable JavaScript Linter
"suggestion" means the rule is identifying something that could be done in a better way but no errors will occur if the code...
Read more >Code Quality eslint jest plugin reports rule definitions not found
Summary When specifying eslint-plugin-jest rules in .eslintrc.json, code_quality job reports definition not found for most rules, e.g..
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
"@typescript-eslint/eslint-plugin": "^2.29.0",
<-- this is too old for those rules. For example,@typescript-eslint/comma-dangle
was added in 4.2.0.I would use the same version for both
@typescript-eslint
dependencies:@pellelauritsen I am on node v16.6.1 and just like @stefanpl I am getting hundreds of errors when running ESLint via the terminal. By that, I mean when I’m running
yarn start
in a CRA-enabled app:Running ESLint in standalone fashion works fine. Did anyone find a solution to this issue?
Update: downgrading to v18 the
eslint-config-airbnb
package made the error go away. There must a breaking change that causes this error.2nd Update: it looks like this is a known issue, though no solution proposed in that thread worked for me.