-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
On Windows eslint overrides with tslint rules do not match depending on existence of other files #1692
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
Comments
Thanks for filing this. This looks like a bug in ESLint itself, as our tooling doesn't have anything to do with the eslint config resolution process. Could you please file this as a bug in the ESLint repo? Thanks! |
ok. |
hmm interesting, if it's only eslint-plugin-tslint rules, it might be a problem with our plugin. |
I did some parallel debugging and so far I've found that in {
"encoding": {
"ruleArguments": [],
"ruleSeverity": "error"
},
"completed-docs": {
"ruleArguments": [],
"ruleSeverity": "error"
}
} while in normal case it's {
"encoding": {
"ruleArguments": [],
"ruleSeverity": "error"
},
"completed-docs": {
"ruleArguments": [],
"ruleSeverity": "off"
}
} |
So it seems the call UP: yes, that should be it, checked on my case using |
Probably, the result is different on Windows just because of different traversing order |
I'd be happy to accept a PR if you've got a fix for it. |
What code were you trying to parse?
https://github.com/pelepelin/ts-eslint-bug
This is a stripped copy of a real project. There are only 2 files in src. And there are 2 override blocks in .eslintrc.js.
What did you expect to happen?
When running
npm run lint
, the file https://github.com/pelepelin/ts-eslint-bug/blob/master/src/__tests__/e2e/utilities/helpers/BuggyClass.ts matches second override https://github.com/pelepelin/ts-eslint-bug/blob/f534c589d55ba09945c8b72609b2f22aaab98788/.eslintrc.js#L32 which has'completed-docs': false
and so it should pass lint.What actually happened?
When running
npm run lint
on Linux, the file passes lint, but on Windows it printsWhen running
npm run lint:ref
which applies lint on another level of directories, lint passes both on Linux and Windows.If the file
src/index.ts
is removed,npm run lint
passes both on Linux and Windows.Versions
@typescript-eslint/eslint-plugin-tslint
2.22.0
@typescript-eslint/parser
2.22.0
TypeScript
3.7.4
ESLint
6.6.0
node
12.13.1
, Linux12.14.0
npm
6.12.1
, Linux6.13.7
The text was updated successfully, but these errors were encountered: