mirror of
https://github.com/redmine/redmine.git
synced 2025-11-01 10:56:17 +01:00
Stylelint updates:
* update package version * add action to run the checks * use npx to run the checks (#30069). git-svn-id: https://svn.redmine.org/redmine/trunk@23284 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
18
.github/workflows/linters.yml
vendored
18
.github/workflows/linters.yml
vendored
@@ -19,3 +19,21 @@ jobs:
|
|||||||
|
|
||||||
- name: Lint code for consistent style
|
- name: Lint code for consistent style
|
||||||
run: bundle exec rubocop --parallel
|
run: bundle exec rubocop --parallel
|
||||||
|
|
||||||
|
stylelint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn install
|
||||||
|
|
||||||
|
- name: Lint CSS and SCSS files
|
||||||
|
run: npx stylelint "app/assets/stylesheets/**/*.css"
|
||||||
@@ -22,5 +22,8 @@
|
|||||||
"no-duplicate-selectors": true,
|
"no-duplicate-selectors": true,
|
||||||
"no-empty-source": true,
|
"no-empty-source": true,
|
||||||
"no-invalid-double-slash-comments": true,
|
"no-invalid-double-slash-comments": true,
|
||||||
}
|
},
|
||||||
|
"ignoreFiles": [
|
||||||
|
"app/assets/stylesheets/jquery/*.css"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,4 +106,4 @@ Install Stylelint:
|
|||||||
`yarn install`
|
`yarn install`
|
||||||
|
|
||||||
You can run Stylelint with:
|
You can run Stylelint with:
|
||||||
`node_modules/.bin/stylelint "app/assets/stylesheets/**/*.css"`
|
`npx stylelint "app/assets/stylesheets/**/*.css"`
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"stylelint": "^15.11.0"
|
"stylelint": "^16.10.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user