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: Duplicate Property #28

Closed
Snugug opened this issue Aug 28, 2015 · 6 comments
Closed

New Rule: Duplicate Property #28

Snugug opened this issue Aug 28, 2015 · 6 comments
Assignees
Labels

Comments

@Snugug
Copy link
Member

Snugug commented Aug 28, 2015

As Per SCSS Lint

@Snugug Snugug added the rule label Aug 28, 2015
@bgriffith bgriffith self-assigned this Sep 3, 2015
@bgriffith
Copy link
Member

Will take a look at this one today.

@bgriffith
Copy link
Member

Any opinions on whether this should trigger when using both long hand and short hand properties?

Should the following trigger an error?

.foo {
  margin-left: 10px;
  padding: 0;
  margin: 0;
}

@DanPurdy
Copy link
Member

DanPurdy commented Sep 3, 2015

I reckon it should because you are technically duplicating it there it's just sort of hidden from you, in that instance your margin-left value is being overwritten?

margin: {
  margin-top: 0,
  margin-right: 0,
  margin-bottom: 0,
  margin-left: 0
}

@bgriffith
Copy link
Member

I've checked out the way SCSS Lint works, and they don't cause an error as technically they are different properties. Maybe this could be a different rule?

property-overwrite or something similar ? Thoughts?

@DanPurdy
Copy link
Member

DanPurdy commented Sep 3, 2015

Makes sense to me, maybe that would actaully be preferable so we can keep the rules fairly granular.

@bgriffith
Copy link
Member

Since this is only ever disallowing (as you wouldn't ever be enforcing duplicate properties), I think it should follow the current convention for 'disallows' and call it no-duplicate-property

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

No branches or pull requests

3 participants