Ask Your Question

What is the method to deactivate autofix for certain rules in eslint through CLI?

asked 2023-03-19 11:00:00 +0000

ladyg gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-12-28 17:00:00 +0000

lakamha gravatar image

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.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools


Asked: 2023-03-19 11:00:00 +0000

Seen: 7 times

Last updated: Dec 28 '22