Consolidate linters

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2026-03-24 12:57:31 +00:00
parent 9185f666e0
commit 5ea477eca8
No known key found for this signature in database
GPG Key ID: A2B008A5F49F5D0D
6 changed files with 11 additions and 45 deletions

View File

@ -1,4 +0,0 @@
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged --concurrent false

View File

@ -1,4 +1,4 @@
{
"*": "prettier --write",
"*": "prettier --write --ignore-unknown",
"*.(ts|tsx)": ["eslint --fix"]
}

View File

@ -1,17 +0,0 @@
import { KnipConfig } from "knip";
export default {
entry: ["src/preload.cts", "electron-builder.ts", "scripts/**", "hak/**"],
project: ["**/*.{js,ts}"],
ignoreDependencies: [
// Brought in via hak scripts
"matrix-seshat",
// Required for `action-validator`
"@action-validator/*",
// Used for git pre-commit hooks
"husky",
// Required for `patch-package`
"postinstall-postinstall",
],
ignoreBinaries: ["jq", "scripts/in-docker.sh"],
} satisfies KnipConfig;

View File

@ -29,7 +29,7 @@
"fetch": "pnpm run mkdirs && tsx scripts/fetch-package.ts",
"asar-webapp": "asar p webapp webapp.asar",
"start": "pnpm run build:ts && pnpm run build:res && electron .",
"lint": "pnpm lint:types && pnpm lint:js && pnpm lint:workflows",
"lint": "pnpm lint:types && pnpm lint:js",
"lint:js": "eslint --max-warnings 0 src hak playwright scripts && prettier --check .",
"lint:js-fix": "eslint --fix --max-warnings 0 src hak playwright scripts && prettier --log-level=warn --write .",
"lint:types": "pnpm lint:types:src && pnpm lint:types:test && pnpm lint:types:scripts && pnpm lint:types:hak",
@ -37,8 +37,6 @@
"lint:types:test": "tsc --noEmit -p playwright/tsconfig.json",
"lint:types:scripts": "tsc --noEmit -p scripts/tsconfig.json",
"lint:types:hak": "tsc --noEmit -p hak/tsconfig.json",
"lint:workflows": "find .github/workflows -type f \\( -iname '*.yaml' -o -iname '*.yml' \\) | xargs -I {} sh -c 'echo \"Linting {}\"; action-validator \"{}\"'",
"lint:knip": "knip",
"build:native": "pnpm run hak",
"build:native:universal": "pnpm run hak --target x86_64-apple-darwin fetchandbuild && pnpm run hak --target aarch64-apple-darwin fetchandbuild && pnpm run hak --target x86_64-apple-darwin --target aarch64-apple-darwin copyandlink",
"build:32": "pnpm run build:ts && pnpm run build:res && electron-builder --ia32",
@ -70,8 +68,6 @@
"uuid": "^13.0.0"
},
"devDependencies": {
"@action-validator/cli": "^0.6.0",
"@action-validator/core": "^0.6.0",
"@babel/core": "^7.18.10",
"@babel/preset-env": "^7.18.10",
"@babel/preset-typescript": "^7.18.6",
@ -100,9 +96,6 @@
"eslint-plugin-n": "^17.12.0",
"eslint-plugin-unicorn": "^56.0.0",
"glob": "^13.0.0",
"husky": "^9.1.6",
"knip": "^5.0.0",
"lint-staged": "^16.0.0",
"matrix-web-i18n": "catalog:",
"mkdirp": "^3.0.0",
"pacote": "^21.0.0",

View File

@ -47,6 +47,15 @@ export default {
"@types/sdp-transform",
],
},
"apps/desktop": {
entry: ["src/preload.cts", "electron-builder.ts", "scripts/**", "hak/**"],
project: ["**/*.{js,ts}"],
ignoreDependencies: [
// Brought in via hak scripts
"matrix-seshat",
],
ignoreBinaries: ["scripts/in-docker.sh"],
},
".": {
entry: ["scripts/**", "docs/**"],
},

15
pnpm-lock.yaml generated
View File

@ -178,12 +178,6 @@ importers:
specifier: ^13.0.0
version: 13.0.0
devDependencies:
'@action-validator/cli':
specifier: ^0.6.0
version: 0.6.0(@action-validator/core@0.6.0)
'@action-validator/core':
specifier: ^0.6.0
version: 0.6.0
'@babel/core':
specifier: ^7.18.10
version: 7.29.0
@ -268,15 +262,6 @@ importers:
glob:
specifier: ^13.0.0
version: 13.0.6
husky:
specifier: ^9.1.6
version: 9.1.7
knip:
specifier: ^5.0.0
version: 5.87.0(patch_hash=873a4dc88d16b775314860cbae8af05be293a2e1a3f86d78562885e78256f2ee)(@types/node@18.19.130)(typescript@5.9.3)
lint-staged:
specifier: ^16.0.0
version: 16.3.0
matrix-web-i18n:
specifier: 'catalog:'
version: 3.6.0