-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce stylelint to lint css / less files (#20926)
* Adds stylelinter as github action * exclude stylelinter config file from builds * exclude built vue files * fix running stylelint * Update .github/workflows/stylelinter.yml Co-authored-by: Ben Burgess <[email protected]> * restrict action permissions --------- Co-authored-by: Ben Burgess <[email protected]>
- Loading branch information
Showing
7 changed files
with
1,600 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Stylelint | ||
|
||
on: pull_request | ||
|
||
permissions: | ||
actions: none | ||
checks: none | ||
contents: none | ||
deployments: none | ||
issues: none | ||
packages: none | ||
pull-requests: read | ||
repository-projects: none | ||
security-events: none | ||
statuses: none | ||
|
||
jobs: | ||
phpcs: | ||
name: stylelinter | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
lfs: false | ||
persist-credentials: false | ||
- name: stylelint | ||
run: | | ||
npm install | ||
npx stylelint "**/*.{css,less}" -f github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"overrides": [ | ||
{ | ||
"files": ["**/*.less"], | ||
"customSyntax": "postcss-less" | ||
} | ||
], | ||
"ignoreFiles": ["node_modules/**/*", "vendor/**/*", "tests/**/*", "tmp/**/*", "misc/**/*", "plugins/*/vue/dist/*"], | ||
"rules": { | ||
"color-no-invalid-hex": true | ||
} | ||
} |
Oops, something went wrong.