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

Rule idea: no-duplicate-at-functions: Disallow duplicate functions within a stylesheet #731

Open
Grawl opened this issue Jan 12, 2023 · 1 comment
Labels
Help wanted 🙋 Help is needed New rule 👌 Ready to be created as a new rule

Comments

@Grawl
Copy link

Grawl commented Jan 12, 2023

There are two rules to disallow duplicates dollar variables and mixins:

no-duplicate-dollar-variables: Disallow duplicate dollar variables within a stylesheet.

no-duplicate-mixins: Disallow duplicate mixins within a stylesheet.

But there is no rule to disallow duplicate SCSS @-functions.

In my idea, following code patterns are considered warnings:

@function foo($arg) {
    @return $arg * 2;
}
@function foo($arg) {
    @return $arg * 4;
}
@kristerkari kristerkari added Help wanted 🙋 Help is needed New rule 👌 Ready to be created as a new rule labels Jan 13, 2023
@kristerkari
Copy link
Collaborator

Thanks! I think that it indeed would make sense to have such rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted 🙋 Help is needed New rule 👌 Ready to be created as a new rule
Development

No branches or pull requests

2 participants