Skip to content
New issue

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

Rule Change: overlapping "no-new-symbol" and "no-new-native-nonconstructor" #16513

Closed
1 task
danielrentz opened this issue Nov 7, 2022 · 3 comments
Closed
1 task
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules
Projects

Comments

@danielrentz
Copy link
Contributor

What rule do you want to change?

no-new-symbol, no-new-native-nonconstructor

What change to do you want to make?

Generate fewer warnings

How do you think the change should be implemented?

Other

Example code

const s = new Symbol();

What does the rule currently do for this code?

Both rules "no-new-symbol" and "no-new-native-nonconstructor" trigger.

What will the rule do after it's changed?

  • "no-new-symbol" should be deprecated.
  • "no-new-native-nonconstructor" should become recommended (as "no-new-symbol" was).

Participation

  • I am willing to submit a pull request to implement this change.

Additional comments

No response

@danielrentz danielrentz added enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules labels Nov 7, 2022
@eslint-github-bot eslint-github-bot bot added this to Needs Triage in Triage Nov 7, 2022
@snitin315
Copy link
Contributor

snitin315 commented Nov 7, 2022

Hi @danielrentz, Thanks for creating this issue. This was discussed in the PR and we decided not to deprecate the no-new-symbol as mentioned in #16368 (review)

in most cases we could deprecate a rule in a minor release, but we're unable to add no-new-native-nonconstructor to eslint:recommended until the next major release, so resolving the deprecation warning would require users to manually override eslint:recommended even if they previously had no customizations. I will, however, call out the replacement in the release notes.

@snitin315 snitin315 moved this from Needs Triage to Triaging in Triage Nov 7, 2022
@snitin315
Copy link
Contributor

I would suggest you disable the "no-new-symbol" rule in favor of the no-new-native-nonconstructor rule

@danielrentz
Copy link
Contributor Author

Thanks for the pointer, missed that

Triage automation moved this from Triaging to Complete Nov 7, 2022
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators May 7, 2023
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label May 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules
Projects
Archived in project
Triage
Complete
Development

No branches or pull requests

2 participants