add GitHub action on pushing to run lint (#224)

* Add script to run eslint for the project

* Add GitHub Action for linting

Prevent merges with linting errors

* Rename GitHub Action "build_push" to "build_push_master"
This commit is contained in:
Daniel
2023-01-10 01:27:17 +03:30
committed by GitHub
parent fc9dc35b60
commit 70ae857132
3 changed files with 13 additions and 1 deletions
+11
View File
@@ -0,0 +1,11 @@
name: Lint
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install modules
run: yarn
- name: Run ESLint
run: yarn lint
+2 -1
View File
@@ -32,7 +32,8 @@
"build-md5": "find build -type f | sort | xargs md5sum | awk '{ print $1 }' | tr -d '\n' | md5sum| awk '{ print $1 }' > buildZip/md5sum ",
"build-zip": "cd build && rev=$(git rev-list HEAD --count) && echo r$rev > revision && zip -9 -r ../buildZip/Tachidesk-WebUI-r$rev *",
"test": "react-scripts test",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"lint": "eslint src --ext .ts,.tsx,.js,.jsx"
},
"browserslist": {
"production": [