Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm exec lint-staged
12 changes: 6 additions & 6 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,21 @@ export default tseslint.config(
"warn",
{ allowConstantExport: true },
],
// All of these overrides ease getting into
// TypeScript, and can be removed for stricter
// linting down the line.
// Several rules below are relaxed to ease getting into
// TypeScript, and can be tightened for stricter linting
// down the line.

// Only warn on unused variables, and ignore variables starting with `_`
"@typescript-eslint/no-unused-vars": [
"warn",
{ varsIgnorePattern: "^_", argsIgnorePattern: "^_" },
],

// Allow escaping the compiler
// Disallow escaping the compiler (@ts-ignore / @ts-nocheck etc.)
"@typescript-eslint/ban-ts-comment": "error",

// Allow explicit `any`s
"@typescript-eslint/no-explicit-any": "off",
// Disallow explicit `any` β€” prefer `unknown` or a precise type
"@typescript-eslint/no-explicit-any": "error",

// START: Allow implicit `any`s
"@typescript-eslint/no-unsafe-argument": "off",
Expand Down
16 changes: 16 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Lint only β€” never a formatter (auto-formatting churns untouched lines).
// Returning an array runs each command verbatim, without the staged filenames
// appended: `tsc -b` type-checks the whole project (build mode rejects file
// args), while eslint lints only staged files. `--no-warn-ignored` skips
// eslint-ignored files instead of failing. Each filename is quoted, and `--`
// ends eslint option parsing, so names with spaces or a leading `-` survive.
// https://github.com/lint-staged/lint-staged#example-run-tsc-on-changes-to-typescript-files-but-do-not-pass-any-filename-arguments
export default {
"*.{ts,tsx}": (stagedFiles) => {
const files = stagedFiles.map((file) => JSON.stringify(file)).join(" ");
return [
`eslint --max-warnings 0 --no-warn-ignored -- ${files}`,
"tsc -b",
];
},
};
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
"type": "module",
"scripts": {
"init": "pnpm install && ([ -f .env.local ] || cp .env.example .env.local) && convex login && convex dev --once && claude ${RUNNING_IN_CONTAINER:+--dangerously-skip-permissions} '/init-app'",
"dev": "npm-run-all --parallel dev:frontend dev:backend",
"dev": "run-p dev:frontend dev:backend",
"dev:frontend": "vite --open",
"dev:backend": "convex dev",
"build": "tsc -b && vite build",
"lint": "tsc -b && eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint": "tsc -b && eslint . --report-unused-disable-directives --max-warnings 0",
"test": "vitest run",
"test:watch": "vitest",
"format": "prettier --write .",
"preview": "vite preview"
"preview": "vite preview",
"prepare": "husky"
},
"dependencies": {
"@clerk/clerk-react": "^5.61.3",
Expand Down Expand Up @@ -53,7 +54,9 @@
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-refresh": "^0.5.2",
"globals": "^17.6.0",
"npm-run-all": "^4.1.5",
"husky": "^9.1.7",
"lint-staged": "16.4.0",
"npm-run-all2": "8.0.4",
"prettier": "^3.8.3",
"tailwindcss": "^4.3.0",
"typescript": "~5.9.3",
Expand Down
Loading
Loading