Enable lints

This commit is contained in:
Manav Rathi 2024-04-30 18:57:19 +05:30
parent 50a1447020
commit 1eff04fe92
No known key found for this signature in database
2 changed files with 32 additions and 2 deletions

30
.github/workflows/desktop-lint.yml vendored Normal file
View file

@ -0,0 +1,30 @@
name: "Lint (desktop)"
on:
# Run on every push to a branch other than main that changes desktop/
push:
branches-ignore: [main, "deploy/**"]
paths:
- "desktop/**"
- ".github/workflows/desktop-lint.yml"
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: desktop
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "desktop/yarn.lock"
- run: yarn install
- run: yarn lint

View file

@ -15,8 +15,8 @@
"dev-main": "tsc && electron app/main.js",
"dev-renderer": "cd ../web && yarn install && yarn dev:photos",
"postinstall": "electron-builder install-app-deps",
"lint": "yarn prettier --check . && eslint --ext .ts src",
"lint-fix": "yarn prettier --write . && eslint --fix --ext .ts src"
"lint": "yarn prettier --check . && eslint --ext .ts src && yarn tsc",
"lint-fix": "yarn prettier --write . && eslint --fix --ext .ts src && yarn tsc"
},
"dependencies": {
"any-shell-escape": "^0.1",