-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (38 loc) · 1.79 KB
/
linters.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
name: Linters
on: pull_request
env:
FORCE_COLOR: 1
jobs:
eslint:
name: ESLint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Setup ESLint
run: |
npm install --save-dev @typescript-eslint/eslint-plugin@6.x @typescript-eslint/parser@6.x eslint@8.x eslint-config-airbnb@19.x eslint-config-airbnb-typescript@17.x eslint-config-next@13.x eslint-config-prettier@9.x eslint-plugin-eslint-comments@3.x eslint-plugin-import@2.x eslint-plugin-jsx-a11y@6.x eslint-plugin-prettier@5.x eslint-plugin-react@7.x eslint-plugin-react-hooks@4.x eslint-plugin-simple-import-sort@10.x eslint-plugin-tailwindcss@3.x eslint-plugin-unused-imports@3.x
- name: ESLint Report
run: npx eslint .
nodechecker:
name: node_modules checker
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Check node_modules existence
run: |
if [ -d "node_modules/" ]; then echo -e "\e[1;31mThe node_modules/ folder was pushed to the repo. Please remove it from the GitHub repository and try again."; echo -e "\e[1;32mYou can set up a .gitignore file with this folder included on it to prevent this from happening in the future." && exit 1; fi
distchecker:
name: dist directory checker
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Check dist directory existence
run: |
if [ -d "dist/" ]; then
echo -e "\e[1;31mThe dist/ folder was pushed to the repo. Please remove it from the GitHub repository and try again."
echo -e "\e[1;32mYou can set up a .gitignore file with this folder included on it to prevent this from happening in the future."
exit 1
fi