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

fix(eslint-plugin): [strict-boolean-expressions] replace dangerous fixer with suggestions #7394

Conversation

kemilbeltre
Copy link
Contributor

Remove explicit rule check for logical negation expressions

PR Checklist

Overview

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @kemilbeltre!

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 Aug 1, 2023

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 102eefc
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/64d21f870947ca00089ba547
😎 Deploy Preview https://deploy-preview-7394--typescript-eslint.netlify.app
📱 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 configuration.

@nx-cloud
Copy link

nx-cloud bot commented Aug 1, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 102eefc. 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 37 targets

Sent with 💌 from NxCloud.

@rubiesonthesky
Copy link
Contributor

Wasn’t the plan to just remove the fixer but not the error? For me it looks like the whole error has been removed, but I could be wrong.

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.

Close! 🙌

@JoshuaKGoldberg JoshuaKGoldberg added the awaiting response Issues waiting for a reply from the OP or another party label Aug 5, 2023
@JoshuaKGoldberg JoshuaKGoldberg changed the title fix(eslint-plugin): remove explicit rule check fix(eslint-plugin): [strict-boolean-expressions] removed dangerous fixer Aug 5, 2023
@codecov
Copy link

codecov bot commented Aug 5, 2023

Codecov Report

Merging #7394 (102eefc) into main (0a1de14) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7394   +/-   ##
=======================================
  Coverage   87.41%   87.41%           
=======================================
  Files         381      381           
  Lines       13321    13321           
  Branches     3938     3938           
=======================================
  Hits        11645    11645           
  Misses       1298     1298           
  Partials      378      378           
Flag Coverage Δ
unittest 87.41% <100.00%> (ø)

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

Files Changed Coverage Δ
...int-plugin/src/rules/strict-boolean-expressions.ts 98.90% <100.00%> (ø)

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.

Getting closer! 🙌

}),
suggest: [
{
messageId: 'conditionErrorNullableObject',
Copy link
Member

Choose a reason for hiding this comment

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

[Bug] Ah, suggestion messages should generally to be different from the parent report. You'll want to add a new messageId for this case.

Filed eslint-community/eslint-plugin-eslint-plugin#368 to help automate enforcing this.

@JoshuaKGoldberg JoshuaKGoldberg changed the title fix(eslint-plugin): [strict-boolean-expressions] removed dangerous fixer fix(eslint-plugin): [strict-boolean-expressions] replace dangerous fixer with suggestions Aug 6, 2023
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.

Super, thanks @kemilbeltre! 🙌

@JoshuaKGoldberg JoshuaKGoldberg merged commit ad8401a into typescript-eslint:main Aug 10, 2023
49 of 50 checks passed
@kemilbeltre kemilbeltre deleted the fix/7312-strict-boolean-expressions branch August 10, 2023 08:46
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
awaiting response Issues waiting for a reply from the OP or another party
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: @typescript-eslint/strict-boolean-expressions breaks code on --fix
3 participants