-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35e23f8
commit 8ef7d08
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,70 @@ | ||
# stylelint-config-scss | ||
|
||
Custom StyleLint settings for SCSS as an extensible shared config. | ||
|
||
## Installation | ||
|
||
If using npm version 5+: | ||
|
||
```bash | ||
npx install-peerdeps --dev @meteozdemir/stylelint-config-scss | ||
``` | ||
|
||
If using npm version version < 5: | ||
|
||
```bash | ||
npm install -g install-peerdeps | ||
install-peerdeps --dev @meteozdemir/stylelint-config-scss | ||
``` | ||
|
||
If want to install manually without install-peerdeps CLI: | ||
|
||
```bash | ||
npm i -D @meteozdemir/stylelint-config-scss stylelint stylelint-scss postcss postcss-scss stylelint-high-performance-animation stylelint-order stylelint-prettier | ||
``` | ||
|
||
## Usage | ||
|
||
A `.stylelintrc.js` file will be automatically created in the root of your project with: | ||
|
||
```javascript | ||
module.exports = { | ||
extends: [ | ||
'@meteozdemir/stylelint-config-scss', | ||
'@meteozdemir/stylelint-config-scss/rules/prettier', | ||
], | ||
rules: {}, | ||
}; | ||
``` | ||
|
||
If the file is not created automatically by any reason, simply create a `.stylelintrc.js` file in the root of project and copy code above. | ||
|
||
## @meteozdemir/stylelint-config-scss/rules/prettier | ||
|
||
Prettier is enabled by default with this package and `@meteozdemir/stylelint-config-scss/rules/prettier` disables StyleLint rules that might conflict with Prettier. | ||
|
||
If you don't want to use Prettier, remove `'@meteozdemir/stylelint-config-scss/rules/prettier'` from `.stylelintrc.js` file. | ||
|
||
```javascript | ||
module.exports = { | ||
extends: ['@meteozdemir/stylelint-config-scss'], | ||
rules: {}, | ||
}; | ||
``` | ||
|
||
## Rule Override | ||
|
||
Add any rule you want to override to rules object in `.stylelintrc.js` file. | ||
|
||
```javascript | ||
module.exports = { | ||
extends: [ | ||
'@meteozdemir/stylelint-config-scss', | ||
'@meteozdemir/stylelint-config-scss/rules/prettier', | ||
], | ||
rules: { | ||
'scss/at-import-partial-extension': 'always', | ||
'scss/at-mixin-argumentless-call-parentheses': 'never', | ||
}, | ||
}; | ||
``` |