Skip to content

Commit

Permalink
Add: lint-action
Browse files Browse the repository at this point in the history
  • Loading branch information
georgipavlov-7DIGIT committed Jul 11, 2023
1 parent 9a44e9f commit c53045c
Show file tree
Hide file tree
Showing 4 changed files with 3,041 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"env": {
"node": true,
"es2021": true
},
"extends": ["eslint:recommended", "prettier"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["prettier"],
"rules": {
"no-undefined": "off",
"no-undef": "off"
}
}
38 changes: 38 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Lint

on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
- development
- test-lint
pull_request:
branches:
- main
- development

jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 16

# ESLint and Prettier must be in `package.json`
- name: Install Node.js dependencies
run: npm ci

- name: Run linters
uses: wearerequired/lint-action@v2
with:
eslint: true
auto_fix: true
Loading

0 comments on commit c53045c

Please sign in to comment.