-
Notifications
You must be signed in to change notification settings - Fork 2
94 lines (79 loc) · 3.49 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
---
###########################
###########################
## 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@755da8c3cf115ac066823e79a1e1788f8940201b # v3
##########################
# Github Super Linter needs
# the latest definitions installed
##########################
- name: Use Node.js 16.x
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
with:
node-version: 16.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
# We use the Github super linter, it can be cranky at times, so in that moment here are the docs https://github.com/github/super-linter
uses: docker://ghcr.io/github/super-linter:slim-v4@sha256:900277f36d47d5ddc460d901ea9dfcb1d348f7390066f800a0895cd88866b31f
# All Environment variables are defined here https://github.com/github/super-linter#environment-variables
env:
# 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
# Flag to enable or disable the linting process of the YAML language.
VALIDATE_YAML: true