generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (76 loc) · 1.96 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: CI / Lint
on:
schedule:
- cron: '0 */4 * * *'
push:
branches: ['dev', '**']
pull_request:
branches: ['dev', '**']
workflow_dispatch:
permissions:
contents: write
packages: read
statuses: write
jobs:
auto-fix:
name: Auto Fix Linter Issues
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
- name: Install Dependencies
id: install
run: npm run setup
- name: Run Auto Fixer
run: npm run auto-fix
- name: Commit and Push
uses: offensive-vk/auto-commit-push@master
with:
name: "Hamster [bot]"
email: "TheHamsterBot@outlook.com"
message: "Publish Linter Changes and Fixes"
branch: ${{ github.head_ref }}
github-token: ${{ secrets.MY_TOKEN }}
lint:
name: Begin Linting
runs-on: ubuntu-latest
needs: [auto-fix]
continue-on-error: true
strategy:
fail-fast: true
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- name: Install Dependencies
id: install
run: npx pnpm i
- name: Lint Codebase
id: super-linter
uses: super-linter/super-linter/slim@v7
env:
DEFAULT_BRANCH: dev
FILTER_REGEX_EXCLUDE: dist/**/*
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: true
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_JSCPD: false
VALIDATE_TYPESCRIPT_STANDARD: false