Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
feat(scss): extend rules
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-lit committed Feb 2, 2021
1 parent 8b4ba1f commit af17ab0
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 75 deletions.
7 changes: 1 addition & 6 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@ module.exports = {

rules: {
'at-rule-no-vendor-prefix': true,
'at-rule-no-unknown': [
true,
{
ignoreAtRules: ['for', 'each', 'extend', 'include', 'at-root', 'mixin'],
},
],
'at-rule-no-unknown': null,
'at-rule-empty-line-before': ['always', { except: 'first-nested' }],
'block-no-empty': null,
'color-no-hex': true,
Expand Down
137 changes: 69 additions & 68 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
"stylelint-use-nesting": "^3.0.0"
},
"devDependencies": {
"@alexlit/lint-kit": "0.16.0"
"@alexlit/lint-kit": "0.18.1"
}
}
10 changes: 10 additions & 0 deletions plugins/scss.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ module.exports = {
plugins: ['stylelint-scss'],

rules: {
'scss/at-rule-no-unknown': [
true,
{
ignoreAtRules: [],
},
],
'scss/declaration-nested-properties': 'never',
'scss/function-color-relative': true,
'scss/no-duplicate-dollar-variables': true,
'scss/no-duplicate-mixins': true,
'scss/selector-nest-combinators': 'always',
'scss/selector-no-redundant-nesting-selector': null,
},
Expand Down
8 changes: 8 additions & 0 deletions test/scss.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
--ui-button-color--p: currentColor;
}

@mixin font-size-default {
font-size: 16px;
}

.ui-button {
@include variables;

Expand All @@ -31,6 +35,7 @@
var(--ui-icon-default-background-color)
);
border-radius: 4px;
color: scale-color(saturate, blue, 20%);
color: white;
cursor: pointer;
font-stretch: normal;
Expand Down Expand Up @@ -164,6 +169,9 @@
}
}

&.tewst {
}

& .ui-button {
margin-left: var(--ui-button-padding);

Expand Down

0 comments on commit af17ab0

Please sign in to comment.