Skip to content

Conversation

@brettz9
Copy link
Collaborator

@brettz9 brettz9 commented May 11, 2020

Allows disabling duplicate fixing.

Copy link
Collaborator

@chiawendt chiawendt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am more inclined to change to rule to never fix this case, without an option. There are other rules in the ecosystem similar to this case: no-dupe-keys, no-duplicate-case, and imoprt/no-duplicate. They do not provides fixes. The general idea is that "if the fix could break peoples' code, don't fix".

@brettz9
Copy link
Collaborator Author

brettz9 commented May 11, 2020

I am more inclined to change to rule to never fix this case, without an option. There are other rules in the ecosystem similar to this case: no-dupe-keys, no-duplicate-case, and imoprt/no-duplicate. They do not provides fixes. The general idea is that "if the fix could break peoples' code, don't fix".

People can review fixes before committing them (and really should), so it can still save them time even if the user wishes to opt in to enable a potentially over-aggressive fixer. And in our case, in the vast majority of cases, at worst it should only strip out a useful comment. Also, these fixers have been in place for some time without complaint--I'm only now giving the opportunity to disable them. I'm ok with a breaking change to change the default though if you want to err on the side of caution.

@chiawendt
Copy link
Collaborator

That would be great, thanks. And it should be a minor release. https://github.com/eslint/eslint#semantic-versioning-policy

@brettz9
Copy link
Collaborator Author

brettz9 commented May 11, 2020

Sure, though it breaks in the sense of no longer working quite as before, it at least won't lead to more broken builds.

@brettz9
Copy link
Collaborator Author

brettz9 commented May 12, 2020

I've switched to the new default (of enableFixer: false).

@brettz9 brettz9 force-pushed the param-names-enableFixer branch from 251f351 to 0ccbe17 Compare May 12, 2020 06:19
@brettz9 brettz9 force-pushed the param-names-enableFixer branch from 0ccbe17 to 3b2e250 Compare May 12, 2020 14:44
@brettz9
Copy link
Collaborator Author

brettz9 commented May 12, 2020

@golopot : It'd be great if you could find time to take a look to see that my latest changes are ok and if this is ready for merging (I've rebased, but the changes were made in the final commit of this PR). I intend to look at fixing #532 tomorrow.)

Copy link
Collaborator

@chiawendt chiawendt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@brettz9 brettz9 merged commit 9901cd3 into gajus:master May 12, 2020
@brettz9 brettz9 deleted the param-names-enableFixer branch May 12, 2020 21:14
@gajus
Copy link
Owner

gajus commented May 12, 2020

🎉 This PR is included in version 25.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants