diff --git a/README.md b/README.md index 391fe26..71edf8a 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,10 @@ Install dependencies and run the dev server with Yarn: yarn install yarn dev +# check code before committing +yarn lint +yarn type-lint + # build the app yarn build ``` diff --git a/package.json b/package.json index 997849c..a5d8be9 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "build-only": "vite build", "type-check": "vue-tsc --build --force", "lint": "eslint . --fix", - "type-lint": "ts-standard", - "type-fix": "ts-standard --fix", + "type-lint": "vue-tsc --noEmit -p tsconfig.lint.json", + "type-fix": "ts-standard --fix --project tsconfig.lint.json", "format": "prettier --write src/ index.html .github/ .vscode/" }, "dependencies": { diff --git a/tsconfig.app.json b/tsconfig.app.json index aa075dd..c236105 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -12,6 +12,8 @@ "compilerOptions": { "composite": true, "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "strict": true, + "strictNullChecks": true, "baseUrl": ".", "paths": { "@/*": [ diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index bc7901d..c39706f 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -1,5 +1,4 @@ { - "extends": "./tsconfig.node.json", "include": [ "src/**/*.ts", "src/**/*.tsx", @@ -12,6 +11,14 @@ "node_modules" ], "compilerOptions": { - "lib": ["es2023"] + "target": "ES2022", + "lib": ["es2023"], + "module": "ESNext", + "moduleResolution": "Bundler", + "strict": true, + "strictNullChecks": true, + "esModuleInterop": true, + "skipLibCheck": true, + "types": ["node"] } } diff --git a/tsconfig.lint.json b/tsconfig.lint.json new file mode 100644 index 0000000..3870cd2 --- /dev/null +++ b/tsconfig.lint.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.app.json", + "include": [ + "env.d.ts", + "src/**/*", + "src/**/*.vue", + "eslint.config.mjs", + "vite.config.ts" + ], + "compilerOptions": { + "strict": true, + "strictNullChecks": true + } +} diff --git a/tsconfig.node.json b/tsconfig.node.json index 9d0a04e..a0d8ec1 100644 --- a/tsconfig.node.json +++ b/tsconfig.node.json @@ -1,5 +1,4 @@ { - "extends": "@tsconfig/node22/tsconfig.json", "include": [ "vite.config.*", "vitest.config.*", @@ -8,12 +7,17 @@ "playwright.config.*" ], "compilerOptions": { + "target": "ES2022", + "strict": true, + "strictNullChecks": true, + "esModuleInterop": true, + "skipLibCheck": true, + "moduleResolution": "Bundler", "composite": true, "noEmit": true, "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", "lib": ["es2023"], "module": "ESNext", - "moduleResolution": "Bundler", "types": [ "node" ]