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): [restrict-plus-operands] change checkCompoundAssignments to skipCompoundAssignments #7027

Conversation

JoshuaKGoldberg
Copy link
Member

BREAKING CHANGE:
Renames an option for restrict-plus-operands

PR Checklist

Overview

Renames the option, so that the default state of off means we lint +=s.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @JoshuaKGoldberg!

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 May 13, 2023

Deploy Preview for typescript-eslint failed.

Name Link
🔨 Latest commit 340775d
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/6483d7fdfbf28e00075f311c

@nx-cloud
Copy link

nx-cloud bot commented May 13, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 340775d. 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


🟥 Failed Commands
Node 14 - nx test eslint-plugin --coverage=false
✅ Successfully ran 56 targets

Sent with 💌 from NxCloud.

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review May 13, 2023 01:46
@codecov
Copy link

codecov bot commented Jun 10, 2023

Codecov Report

Merging #7027 (340775d) into v6 (fb66d33) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##               v6    #7027      +/-   ##
==========================================
- Coverage   87.70%   87.69%   -0.01%     
==========================================
  Files         372      372              
  Lines       12813    12813              
  Branches     3795     3795              
==========================================
- Hits        11238    11237       -1     
  Misses       1199     1199              
- Partials      376      377       +1     
Flag Coverage Δ
unittest 87.69% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
.../eslint-plugin/src/rules/restrict-plus-operands.ts 86.53% <100.00%> (-1.93%) ⬇️

@JoshuaKGoldberg JoshuaKGoldberg added this to the 6.0.0 milestone Jun 13, 2023
allowAny?: boolean;
skipCompoundAssignments?: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

I don't know if renaming it is overall super high value given the disruptive nature of the change. We do have precedence for "truthy-by-default" options like the options in strict-boolean-expressions.

I'll leave it up to you.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm yeah I see what you mean... I think the fact that we're turning on the behavior by default in the new config makes me feel better about it. Also not that many folks enable the option: https://sourcegraph.com/search?q=context:global+checkCompoundAssignments+lang:js+-file:node_modules&patternType=standard&sm=0&groupBy=path (current result count: 58).

@JoshuaKGoldberg JoshuaKGoldberg merged commit dc801d8 into typescript-eslint:v6 Jun 15, 2023
41 of 46 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the restrict-plus-operands-compound-assignments-default branch June 15, 2023 16:28
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants