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
overrides
with processor works unexpectedly
#14207
Comments
I can confirm this behavior. When Lines 1311 to 1326 in ebd7026
I believe we assumed that if a processor used for I'm not sure what's the intended behavior in this case. For users, it might make more sense to see this as the original file and thus make a configuration for |
That's not true for markdown/mdx in markdown/mdx. |
I think we should change the following Lines 1311 to 1319 in ebd7026
to // Resolve configuration again if the file content or extension was changed.
if (configForRecursive && (text !== blockText || path.extname(blockName) !== originalExtname)) {
debug('Resolving configuration again because the file content or extension was changed.')
return this._verifyWithConfigArray(blockText, configForRecursive, {
...options,
filename: blockName,
})
} @mdjermanovic I'd like to raise a PR if you like it. |
@eslint/eslint-tsc thoughts about this, is it a bug or the intended behavior? If it's a bug, does the fix in #14227 makes sense, and would it be a breaking change now? |
I think this is a bug. We probably did this for performance reasons, since calculating configs is expensive. I’m also guessing this use case is fairly uncommon so fixing this bug doesn’t seem like a breaking change to me. |
I agree this is a bug that we can fix in a semver-minor change. |
Marking as accepted. There is already a PR open. |
Tell us about your environment
What parser (default,
@babel/eslint-parser
,@typescript-eslint/parser
, etc.) are you using?Default
Please show your full configuration:
https://github.com/JounQin/test/blob/eslint/.eslintrc.js
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
https://github.com/JounQin/test/blob/eslint/test.cjs
What did you expect to happen?
No error because prettier is intended to be disabled
What actually happened? Please copy-paste the actual, raw output from ESLint.
Steps to reproduce this issue:
yarn eslint test.cjs
, there will be an error.eslintrc.js
and runyarn eslint test.cjs
again, there will be no error, but it is not expected, I want to checktest.cjs
withprettier
but disable it on code blockAre you willing to submit a pull request to fix this bug?
I don't know how to fix it easily.
The text was updated successfully, but these errors were encountered: