eslint-plugin-disable-autofix

4.3.0 • Public • Published

eslint-plugin-disable-autofix

Disable autofix for ESLint rules and prevent them from being formatted without having to turn them off

Usage

Install

npm i -D eslint-plugin-disable-autofix

Configure

Include disable-autofix in the eslintrc plugins array

Add prefix disable-autofix/ to the rule and disable the original

module.exports = {
  plugins: ['disable-autofix'],
  rules: {
    'prefer-const': 'off',
    'disable-autofix/prefer-const': 'warn',
  },
};

Use 3rd-party rules

module.exports = {
  plugins: ['disable-autofix', 'react'],
  rules: {
    'react/jsx-indent': 'off',
    'disable-autofix/react/jsx-indent': 'error',
  },
};

Use scoped rules

module.exports = {
  plugins: ['disable-autofix', '@html-eslint'],
  rules: {
    '@html-eslint/require-closing-tags': 'off',
    'disable-autofix/@html-eslint/require-closing-tags': [
      'error',
      { selfClosing: 'always' },
    ],
  },
};

Package Sidebar

Install

npm i eslint-plugin-disable-autofix

Weekly Downloads

31,005

Version

4.3.0

License

MIT

Unpacked Size

5.95 kB

Total Files

4

Last publish

Collaborators

  • chiefmikey