Bug: reportUnusedDisableDirectives
with value warn
is not respected by the cli
#16002
Closed
1 task done
Labels
archived due to age
This issue has been archived; please open a new issue for any further discussion
works as intended
The behavior described in this issue is working correctly
Projects
Environment
Node version: v16.15.1
npm version: v8.11.0
Local ESLint version: v8.17.0 (Currently used)
Global ESLint version: Not found
Operating System: linux 5.18.1-arch1-1
What parser are you using?
@typescript-eslint/parser
What did you do?
Configuration
What did you expect to happen?
When linting using the cli, it always complains that
reportUnusedDisableDirectives
should be a boolean rather than 'warn', but the newest version of eslint already supports using'warn'
as an option toreportUnusedDisableDirectives
.What actually happened?
I get an error:
Participation
Additional comments
This bug was kinda weird because it doesn't occur when I use
prettier-eslint
to format the files, only when I use eslint cli does it occur. They both use the new ESLint class, but somewhere in the code, the cli is still using the old format for the configs...I tried tracing the problem, and I think it may have to do with the use of the legacy
eslintrc
module:eslint/lib/cli-engine/file-enumerator.js
Lines 44 to 49 in b04bc6f
And here is where the config is validated...again
https://github.com/eslint/eslintrc/blob/a57d60877c12601a7f012710a0be2bda8088a947/lib/shared/config-validator.js#L268-L273
And this is the offending config:
https://github.com/eslint/eslintrc/blob/a57d60877c12601a7f012710a0be2bda8088a947/conf/config-schema.js#L23
The text was updated successfully, but these errors were encountered: