We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposed rule prevents forgetting to enable eslint rule again after disabling it. I suggest block should be a good boundary to disable / enable rule.
Examples correct:
function f(x) { /* eslint-disable no-unused-vars */ var a; return x * 2; /* eslint-enable no-unused-vars */ } function g(x) { return (y) => { /* eslint-disable no-unused-vars */ var a; return x + y; /* eslint-enable no-unused-vars */ } }
incorrect:
function f(x) { /* eslint-disable no-unused-vars */ var a; return x * 2; } function g(x) { return (y) => { /* eslint-disable no-unused-vars */ var a; return x + y; } /* eslint-enable no-unused-vars */ }
autofix:
function f(x) { /* eslint-disable no-unused-vars */ var a; return x * 2; /* eslint-enable no-unused-vars */ } function g(x) { return (y) => { /* eslint-disable no-unused-vars */ var a; return x + y; /* eslint-enable no-unused-vars */ } /* eslint-disable no-unused-vars */ }
Object literal and array literal can also be good boundaries.
correct:
const x = { /* eslint-disable object-shorthand */ a: a, b: b, /* eslint-enable object-shorthand */ }
The text was updated successfully, but these errors were encountered:
Adding an option to disable-enable-pair might be better approach than new rule?
Sorry, something went wrong.
No branches or pull requests
Proposed rule prevents forgetting to enable eslint rule again after disabling it. I suggest block should be a good boundary to disable / enable rule.
Examples
correct:
incorrect:
autofix:
Object literal and array literal can also be good boundaries.
correct:
The text was updated successfully, but these errors were encountered: