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
Question: Is there a way to disable auto-fixing for a subset of rules #657
Comments
There's no way to do that. You will have to propose such a change over at https://github.com/eslint/eslint which is what XO uses underneath. |
The Would you disable fixers for all the banned types or just some? If some, which ones? Out of curiosity.
Almost any change can break TS types though. At least it fails loudly. |
OK
I will look into it, that looks like a solution to my problem.
A priori, all of them. I have problems with |
NB: Naively configuring
I think I need to be more specific about the files this rule covers. |
@pharmpy-dev-123 just try this: eslint-plugin-no-autofix |
eslint’s solution for this is to set the rule as a warning instead: eslint/eslint#8935 I don’t think XO can effectively do this outside ESLint unfortunately. |
I like that
@typescript-eslint/ban-types
raises errors when runningxo
.I do not like that
@typescript-eslint/ban-types
auto-fixes apply when runningxo --fix
.This is because, in my experience, auto-fixing for this rule almost always produces broken source.
Is it possible to configure
xo
so that auto-fixing for@typescript-eslint/ban-types
is disabled but rule-violating lines still raise an error?The text was updated successfully, but these errors were encountered: