-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add lint autofix CI job (#9604)
- Loading branch information
Showing
7 changed files
with
595 additions
and
548 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Lint AutoFix | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- docusaurus-v** | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint-autofix: | ||
name: Lint AutoFix | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Installation | ||
run: yarn | ||
|
||
- name: AutoFix Format | ||
run: yarn format | ||
|
||
- name: AutoFix JS | ||
run: yarn lint:js:fix | ||
|
||
- name: AutoFix Style | ||
run: yarn lint:style:fix | ||
|
||
- name: AutoFix Spelling | ||
run: yarn lint:spelling:fix | ||
|
||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: 'refactor: apply lint autofix' |
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 |
---|---|---|
@@ -1,8 +1,5 @@ | ||
{ | ||
"*.{js,jsx,ts,tsx,mjs}": ["eslint --fix"], | ||
"*.css": ["stylelint --allow-empty-input --fix"], | ||
"*": [ | ||
"prettier --ignore-unknown --write", | ||
"cspell --no-must-find-files --no-progress" | ||
] | ||
"*": ["prettier --ignore-unknown --write"] | ||
} |
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
Oops, something went wrong.