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 df0aed4 commit 4d04ac2
Show file tree
Hide file tree
Showing 5 changed files with 3,042 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"
}
}
37 changes: 37 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Lint

on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
- development
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 4d04ac2

Please sign in to comment.