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

Move complexity check to ESLint #2062

Merged
merged 1 commit into from
May 8, 2021
Merged

Move complexity check to ESLint #2062

merged 1 commit into from
May 8, 2021

Conversation

ljqx
Copy link
Contributor

@ljqx ljqx commented Dec 8, 2020

This PR fixes #2059

Different from the suggestion in the issue, which uses "complexity" rule built-in in ESLint, this PR creates a new custom rule to match with the original logic we have, which cannot be supported by the "complexity" rule:

  • Switch/Case (options.switchcase = false) doesn't count.
  • Logical operator (options.logicalor = false) doesn't count (&&, ||, ?? though existing version doesn't support ??).

Base automatically changed from master to main March 16, 2021 16:37
Copy link
Contributor

@ariya ariya left a comment

Choose a reason for hiding this comment

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

Very good idea 💯

@ariya ariya merged commit 977b1f8 into jquery:main May 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

infrastructure: move test/check-complexity to ESLint complexity check
2 participants