Skip to content

Commit

Permalink
Add eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean-Der committed Dec 31, 2023
1 parent f1179f5 commit e0bcc2d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/dockerhub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
push:
branches:
- main
pull_request:

jobs:
docker:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,15 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
version: 'latest'

- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
cache-dependency-path: web/package-lock.json

- run: npm ci
working-directory: web

- run: npm run lint
working-directory: web
8 changes: 4 additions & 4 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"scripts": {
"start": "dotenv -e ../.env.development react-scripts start",
"build": "dotenv -e ../.env.production react-scripts build",
"lint": "eslint ./src --max-warnings 0",
"eject": "react-scripts eject"
},
"eslintConfig": {
Expand Down
2 changes: 2 additions & 0 deletions web/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import Selection from './components/selection'
import PlayerPage from './components/player'
import Publish from './components/publish'

let foo = 1

Check warning on line 9 in web/src/App.js

View workflow job for this annotation

GitHub Actions / lint

'foo' is assigned a value but never used

function App() {
return (
<BrowserRouter>
Expand Down

0 comments on commit e0bcc2d

Please sign in to comment.