-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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): [prefer-nullish-coalescing] logic and test for strict null checks #6174
feat(eslint-plugin): [prefer-nullish-coalescing] logic and test for strict null checks #6174
Conversation
Thanks for the PR, @cparros! 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. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6174 +/- ##
=======================================
Coverage 91.26% 91.27%
=======================================
Files 366 366
Lines 12427 12433 +6
Branches 3639 3641 +2
=======================================
+ Hits 11342 11348 +6
Misses 774 774
Partials 311 311
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯 perfect, thanks!
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint) | devDependencies | minor | [`5.44.0` -> `5.46.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/5.44.0/5.46.0) | | [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint) | devDependencies | minor | [`5.44.0` -> `5.46.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/5.44.0/5.46.0) | --- ### Release Notes <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/eslint-plugin)</summary> ### [`v5.46.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#​5460-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5451v5460-2022-12-08) [Compare Source](typescript-eslint/typescript-eslint@v5.45.1...v5.46.0) ##### Bug Fixes - **eslint-plugin:** \[ban-types] update message to suggest `object` instead of `Record<string, unknown>` ([#​6079](typescript-eslint/typescript-eslint#6079)) ([d91a5fc](typescript-eslint/typescript-eslint@d91a5fc)) ##### Features - **eslint-plugin:** \[prefer-nullish-coalescing] logic and test for strict null checks ([#​6174](typescript-eslint/typescript-eslint#6174)) ([8a91cbd](typescript-eslint/typescript-eslint@8a91cbd)) #### [5.45.1](typescript-eslint/typescript-eslint@v5.45.0...v5.45.1) (2022-12-05) ##### Bug Fixes - **eslint-plugin:** \[keyword-spacing] unexpected space before/after in `import type` ([#​6095](typescript-eslint/typescript-eslint#6095)) ([98caa92](typescript-eslint/typescript-eslint@98caa92)) - **eslint-plugin:** \[no-shadow] add call and method signatures to `ignoreFunctionTypeParameterNameValueShadow` ([#​6129](typescript-eslint/typescript-eslint#6129)) ([9d58b6b](typescript-eslint/typescript-eslint@9d58b6b)) - **eslint-plugin:** \[prefer-optional-chain] collect MetaProperty type ([#​6083](typescript-eslint/typescript-eslint#6083)) ([d7114d3](typescript-eslint/typescript-eslint@d7114d3)) - **eslint-plugin:** \[sort-type-constituents, sort-type-union-intersection-members] handle some required parentheses cases in the fixer ([#​6118](typescript-eslint/typescript-eslint#6118)) ([5d49d5d](typescript-eslint/typescript-eslint@5d49d5d)) ### [`v5.45.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#​5451-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5450v5451-2022-12-05) [Compare Source](typescript-eslint/typescript-eslint@v5.45.0...v5.45.1) ##### Bug Fixes - **eslint-plugin:** \[keyword-spacing] unexpected space before/after in `import type` ([#​6095](typescript-eslint/typescript-eslint#6095)) ([98caa92](typescript-eslint/typescript-eslint@98caa92)) - **eslint-plugin:** \[no-shadow] add call and method signatures to `ignoreFunctionTypeParameterNameValueShadow` ([#​6129](typescript-eslint/typescript-eslint#6129)) ([9d58b6b](typescript-eslint/typescript-eslint@9d58b6b)) - **eslint-plugin:** \[prefer-optional-chain] collect MetaProperty type ([#​6083](typescript-eslint/typescript-eslint#6083)) ([d7114d3](typescript-eslint/typescript-eslint@d7114d3)) - **eslint-plugin:** \[sort-type-constituents, sort-type-union-intersection-members] handle some required parentheses cases in the fixer ([#​6118](typescript-eslint/typescript-eslint#6118)) ([5d49d5d](typescript-eslint/typescript-eslint@5d49d5d)) ### [`v5.45.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#​5450-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5440v5450-2022-11-28) [Compare Source](typescript-eslint/typescript-eslint@v5.44.0...v5.45.0) ##### Bug Fixes - **eslint-plugin:** \[array-type] --fix flag removes parentheses from type ([#​5997](typescript-eslint/typescript-eslint#5997)) ([42b33af](typescript-eslint/typescript-eslint@42b33af)) - **eslint-plugin:** \[keyword-spacing] prevent crash on no options ([#​6073](typescript-eslint/typescript-eslint#6073)) ([1f19998](typescript-eslint/typescript-eslint@1f19998)) - **eslint-plugin:** \[member-ordering] support private fields ([#​5859](typescript-eslint/typescript-eslint#5859)) ([f02761a](typescript-eslint/typescript-eslint@f02761a)) - **eslint-plugin:** \[prefer-readonly] report if a member's property is reassigned ([#​6043](typescript-eslint/typescript-eslint#6043)) ([6e079eb](typescript-eslint/typescript-eslint@6e079eb)) ##### Features - **eslint-plugin:** \[member-ordering] add a required option for required vs. optional member ordering ([#​5965](typescript-eslint/typescript-eslint#5965)) ([2abadc6](typescript-eslint/typescript-eslint@2abadc6)) </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/parser)</summary> ### [`v5.46.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#​5460-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5451v5460-2022-12-08) [Compare Source](typescript-eslint/typescript-eslint@v5.45.1...v5.46.0) **Note:** Version bump only for package [@​typescript-eslint/parser](https://github.com/typescript-eslint/parser) #### [5.45.1](typescript-eslint/typescript-eslint@v5.45.0...v5.45.1) (2022-12-05) ##### Bug Fixes - **parser:** remove the jsx option requirement for automatic jsx pragma resolution ([#​6134](typescript-eslint/typescript-eslint#6134)) ([e777f5e](typescript-eslint/typescript-eslint@e777f5e)) ### [`v5.45.1`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#​5451-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5450v5451-2022-12-05) [Compare Source](typescript-eslint/typescript-eslint@v5.45.0...v5.45.1) ##### Bug Fixes - **parser:** remove the jsx option requirement for automatic jsx pragma resolution ([#​6134](typescript-eslint/typescript-eslint#6134)) ([e777f5e](typescript-eslint/typescript-eslint@e777f5e)) ### [`v5.45.0`](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#​5450-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5440v5450-2022-11-28) [Compare Source](typescript-eslint/typescript-eslint@v5.44.0...v5.45.0) **Note:** Version bump only for package [@​typescript-eslint/parser](https://github.com/typescript-eslint/parser) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - 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, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC40Mi4wIiwidXBkYXRlZEluVmVyIjoiMzQuNTEuMCJ9--> Co-authored-by: cabr2-bot <cabr2.help@gmail.com> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1666 Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org> Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org> Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
PR Checklist
strictNullChecks: false
. #5748Overview
Added strict-null-check and test for prefer-nullish-coalescing rule.