sindresorhus/eslint-plugin-unicorn
Do you want to work on this issue?
You can request for a bounty in order to promote it!
Add `{fix: false}` option to all rules #1770
fisker posted onGitHub
Many of our rules are not 100% safe to fix code, we can add option to disable fix for every rule.
To disable fix for one rule
{
rules: {
'unicorn/better-regex': ['error, {fix: false}]
}
}
To disable fix for all rules use settings
:
{
settings: {
unicorn: {
fix: false,
}
}
}
It's not hard to implement because our rule all load by this function https://github.com/sindresorhus/eslint-plugin-unicorn/blob/c501243e7f9fb012b09a69ffc4ab66fb3376bb7d/rules/utils/rule.js#L115