Commit 1376ecf 1 parent d8d0fbe commit 1376ecf Copy full SHA for 1376ecf
File tree 2 files changed +45
-1
lines changed
2 files changed +45
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : 👔 Format
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+
8
+ concurrency :
9
+ group : ${{ github.workflow }}-${{ github.ref }}
10
+ cancel-in-progress : true
11
+
12
+ jobs :
13
+ format :
14
+ if : github.repository == 'eslint-community/eslint-plugin/promise'
15
+ runs-on : ubuntu-latest
16
+
17
+ steps :
18
+ - name : ⬇️ Checkout repo
19
+ uses : actions/checkout@v3
20
+
21
+ - name : ⎔ Setup node
22
+ uses : actions/setup-node@v3
23
+ with :
24
+ node-version : 18
25
+
26
+ - name : 📥 Install deps
27
+ run : npm install
28
+
29
+ - name : 👔 Format
30
+ run : npm run format
31
+
32
+ - name : 💪 Commit
33
+ run : |
34
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
35
+ git config --local user.name "github-actions[bot]"
36
+
37
+ git add .
38
+ if [ -z "$(git status --porcelain)" ]; then
39
+ echo "💿 no formatting changed"
40
+ exit 0
41
+ fi
42
+ git commit -m "chore: format"
43
+ git push
44
+ echo "💿 pushed formatting changes https://github.com/$GITHUB_REPOSITORY/commit/$(git rev-parse HEAD)"
Original file line number Diff line number Diff line change 22
22
" Aadit M Shah <aaditmshah@aadit.codes> (https://aadit.codes/)"
23
23
],
24
24
"scripts" : {
25
- "format" : " prettier --write ." ,
25
+ "format" : " prettier --write . && npm run lint -- --fix " ,
26
26
"lint" : " npm-run-all \" lint:*\" " ,
27
27
"lint:eslint-docs" : " npm run update:eslint-docs && git diff --exit-code" ,
28
28
"lint:js" : " eslint --report-unused-disable-directives ." ,
You can’t perform that action at this time.
0 commit comments