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 interpolation in function-calc-no-invalid #4046

Merged
merged 3 commits into from Apr 25, 2019

Conversation

5 participants
@ota-meshi
Copy link
Member

commented Apr 24, 2019

Which issue, if any, is this issue related to?

Closes #3908

Is there anything in the PR that needs further explanation?

No, it's self explanatory.

@hudochenkov
Copy link
Member

left a comment

Could you add examples from original issue to tests, please? It might have something to do with calc expression being multi-line.

@@ -50,6 +50,9 @@
"(" return 'LPAREN';
")" return 'RPAREN';

#\{([\s\S]*?)\} return 'UNKNOWN'; // scss variable

This comment has been minimized.

Copy link
@evilebottnawi

evilebottnawi Apr 24, 2019

Member

// scss interpolation

This comment has been minimized.

Copy link
@ota-meshi

ota-meshi Apr 24, 2019

Author Member

Thank you for pointing out!
I fixed this.

ota-meshi added some commits Apr 24, 2019

@ota-meshi

This comment has been minimized.

Copy link
Member Author

commented Apr 24, 2019

@hudochenkov Thank you for your review!
I added the following test case.

      a {
        width: calc(
          #{$min-value} +
          #{strip-unit($max-value - $min-value)} *
          (100vw - #{$min-vw})
        );
      }
@hudochenkov
Copy link
Member

left a comment

LGTM! Thanks!

@hudochenkov hudochenkov merged commit 355f06b into master Apr 25, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 96.365%
Details

@hudochenkov hudochenkov deleted the issue-3908 branch Apr 25, 2019

@hudochenkov

This comment has been minimized.

Copy link
Member

commented Apr 25, 2019

  • Fixed: function-calc-no-invalid false positives for interpolation (#4046).
@Bigdragon13th

This comment has been minimized.

Copy link

commented May 2, 2019

When will this be released? Want to turn on the rule, but this issue prevent me.

@benjamincharity

This comment has been minimized.

Copy link

commented Jun 3, 2019

This issue is also a blocker for us 👍

@hudochenkov

This comment has been minimized.

Copy link
Member

commented Jun 3, 2019

@Bigdragon13th @benjamincharity it will be released this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.