To deactivate autofix for certain rules in eslint through CLI, add the --no-autofix
flag when running the eslint command:
eslint --no-autofix file.js
This will disable fixing of any autofixable rules in the file.js
file. If you only want to disable autofix for specific rules, you can use the --rule
flag:
eslint --rule 'no-console: off' --no-autofix file.js
This will disable autofix for the no-console
rule in the file.js
file.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-03-19 11:00:00 +0000
Seen: 7 times
Last updated: Dec 28 '22