ESLint autofix ignore rule

Viewed 3850

I'm using ESLint in vscode with option "eslint.autoFixOnSave": true.

Basically, I want:

  1. Ignore 1 particular rule for fixing: prefer-const
  2. See all the warnings and errors highlighted in editor (including prefer-const)
1 Answers

There seems to be a new plugin: eslint-plugin-no-autofix

{
  "plugins": ["no-autofix"],
  "rules": {
    "prefer-const": "off",
    "no-autofix/prefer-const": "warn",
  }
}
Related