-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 1012 Bytes
/
linter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Linter
on:
push:
branches: ["**"]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
- name: "Install Dependencies"
run: npm ci
- name: "Check Formatting"
id: prettier
run: npx prettier --ignore-path .gitignore --check .
continue-on-error: true
- name: "Run ESLint"
id: eslint
run: npx eslint --ignore-path .gitignore .
continue-on-error: true
- name: "Validate TypeScript Types"
id: ts
run: npx tsc --noEmit
continue-on-error: true
- name: "Bail If Checks Failed"
if: steps.prettier.outcome != 'success' || steps.eslint.outcome != 'success' || steps.ts.outcome != 'success'
run: |
echo "One or more code quality checks failed. Exiting with code 1..."
exit 1