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

feat(eslint-plugin): add support for valid number and bigint intersections in restrict-plus-operands rule #4795

merged 4 commits into from Apr 8, 2022


Copy link

@leondreamed leondreamed commented Apr 8, 2022

PR Checklist


This PR extends the functionality of #2628 to also support number intersections and bigint intersections. A real-world use case for this functionality would be the new reactivityTransfrom Vue macros: vuejs/eslint-plugin-vue#1839

(also the code was mainly copied from PR #2628 and tweaked for numbers and bigints)

Copy link

nx-cloud bot commented Apr 8, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit a62927d. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch

Successfully ran 41 targets

Sent with 💌 from NxCloud.

Copy link

typescript-eslint bot commented Apr 8, 2022

Thanks for the PR, @leonzalion!

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 As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

Copy link

netlify bot commented Apr 8, 2022

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit a62927d
🔍 Latest deploy log
😎 Deploy Preview
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link

codecov bot commented Apr 8, 2022

Codecov Report

Merging #4795 (a62927d) into main (c59d9d7) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #4795   +/-   ##
  Coverage   94.28%   94.29%           
  Files         151      151           
  Lines        8208     8216    +8     
  Branches     2670     2671    +1     
+ Hits         7739     7747    +8     
  Misses        261      261           
  Partials      208      208           
Flag Coverage Δ
unittest 94.29% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...-plugin/src/rules/no-unnecessary-type-assertion.ts 94.66% <ø> (ø)
.../eslint-plugin/src/rules/method-signature-style.ts 89.15% <100.00%> (+0.26%) ⬆️
.../eslint-plugin/src/rules/restrict-plus-operands.ts 100.00% <100.00%> (ø)

Copy link

@JoshuaKGoldberg JoshuaKGoldberg left a comment

This change seems reasonable, but doesn't address an existing open issue. Could you please file one and fill out the template there that asks for more information?

We generally ask that all PRs resolve an (open) issue because it raises visibility to the community and gives folks a chance to discuss.

Copy link

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Excellent, thanks @leonzalion! 💯

@JoshuaKGoldberg JoshuaKGoldberg enabled auto-merge (squash) Apr 8, 2022
@JoshuaKGoldberg JoshuaKGoldberg merged commit 19c600a into typescript-eslint:main Apr 8, 2022
17 checks passed
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Apr 13, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
| [@typescript-eslint/eslint-plugin]( | devDependencies | minor | [`5.18.0` -> `5.19.0`]( |
| [@typescript-eslint/parser]( | devDependencies | minor | [`5.18.0` -> `5.19.0`]( |


### Release Notes

<summary>typescript-eslint/typescript-eslint (@&#8203;typescript-eslint/eslint-plugin)</summary>

### [`v5.19.0`](;5190-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5180v5190-2022-04-11)

[Compare Source](typescript-eslint/typescript-eslint@v5.18.0...v5.19.0)

##### Bug Fixes

-   **eslint-plugin:** update code to use estree range instead of ts pos/end [#&#8203;4723](typescript-eslint/typescript-eslint#4723) ([#&#8203;4790](typescript-eslint/typescript-eslint#4790)) ([a1e9fc4](typescript-eslint/typescript-eslint@a1e9fc4))

##### Features

-   **eslint-plugin:** \[unified-signatures] add `ignoreDifferentlyNamedParameters` option ([#&#8203;4659](typescript-eslint/typescript-eslint#4659)) ([fdf95e0](typescript-eslint/typescript-eslint@fdf95e0))
-   **eslint-plugin:** add support for valid number and bigint intersections in restrict-plus-operands rule ([#&#8203;4795](typescript-eslint/typescript-eslint#4795)) ([19c600a](typescript-eslint/typescript-eslint@19c600a))


<summary>typescript-eslint/typescript-eslint (@&#8203;typescript-eslint/parser)</summary>

### [`v5.19.0`](;5190-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5180v5190-2022-04-11)

[Compare Source](typescript-eslint/typescript-eslint@v5.18.0...v5.19.0)

**Note:** Version bump only for package [@&#8203;typescript-eslint/parser](



### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

 **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.


 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.


This PR has been generated by [Renovate Bot](

Co-authored-by: cabr2-bot <>
Reviewed-by: crapStone <>
Co-authored-by: Calciumdibromid Bot <>
Co-committed-by: Calciumdibromid Bot <>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
None yet
3 participants