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

New rule: No non numeric dimensions #357

Merged

Conversation

rambleraptor
Copy link
Contributor

The old sass/linter had a rule to ensure that string interpolated values didn't have units attached to them (because they'd be strings instead of numbers).

This rule replicates that. The tests are the same for the sass/linter rule + this rule, so I have good confidence it'll give the same user experience.

@rambleraptor
Copy link
Contributor Author

@nex3 fyi

src/rules/no-non-numeric-dimensions/__tests__/index.js Outdated Show resolved Hide resolved
src/rules/no-non-numeric-dimensions/index.js Outdated Show resolved Hide resolved
src/rules/no-non-numeric-dimensions/index.js Outdated Show resolved Hide resolved
@nex3
Copy link
Contributor

nex3 commented Aug 13, 2019

It's probably also a good idea to test that this only applies to unquoted strings.

@rambleraptor
Copy link
Contributor Author

good call on the test! added a test case for that.

@coveralls
Copy link

coveralls commented Aug 14, 2019

Coverage Status

Coverage increased (+0.06%) to 92.146% when pulling 66a08a1 on rambleraptor:no-non-numeric-dimensions into 1b0bdd2 on kristerkari:master.

@rambleraptor
Copy link
Contributor Author

@kristerkari - ptal when you can!

@kristerkari
Copy link
Collaborator

kristerkari commented Aug 24, 2019

@kristerkari - ptal when you can!

Sorry, I have been really busy for the last 2 weeks.

I think that the new rules are okay, but only thing that remains is to think about the naming, are the rules names matching the stylelint naming conventions? Are the rules in the right "category"? etc.

I will try to think about the names this weekend, and give suggestions for the names if I can come up with any.

@rambleraptor
Copy link
Contributor Author

No worries! I appreciate all of your help and completely understand that you're busy. Thanks a lot!

src/rules/index.js Outdated Show resolved Hide resolved
src/rules/no-non-numeric-dimensions/README.md Outdated Show resolved Hide resolved
@kristerkari kristerkari merged commit e10b7a5 into stylelint-scss:master Aug 26, 2019
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.

None yet

4 participants