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:
Marius Balteanu
2024-11-16 09:53:42 +00:00
parent cb456a3f03
commit 1ba92ba3e0
5 changed files with 217 additions and 615 deletions

View File

@@ -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"

View File

@@ -22,5 +22,8 @@
"no-duplicate-selectors": true,
"no-empty-source": true,
"no-invalid-double-slash-comments": true,
}
},
"ignoreFiles": [
"app/assets/stylesheets/jquery/*.css"
]
}

View File

@@ -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"`

View File

@@ -1,6 +1,6 @@
{
"dependencies": {},
"devDependencies": {
"stylelint": "^15.11.0"
"stylelint": "^16.10.0"
}
}

805
yarn.lock

File diff suppressed because it is too large Load Diff