Install and setup stylelint

This commit is contained in:
Andreas Nedbal 2023-01-18 22:06:53 +01:00 committed by Andreas Nedbal
parent 5a4fc5c1b8
commit 5c489dd188
3 changed files with 713 additions and 9 deletions

29
.stylelintrc.json Normal file
View file

@ -0,0 +1,29 @@
{
"extends": [
"stylelint-config-standard-scss"
],
"plugins": [
"stylelint-scss"
],
"rules": {
"scss/at-import-partial-extension": null,
"scss/at-rule-no-unknown": true,
"at-rule-no-unknown": null,
"color-hex-length": "long",
"color-hex-case": "upper",
"comment-whitespace-inside": null,
"declaration-block-no-duplicate-properties": true,
"function-name-case": null,
"max-empty-lines": 2,
"number-leading-zero": "always",
"no-descending-specificity": null,
"no-duplicate-at-import-rules": true,
"rule-empty-line-before": ["always-multi-line", {"ignore": ["after-comment"]}],
"shorthand-property-no-redundant-values": [true, {"severity": "warning"}],
"selector-class-pattern": null,
"selector-id-pattern": null,
"selector-max-id": 1,
"string-quotes": "double",
"value-keyword-case": "lower"
}
}

View file

@ -2,6 +2,7 @@
"scripts": { "scripts": {
"lint": "yarn run eslint --ext .ts app/javascript", "lint": "yarn run eslint --ext .ts app/javascript",
"lint:fix": "yarn run eslint --ext .ts app/javascript --fix", "lint:fix": "yarn run eslint --ext .ts app/javascript --fix",
"lint:css": "yarn run stylelint \"app/assets/stylesheets/**/*.scss\"",
"build": "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=assets", "build": "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=assets",
"build:css": "sass ./app/assets/stylesheets/application.sass.scss:./app/assets/builds/application.css --no-source-map --load-path=node_modules" "build:css": "sass ./app/assets/stylesheets/application.sass.scss:./app/assets/builds/application.css --no-source-map --load-path=node_modules"
}, },
@ -28,6 +29,9 @@
"@typescript-eslint/parser": "^4.11.0", "@typescript-eslint/parser": "^4.11.0",
"esbuild": "^0.17.0", "esbuild": "^0.17.0",
"eslint": "^7.16.0", "eslint": "^7.16.0",
"eslint-plugin-import": "^2.27.4" "eslint-plugin-import": "^2.27.4",
"stylelint": "^14.16.1",
"stylelint-config-standard-scss": "^6.1.0",
"stylelint-scss": "^4.3.0"
} }
} }

687
yarn.lock

File diff suppressed because it is too large Load diff