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 false positives for hyphenated functions in function-calc-no-unspaced-operator #5636

Merged
merged 11 commits into from Oct 25, 2021

Conversation

lachieh
Copy link
Contributor

@lachieh lachieh commented Oct 22, 2021

Continued from #5608 after merge of v14

Fixes #5517

  • Added test to cover css custom function
  • Added test to cover operator with no spaces
  • Refactored rule to remove style-search in favor of AST manipulation using postcss-value-parser
  • Adjust invalid less variable in test

lachieh and others added 2 commits October 24, 2021 15:32
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

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

@lachieh Thanks for the changes by my review! I've left more trivial suggestions and questions, but this PR seems mostly good! 👍🏼

lib/rules/function-calc-no-unspaced-operator/index.js Outdated Show resolved Hide resolved
lib/rules/function-calc-no-unspaced-operator/index.js Outdated Show resolved Hide resolved
lib/rules/function-calc-no-unspaced-operator/index.js Outdated Show resolved Hide resolved
lib/rules/function-calc-no-unspaced-operator/index.js Outdated Show resolved Hide resolved
@lachieh
Copy link
Contributor Author

lachieh commented Oct 25, 2021

@ybiquitous I inlined any function that was only used once and made the other suggested changes. Thanks!

Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

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

@lachieh Thank you so much! I've left a trivial comment, but this PR looks good to me! 👍🏼

lib/rules/function-calc-no-unspaced-operator/index.js Outdated Show resolved Hide resolved
Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

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

@lachieh Thanks for this! It'll be more robust.

I've one minor nit, otherwise LGTM.

lib/rules/function-calc-no-unspaced-operator/index.js Outdated Show resolved Hide resolved
Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

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

Thank you!

@jeddy3 jeddy3 merged commit 85c8855 into stylelint:main Oct 25, 2021
@jeddy3
Copy link
Member

jeddy3 commented Oct 25, 2021

  • Fixed: function-calc-no-unspaced-operator false positives for hyphenated functions (#5636).

@lachieh lachieh deleted the bugfix-5517 branch October 25, 2021 20:19
@lachieh
Copy link
Contributor Author

lachieh commented Oct 25, 2021

Thank you @jeddy3 and @ybiquitous! I'm really enjoying contributing and the assistance and contribution documentation the stylelint team has provided has been incredibly helpful!

yassin-kammoun-sonarsource added a commit to SonarSource/SonarJS that referenced this pull request Apr 6, 2022
- New issues of S4650 are due to a reimplementation of the rule (see stylelint/stylelint#5636)
- Old issues of S5362 are due to our custom reimplementation of the dropped rule
- Old issue of S4654 seemed to be a false positive, but it's unclear why the issue disappeared
yassin-kammoun-sonarsource added a commit to SonarSource/SonarJS that referenced this pull request Apr 6, 2022
- New issues of S4650 are due to a reimplementation of the rule (see stylelint/stylelint#5636)
- Old issues of S5362 are due to our custom reimplementation of the dropped rule
- Old issue of S4654 seemed to be a false positive, but it's unclear why the issue disappeared
yassin-kammoun-sonarsource added a commit to SonarSource/SonarJS that referenced this pull request Apr 6, 2022
- New issues of S4650 are due to a reimplementation of the rule (see stylelint/stylelint#5636)
- Old issues of S5362 are due to our custom reimplementation of the dropped rule
- Old issue of S4654 seemed to be a false positive, but it's unclear why the issue disappeared
yassin-kammoun-sonarsource added a commit to SonarSource/SonarJS that referenced this pull request Apr 6, 2022
- New issues of S4650 are due to a reimplementation of the rule (see stylelint/stylelint#5636)
- Old issues of S5362 are due to our custom reimplementation of the dropped rule
- Old issue of S4654 seemed to be a false positive, but it's unclear why the issue disappeared
yassin-kammoun-sonarsource added a commit to SonarSource/SonarJS that referenced this pull request Apr 6, 2022
- New issues of S4650 are due to a reimplementation of the rule (see stylelint/stylelint#5636)
- Old issues of S5362 are due to our custom reimplementation of the dropped rule
- Old issue of S4654 seemed to be a false positive, but it's unclear why the issue disappeared
yassin-kammoun-sonarsource added a commit to SonarSource/SonarJS that referenced this pull request Apr 6, 2022
- New issues of S4650 are due to a reimplementation of the rule (see stylelint/stylelint#5636)
- Old issues of S5362 are due to our custom reimplementation of the dropped rule
- Old issue of S4654 seemed to be a false positive, but it's unclear why the issue disappeared
yassin-kammoun-sonarsource added a commit to SonarSource/SonarJS that referenced this pull request Apr 7, 2022
- New issues of S4650 are due to a reimplementation of the rule (see stylelint/stylelint#5636)
- Old issue of S4654 seemed to be a false positive, but it's unclear why the issue disappeared
yassin-kammoun-sonarsource added a commit to SonarSource/SonarJS that referenced this pull request Apr 7, 2022
- New issues of S4650 are due to a reimplementation of the rule (see stylelint/stylelint#5636)
- Old issue of S4654 seemed to be a false positive, but it's unclear why the issue disappeared
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.

Fix false positives for hyphenated functions in function-calc-no-unspaced-operator
3 participants