-
Notifications
You must be signed in to change notification settings - Fork 342
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
Feature request: Provide a way to control files fixed during onCodeActionsSave (e.g., ignorePatterns) #1814
Comments
I might be running into this too. |
@bashmish Can you please provide me with a GitHub repository I can clone with a minimal repro setup to demo what you are seeing. |
@dbaeumer here it is https://github.com/bashmish/bug-eslint-fixall-ignore
on the screenshot you can see the file inside basically shall I open a separate issue for this? in this repo or in the eslint core? |
@bashmish you are using the new flat config which doesn't honor |
@dbaeumer the problem with the latter is that it gets overridden by one of my other configs. I can't easily repro it as I have a closed-sourced company wide config and already spent an hour trying to find out which part of it overrides mine... I tried putting This is how I ended up here, hoping that some other way to exclude certain file pattern globally can override whatever I have in my eslint config. With CLI I can just do |
Would like to see a way to be able to control which files are fixed during onCodeActionsSave. Currently, the only method to differentiate what is done on lint vs fix is
eslint.onCodeActionsSave.rules
which can be cumbersome to manage, especially with complicated configurations.Potential Approaches:
eslint.onCodeActionsSave.ignorePatterns
which could be passed to eslint directlyeslint.onCodeActionsSave.ignorePath
which could be passed to eslint directly and would allow a different ignore file to be used during fixUse Case: When linting certain file types (e.g.,
*.{md,mdx}
), fixing a file could conflict with prettier formatting (e.g., remark stringifies the result resulting in characters being escaped while prettier removes the unnecessary escapes). For this reason, we ignore these files during fixing from cli but there is no way to replicate this behavior (at least not that I can see from the available options) when using the extension.Thank you for your consideration!
The text was updated successfully, but these errors were encountered: