-
Notifications
You must be signed in to change notification settings - Fork 1
96 lines (82 loc) · 3.4 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
88
89
90
91
92
93
94
95
96
---
###########################
###########################
## Linter GitHub Actions ##
###########################
###########################
name: Lint Code Base
#
# Documentation:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
#
#############################
# Start the job on all pull requests #
#############################
on:
# Run on every pull request created or updated
# https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#pull_request
pull_request:
###############
# Set the Job #
###############
jobs:
build:
# Name the Job
name: Lint Code Base
# Set the agent to run on
runs-on: ubuntu-latest
##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout code
uses: actions/checkout@v4
with:
# super-linter needs the full git history to get the
# list of files that changed across commits
fetch-depth: 0
##########################
# Github Super Linter needs
# the latest definitions installed
##########################
- name: Use Node.js 18.x
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 18.x
# Install our eslint packages.
# We may have custom tsconfigs, eslints that are brought in via a package.
- run: npm install
################################
# Run Linter against code base #
################################
- name: Lint Code Base
uses: super-linter/[email protected] # x-release-please-version
# All Environment variables are defined here https://github.com/github/super-linter#environment-variables
env:
# To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# The name of the repository default branch.
DEFAULT_BRANCH: main
# Directory for all linter configuration rules.
# This is the root of our codebase.
LINTER_RULES_PATH: /
# Will parse the entire repository and find all files to validate across all types.
# NOTE: When set to false, only new or edited files will be parsed for validation.
VALIDATE_ALL_CODEBASE: true
# Filename for ESLint configuration (ex: .eslintrc.yml, .eslintrc.json)
TYPESCRIPT_ES_CONFIG_FILE: .eslintrc.js
#####
# Note: All the VALIDATE[LANGUAGE] variables behave in a specific way.
# If none of them are passed, then they all default to true.
# However if any one of the variables are set, we default to leaving any unset variable to false.
# This means that if you run the linter “out of the box”, all languages will be checked.
# But if you wish to select specific linters, we give you full control to choose which linters are run, and won’t run anything unexpected.
####
# Flag to enable or disable the linting process of the JavaScript language. (Utilizing: eslint)
# Will validate any raw *.js in the repo like a jest.config.js
VALIDATE_JAVASCRIPT_ES: true
# Flag to enable or disable the linting process of the TypeScript language. (Utilizing: eslint)
VALIDATE_TYPESCRIPT_ES: true