Skip to content

Commit

Permalink
Run eslint in frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
akx committed May 27, 2024
1 parent fc14383 commit 37d34fb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
htmlcov
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- run: pip install tox-gh-actions tox
- run: tox
- uses: codecov/codecov-action@v4
Lint:
Lint-Backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -35,6 +35,16 @@ jobs:
cache-dependency-path: |
pyproject.toml
- uses: pre-commit/action@v3.0.1
Lint-Frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
cache: npm
cache-dependency-path: package.json
- run: npm i
- run: npm run eslint .
Build:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions lippukala/static/lippukala/pos-qr.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class PosQRZbar {
}

async init() {
// eslint-disable-next-line import/extensions,import/no-unresolved
this.zbar = await import("https://cdn.jsdelivr.net/npm/@undecaf/zbar-wasm@0.10.1/dist/inlined/index.mjs");
const canvas = document.createElement("canvas");
canvas.id = "posqr-canvas";
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-html": "^7.1.0",
"prettier": "^3.2.4"
},
"scripts": {
"lint": "eslint ."
}
}

0 comments on commit 37d34fb

Please sign in to comment.