Skip to content

Commit

Permalink
chore: Add actual stylelint configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
MorevM committed Feb 19, 2022
1 parent c3e8b61 commit 6ceba1b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged --config ./.lintstagedrc.yaml
yarn lint-staged
7 changes: 2 additions & 5 deletions .lintstagedrc.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
{
"src/**/*.scss": [
"stylelint --config ./.stylelintrc.yaml --allow-empty-input --fix"
],
}
src/**/*.scss:
- stylelint --allow-empty-input --fix
16 changes: 16 additions & 0 deletions .stylelintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
extends: [
'@morev/stylelint-config/scss/warn-autofixable',
],
rules: {
// Well, `stylelint-config` designed to be used with style files,
// but it's the library, and some rules make it worse
'max-line-length': null,
'scss/dollar-variable-first-in-block': null,
'scss/dollar-variable-empty-line-before': null,
'length-zero-no-unit': null,
'number-leading-zero': null,
'aditayvm/at-rule-no-children': null,
'declaration-empty-line-before': null,
}
};
2 changes: 0 additions & 2 deletions .stylelintrc.yaml

This file was deleted.

0 comments on commit 6ceba1b

Please sign in to comment.