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

Commit

Permalink
Merge pull request #124 from rynpsc/scss-rules
Browse files Browse the repository at this point in the history
Add stylelint-scss rules
  • Loading branch information
shannonmoeller committed Oct 11, 2021
2 parents 47f220f + f77b1fb commit 050b681
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/checker.js
Expand Up @@ -17,10 +17,17 @@ function check(path) {
const configRules = config.config.rules;
const conflictingRules = [];

function isEmpty(value) {
return (
value === null ||
(Array.isArray(value) && value.length === 0)
);
}

Object.keys(prettierRules).forEach((rule) => {
if (
hasOwnProperty.call(configRules, rule) &&
configRules[rule] !== null &&
!isEmpty(configRules[rule]) &&
configRules[rule][0] !== prettierRules[rule]
) {
conflictingRules.push(rule);
Expand Down
15 changes: 15 additions & 0 deletions src/index.js
Expand Up @@ -124,5 +124,20 @@ module.exports = {

// prettier has its own quotes rule
'string-quotes': null,

'scss/at-else-closing-brace-newline-after': null,
'scss/at-else-closing-brace-space-after': null,
'scss/at-else-empty-line-before': null,
'scss/at-else-if-parentheses-space-before': null,
'scss/at-function-parentheses-space-before': null,
'scss/at-if-closing-brace-newline-after': null,
'scss/at-if-closing-brace-space-after': null,
'scss/at-mixin-parentheses-space-before': null,
'scss/dollar-variable-colon-newline-after': null,
'scss/dollar-variable-colon-space-after': null,
'scss/dollar-variable-colon-space-before': null,
'scss/operator-no-newline-after': null,
'scss/operator-no-newline-before': null,
'scss/operator-no-unspaced': null,
},
};

0 comments on commit 050b681

Please sign in to comment.