chore: improve lint-staged rules (#418)

- Include `rustfmt`
- Include `tsc`: unlike running `pnpm typecheck` after `lint-staged`,
- this will check only staged files
This commit is contained in:
sripwoud
2024-03-18 15:31:08 +01:00
committed by GitHub
parent 8f519577af
commit 54ae17a914
3 changed files with 21 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
{
"**/*.{css,less,scss,html,graphql,json,js,jsx,md,ts,tsx,yml,yaml}": [
"prettier --write --ignore-path .prettierignore"
],
"**/*.{js,jsx,ts,tsx}": ["eslint"]
"*": "prettier -u -w",
"**/*.rs": "rustfmt",
"**/*.{ts,tsx}": "tsc-files --noEmit",
"**/*.{js,jsx,ts,tsx}": "eslint"
}

View File

@@ -31,6 +31,7 @@
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"ts-node-dev": "^2.0.0",
"tsc-files": "^1.1.4",
"tsconfig-paths": "^4.2.0",
"ttab": "^0.8.0",
"turbo": "^1.10.16",
@@ -45,7 +46,7 @@
"build.docker.query": "docker build -f query-api/Dockerfile . -t query-api",
"build.docker.ui": "docker build -f ui/Dockerfile . -t anonklub-ui",
"build.pkgs": "turbo --filter=// --filter='./pkgs/*' build _compile",
"build.ui":"pnpm --filter @anonklub/ui build",
"build.ui": "pnpm --filter @anonklub/ui build",
"changeset": "changeset",
"clean": "find . \\( -name 'node_modules' -o -name 'dist' -o -name 'next' \\) -type d -prune -exec rm -rf '{}' +",
"compile": "turbo _compile",
@@ -54,7 +55,7 @@
"format.fix": "turbo format.cargo.fix format.forge.fix format.prettier.fix",
"format.prettier": "prettier -c .",
"format.prettier.fix": "prettier -w .",
"githook:precommit": "lint-staged && pnpm run typecheck",
"githook:precommit": "lint-staged",
"knip": "knip -c .knip.ts --production --strict",
"lint": "turbo lint.cargo lint.eslint lint.solhint",
"lint.eslint": "NODE_OPTIONS='--max-old-space-size=4096' eslint . --ext .js,.jsx,.ts,.tsx",
@@ -63,7 +64,7 @@
"prepare": "is-ci || husky install",
"publish.pkgs": "pnpm build.pkgs && changeset version && changeset publish",
"start.query-api": "pnpm --filter query-api start.dev",
"start.ui":"pnpm --filter @anonklub/ui dev",
"start.ui": "pnpm --filter @anonklub/ui dev",
"test.cargo": "cargo nextest run --workspace",
"test": "turbo _test test.jest test.cargo",
"test.watch": "jest --watch",

13
pnpm-lock.yaml generated
View File

@@ -90,6 +90,9 @@ importers:
ts-node-dev:
specifier: ^2.0.0
version: 2.0.0(@types/node@18.19.22)(typescript@5.1.6)
tsc-files:
specifier: ^1.1.4
version: 1.1.4(typescript@5.1.6)
tsconfig-paths:
specifier: ^4.2.0
version: 4.2.0
@@ -10394,6 +10397,7 @@ packages:
/eslint-config-standard-with-typescript@24.0.0(@typescript-eslint/eslint-plugin@5.62.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.57.0)(typescript@5.1.6):
resolution: {integrity: sha512-vEnGXZ5aiR1enl9652iIP4nTpY3GPcNEwuhrsPbKO3Ce3D6T3yCqZdkUPk8nJetfdL/yO0DLsHg2d/l9iECIdg==}
deprecated: Please use eslint-config-love, instead.
peerDependencies:
'@typescript-eslint/eslint-plugin': ^5.0.0
eslint: ^8.0.1
@@ -18365,6 +18369,15 @@ packages:
resolution: {integrity: sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==}
dev: false
/tsc-files@1.1.4(typescript@5.1.6):
resolution: {integrity: sha512-RePsRsOLru3BPpnf237y1Xe1oCGta8rmSYzM76kYo5tLGsv5R2r3s64yapYorGTPuuLyfS9NVbh9ydzmvNie2w==}
hasBin: true
peerDependencies:
typescript: '>=3'
dependencies:
typescript: 5.1.6
dev: true
/tsconfig-paths-webpack-plugin@4.1.0:
resolution: {integrity: sha512-xWFISjviPydmtmgeUAuXp4N1fky+VCtfhOkDUFIv5ea7p4wuTomI4QTrXvFBX2S4jZsmyTSrStQl+E+4w+RzxA==}
engines: {node: '>=10.13.0'}