We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01eed21 commit 0c33f71Copy full SHA for 0c33f71
.github/workflows/lint.yml
@@ -0,0 +1,40 @@
1
+name: Lint Code
2
+
3
+on:
4
+ push:
5
+ branches:
6
+ - '*'
7
+ pull_request:
8
9
10
11
+jobs:
12
+ lint:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Checkout code
16
+ uses: actions/checkout@v3
17
18
+ # Sets up Node.js environment
19
+ - name: Set up Node.js
20
+ uses: actions/setup-node@v3
21
+ with:
22
+ node-version: '20'
23
24
+ # Installs dependencies
25
+ - name: Install dependencies
26
+ run: npm install
27
28
+ # Runs ESLint
29
+ - name: Run ESLint
30
+ run: npx eslint --fix ./src
31
32
+ # Displays result
33
+ - name: Check for ESLint errors
34
+ run: |
35
+ if npx eslint --fix ./src; then
36
+ echo "Linting passed!"
37
+ else
38
+ echo "Linting failed!"
39
+ exit 1
40
+ fi
0 commit comments