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

4.14.0 breaks builds because of change in complexity rule (#8535) #9765

Closed
epoberezkin opened this issue Dec 24, 2017 · 2 comments
Closed

4.14.0 breaks builds because of change in complexity rule (#8535) #9765

epoberezkin opened this issue Dec 24, 2017 · 2 comments
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion question This issue asks a question about ESLint

Comments

@epoberezkin
Copy link

Tell us about your environment

  • ESLint Version:
    4.14.0
  • Node Version:
    4-9
  • npm Version:

What parser (default, Babel-ESLint, etc.) are you using?
Default

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

The failing builds are cause by the “fix” of complexity algorithm in #8535.
Should it not be based on some option until the major version change?

eslint

What did you expect to happen?
pass

What actually happened? Please include the actual, raw output from ESLint.
fail with the error from complexity rule being higher than the threshold.

@eslint-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Dec 24, 2017
@platinumazure
Copy link
Member

Hi @epoberezkin, thanks for the issue.

Being a lint tool, we are aware of how bug fixes can be more disruptive than usual to our users due to the critical role ESLint plays in a lot of projects' CI setups. At the same time, we do want to be able to fix bugs without having to label many bug fixes as breaking changes.

We've come up with a specific semantic versioning policy to reflect this. Basically, we agree to publish all bug fixes which increase warnings for a particular rule as semver-minor rather than semver-patch; and in exchange, we guarantee that patch upgrades will never break end users' builds, but minor upgrades might for the purpose of fixing bugs. We also recommend pinning ESLint version dependencies to the minor version number instead of major (i.e., use ~ instead of ^).

Regarding the change to complexity: The difference between && and || in that rule has been long-standing, but it is a bug that we basically inherited from JSHint. As noted in the discussion in the related issue, && and || are equivalent in terms of complexity: a && b === !(!a || !b).

I would recommend holding off on upgrading ESLint (if needed) until you can fix any issues newly raised by the rule.

@platinumazure platinumazure added question This issue asks a question about ESLint and removed triage An ESLint team member will look at this issue soon labels Dec 24, 2017
@epoberezkin
Copy link
Author

Understood, thank you. Please feel free to close it then.

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Jun 23, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Jun 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion question This issue asks a question about ESLint
Projects
None yet
Development

No branches or pull requests

3 participants