Skip to content

Commit

Permalink
Stylelint updates:
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
marius-balteanu committed Nov 16, 2024
1 parent cb456a3 commit 1ba92ba
Show file tree
Hide file tree
Showing 5 changed files with 217 additions and 615 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,21 @@ jobs:

- name: Lint code for consistent style
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"
5 changes: 4 additions & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@
"no-duplicate-selectors": true,
"no-empty-source": true,
"no-invalid-double-slash-comments": true,
}
},
"ignoreFiles": [
"app/assets/stylesheets/jquery/*.css"
]
}
2 changes: 1 addition & 1 deletion doc/RUNNING_TESTS
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ Install Stylelint:
`yarn install`

You can run Stylelint with:
`node_modules/.bin/stylelint "app/assets/stylesheets/**/*.css"`
`npx stylelint "app/assets/stylesheets/**/*.css"`
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {},
"devDependencies": {
"stylelint": "^15.11.0"
"stylelint": "^16.10.0"
}
}
Loading

0 comments on commit 1ba92ba

Please sign in to comment.