Reputation: 1
The ESlint, running from the root of the folder does not ignore files and folders that I've mentioned in .eslintignore file:
.eslintignore
.git
.vscode
node_modules
dist
typedoc
__tests__/coverage
.eslintrc.cjs
module.exports = {
root: true,
env: {
node: true,
es2020: true
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended'
],
parser: '@typescript-eslint/parser',
rules: {
'@typescript-eslint/no-var-requires': ["off"],
"@typescript-eslint/no-explicit-any": ["off"],
'array-bracket-spacing': ['error', 'never'],
'@typescript-eslint/consistent-type-imports': ['error', {
'prefer': 'type-imports'
}]
// new rules goes here
}
}
I run
eslint . -c .eslintrc.cjs --ext js,jsx,ts,tsx --max-warnings 0
Output
typedocs/assets/main.js:2:2271
✖ 2:2271 Unexpected aliasing of this to local variable. @typescript-eslint/no-this-alias
✖ 2:2288 Unexpected aliasing of this to local variable. @typescript-eslint/no-this-alias
✖ 2:3495 Unnecessary escape character: \-. no-useless-escape
✖ 3:4165 E is already defined. no-redeclare
✖ 3:4312 E is already defined. no-redeclare
✖ 3:4361 E is already defined. no-redeclare
...
✖ 5:2943 document is not defined. no-undef
✖ 5:3096 document is not defined. no-undef
✖ 5:3179 window is not defined. no-undef
typedocs/assets/navigation.js:1:1
✖ 1:1 window is not defined. no-undef
typedocs/assets/search.js:1:1
✖ 1:1 window is not defined. no-undef
102 errors
I TRIED
typedoc/**
does not workEXPECTED BEHAVIOUR
I want ESlint to ignore folders and files I've mentioned. I dont want to delete these folders each time I call eslint script...
Any help and piece of advice are welcome!
Upvotes: 0
Views: 220