Meta: Adding stylelint #13
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -19,3 +19,4 @@ hugo.linux
|
|||
# End of https://www.toptal.com/developers/gitignore/api/hugo
|
||||
|
||||
data/
|
||||
/node_modules/
|
||||
|
|
3
.stylelintignore
Normal file
3
.stylelintignore
Normal file
|
@ -0,0 +1,3 @@
|
|||
static/
|
||||
public/
|
||||
data/
|
14
.stylelintrc.json
Normal file
14
.stylelintrc.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"extends": [
|
||||
"stylelint-config-standard-scss",
|
||||
"stylelint-stylistic/config"
|
||||
],
|
||||
"plugins": [
|
||||
"stylelint-scss",
|
||||
"stylelint-stylistic"
|
||||
],
|
||||
"rules": {
|
||||
"media-feature-range-notation": "prefix",
|
||||
"stylistic/max-empty-lines": 2
|
||||
}
|
||||
}
|
|
@ -24,3 +24,18 @@ Examples:
|
|||
|
||||
- `[TIDY] CI: Move common parts to own job`
|
||||
- `Style: Make navbar sticky`
|
||||
|
||||
## Style guide
|
||||
We use stylelint to lint the (s)css, please run before you commit
|
||||
```shell
|
||||
(p)npm lint-fix
|
||||
```
|
||||
### Who to setup
|
||||
We would recommend using pnpm. [Install Guide](https://pnpm.io/installation)
|
||||
```shell
|
||||
pnpm i
|
||||
```
|
||||
You can also use npm if you want
|
||||
```shell
|
||||
npm i
|
||||
```
|
||||
|
|
13
package.json
Normal file
13
package.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"devDependencies": {
|
||||
"stylelint": "^15.11.0",
|
||||
"stylelint-codeguide": "^0.3.2",
|
||||
"stylelint-config-standard-scss": "^11.0.0",
|
||||
"stylelint-scss": "^5.3.0",
|
||||
"stylelint-stylistic": "^0.4.3"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "stylelint '**/*.scss' '**/*.css'",
|
||||
"lint-fix": "stylelint '**/*.scss' '**/*.css' --fix"
|
||||
}
|
||||
}
|
1232
pnpm-lock.yaml
Normal file
1232
pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue