@mattlewis92/eslint-plugin-disable-autofix
v3.0.0
Published
Disable ESLint autofix (--fix) for specified rules
Downloads
31
Maintainers
Readme
eslint-plugin-disable-autofix
Disable ESLint autofix (--fix) for specified rules and prevent them from being formatted without turning them off
Useful when two different rules have the same solution resulting in duplicate formatting
Usage
Install
npm i -D eslint-plugin-disable-autofix
Configure
Add prefix disable-autofix/
to the rule name in eslintrc and disable the
original
module.exports = {
plugins: ['disable-autofix'],
rules: {
'prefer-const': 'off',
'disable-autofix/prefer-const': 'error',
},
};
Use 3rd-party plugins
module.exports = {
plugins: ['disable-autofix', 'react'],
rules: {
'react/jsx-indent': 'off',
'disable-autofix/react/jsx-indent': 'error',
},
};
Use scoped plugins
module.exports = {
plugins: ['disable-autofix', '@html-eslint'],
rules: {
'@html-eslint/require-closing-tags': 'off',
'disable-autofix/@html-eslint/require-closing-tags': [
'error',
{ selfClosing: 'always' },
],
},
};