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

Suggestion: can we lint duplicate @include ? #943

Open
seeliang opened this issue Nov 7, 2016 · 2 comments
Open

Suggestion: can we lint duplicate @include ? #943

seeliang opened this issue Nov 7, 2016 · 2 comments

Comments

@seeliang
Copy link

seeliang commented Nov 7, 2016

I think this could be useful

What version of Sass Lint are you using?
1.9.1

Please include any relevant parts of your configuration
not really

What did you do? Please include the actual source code causing the issue.

  @include screen(phone) { // first include 
    margin-bottom: 10px;
    width: 100%;
  }
  @include screen(tablet) {
    margin-right: 8px;
  }
  @include screen(phone) { // new sass lint set to catch this 
    margin-bottom: 15px;
  }

What did you expect to happen?
have linter error

What actually happened? Please include any error messages given to you by Sass Lint.
add a new rule

If you're using a IDE plugin have you tried the CLI too?
Atom

@DanPurdy
Copy link
Member

DanPurdy commented Nov 7, 2016

For these sort of requests you can just describe what you'd like the rule to check for and what the outcome should be.

I'm guessing this would be a check on a block by block basis? I'm not sure how useful it will be to most but happy to see a PR for it and should be very straightforward.

@seeliang
Copy link
Author

seeliang commented Nov 8, 2016

Thanks Dan, the benefit would be, force you have one @include and maintain it at one place :)

same concept of
https://github.com/sasstools/sass-lint/blob/develop/docs/rules/no-duplicate-properties.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants