Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@undsoft
Copy link
Contributor

@undsoft undsoft commented Oct 27, 2025

PR Checklist

Overview

no-duplicate-enum-values will now support:

  • signed numbers, such as: -1, -0, +1
  • and unary expressions with strings, e.g. -"1"

I decided not to do anything for NaN, because I don't want to open this 🥫🪱.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @undsoft!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

@netlify
Copy link

netlify bot commented Oct 27, 2025

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 874e889
🔍 Latest deploy log https://app.netlify.com/projects/typescript-eslint/deploys/68ffb4141d760400088538c0
😎 Deploy Preview https://deploy-preview-11723--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 97
Accessibility: 97
Best Practices: 100
SEO: 92
PWA: 80
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@undsoft undsoft changed the title Signed enum numbers fix(eslint-plugin): [no-duplicate-enum-values] support signed numbers (#11722) Oct 27, 2025
@nx-cloud
Copy link

nx-cloud bot commented Oct 27, 2025

🤖 Nx Cloud AI Fix Eligible

An automatically generated fix could have helped fix failing tasks for this run, but Self-healing CI is disabled for this workspace. Visit workspace settings to enable it and get automatic fixes in future runs.

To disable these notifications, a workspace admin can disable them in workspace settings.


View your CI Pipeline Execution ↗ for commit 874e889

Command Status Duration Result
nx run integration-tests:test ❌ Failed 53s View ↗
nx test eslint-plugin --coverage=false ✅ Succeeded 4m 47s View ↗
nx run-many -t lint ✅ Succeeded 3m 11s View ↗
nx run-many -t typecheck ✅ Succeeded 2m 11s View ↗
nx test eslint-plugin-internal --coverage=false ✅ Succeeded 4s View ↗
nx test typescript-estree --coverage=false ✅ Succeeded 1s View ↗
nx run types:build ✅ Succeeded 5s View ↗
nx run generate-configs ✅ Succeeded 7s View ↗
Additional runs (29) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-10-27 18:17:26 UTC

@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.66%. Comparing base (55ca033) to head (874e889).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #11723   +/-   ##
=======================================
  Coverage   90.66%   90.66%           
=======================================
  Files         518      518           
  Lines       52415    52438   +23     
  Branches     8678     8684    +6     
=======================================
+ Hits        47521    47544   +23     
  Misses       4880     4880           
  Partials       14       14           
Flag Coverage Δ
unittest 90.66% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...slint-plugin/src/rules/no-duplicate-enum-values.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Great! Confirmed that Object.is is actually needed for the case of 0 vs. -0. You gotta love floating point numbers... 👌 thanks!

@JoshuaKGoldberg JoshuaKGoldberg merged commit 26a9f94 into typescript-eslint:main Nov 3, 2025
68 of 69 checks passed
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Nov 8, 2025
| datasource | package                          | from   | to     |
| ---------- | -------------------------------- | ------ | ------ |
| npm        | @typescript-eslint/eslint-plugin | 8.46.1 | 8.46.3 |
| npm        | @typescript-eslint/parser        | 8.46.1 | 8.46.3 |


## [v8.46.3](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8463-2025-11-03)

##### 🩹 Fixes

- **eslint-plugin:** \[no-duplicate-enum-values] support signed numbers ([#11722](typescript-eslint/typescript-eslint#11722), [#11723](typescript-eslint/typescript-eslint#11723))
- **eslint-plugin:** \[no-misused-promises] expand union type to retrieve target property ([#11706](typescript-eslint/typescript-eslint#11706))

##### ❤️ Thank You

- Evgeny Stepanovych [@undsoft](https://github.com/undsoft)
- tao

You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website.


## [v8.46.2](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8462-2025-10-20)

##### 🩹 Fixes

- **eslint-plugin:** \[prefer-optional-chain] skip optional chaining when it could change the result ([#11702](typescript-eslint/typescript-eslint#11702))

##### ❤️ Thank You

- mdm317

You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website.
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Nov 9, 2025
| datasource | package                          | from   | to     |
| ---------- | -------------------------------- | ------ | ------ |
| npm        | @typescript-eslint/eslint-plugin | 8.46.1 | 8.46.3 |
| npm        | @typescript-eslint/parser        | 8.46.1 | 8.46.3 |


## [v8.46.3](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8463-2025-11-03)

##### 🩹 Fixes

- **eslint-plugin:** \[no-duplicate-enum-values] support signed numbers ([#11722](typescript-eslint/typescript-eslint#11722), [#11723](typescript-eslint/typescript-eslint#11723))
- **eslint-plugin:** \[no-misused-promises] expand union type to retrieve target property ([#11706](typescript-eslint/typescript-eslint#11706))

##### ❤️ Thank You

- Evgeny Stepanovych [@undsoft](https://github.com/undsoft)
- tao

You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website.


## [v8.46.2](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8462-2025-10-20)

##### 🩹 Fixes

- **eslint-plugin:** \[prefer-optional-chain] skip optional chaining when it could change the result ([#11702](typescript-eslint/typescript-eslint#11702))

##### ❤️ Thank You

- mdm317

You can read about our [versioning strategy](https://typescript-eslint.io/users/versioning) and [releases](https://typescript-eslint.io/users/releases) on our website.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: [no-duplicate-enum-values] doesn't handle explicitly signed numbers

2 participants