Run stylelint through npm.
This commit is contained in:
parent
ee50387938
commit
0524682efb
5 changed files with 2180 additions and 15 deletions
16
.github/workflows/lint.yml
vendored
16
.github/workflows/lint.yml
vendored
|
|
@ -30,11 +30,21 @@ jobs:
|
|||
|
||||
stylelint:
|
||||
runs-on: ubuntu-latest
|
||||
container: nextcloudci/stylelint:stylelint-1
|
||||
|
||||
name: stylelint
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Lint
|
||||
run: ./run-stylelint.sh
|
||||
run: npm run stylelint
|
||||
|
|
|
|||
|
|
@ -1,7 +1,16 @@
|
|||
{
|
||||
"extends": ["stylelint-config-standard-scss"],
|
||||
"rules": {
|
||||
"alpha-value-notation": null,
|
||||
"color-function-notation": null,
|
||||
"hue-degree-notation": null,
|
||||
"indentation": null,
|
||||
"media-feature-name-no-unknown": true,
|
||||
"media-feature-name-no-vendor-prefix": null,
|
||||
"property-no-unknown": true,
|
||||
"property-no-vendor-prefix": null,
|
||||
"selector-class-pattern": null,
|
||||
"selector-id-pattern": null,
|
||||
"selector-pseudo-class-no-unknown": true,
|
||||
"selector-pseudo-element-no-unknown": true,
|
||||
"selector-type-no-unknown": true,
|
||||
|
|
|
|||
2154
package-lock.json
generated
2154
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -7,7 +7,8 @@
|
|||
"scripts": {
|
||||
"build": "NODE_ENV=production webpack --progress --config webpack.js",
|
||||
"dev": "NODE_ENV=development webpack --config webpack.js",
|
||||
"lint": "eslint src"
|
||||
"lint": "eslint src",
|
||||
"stylelint": "stylelint css/*.css css/*.scss"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jaames/iro": "5.5.2",
|
||||
|
|
@ -20,6 +21,8 @@
|
|||
"devDependencies": {
|
||||
"copy-webpack-plugin": "6.4.1",
|
||||
"eslint": "8.2.0",
|
||||
"stylelint": "14.0.1",
|
||||
"stylelint-config-standard-scss": "^2.0.1",
|
||||
"webpack": "4.46.0",
|
||||
"webpack-cli": "4.9.1"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
STYLELINT=$(which stylelint || true)
|
||||
if [ -z "$STYLELINT" ]; then
|
||||
echo "Can't find command \"stylelint\" in $PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Checking stylesheets with $STYLELINT ...
|
||||
find . -name "*.*css" -print0 | xargs -0 $STYLELINT
|
||||
Loading…
Reference in a new issue