Skip to content

Commit

Permalink
Fix eslint, add GH workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
manics committed Jul 24, 2023
1 parent b5be122 commit e5612d1
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 56 deletions.
6 changes: 5 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
"parserOptions": {
"ecmaFeatures": { "jsx": true, "modules": true },
"ecmaVersion": 2018,
"sourceType": "module"
"sourceType": "module",
"requireConfigFile": false,
"babelOptions": {
"presets": ["@babel/preset-react"]
}
},
"plugins": ["react", "prettier"],
"rules": {
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Test

on:
pull_request:
push:
workflow_dispatch:

jobs:
pre-commit:
runs-on: ubuntu-22.04
timeout-minutes: 10

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm

- name: Install dependencies
run: npm ci

- name: Lint and security checks
run: npm run pipeline

- name: Build
run: npm run build

# There are no tests
# - run: npm test
120 changes: 65 additions & 55 deletions 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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
},
"devDependencies": {
"@babel/eslint-parser": "7.22.5",
"@babel/preset-react": "7.22.5",
"eslint": "8.42.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-prettier": "8.8.0",
Expand Down

0 comments on commit e5612d1

Please sign in to comment.