diff --git a/.eslintignore b/.eslintignore index 31f7195..2b51543 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,6 +4,7 @@ # Except...: !resources/ !package.json +!tsconfig.app.json !tsconfig.json !tsconfig.node.json !vite.config.ts diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 441d5a3..e95b02b 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -11,7 +11,7 @@ module.exports = { ], parser: "@typescript-eslint/parser", parserOptions: { - project: ["./tsconfig.json", "./tsconfig.node.json"], + project: ["./tsconfig.json", "./tsconfig.app.json", "./tsconfig.node.json"], tsconfigRootDir: __dirname, }, plugins: ["import"], diff --git a/.prettierignore b/.prettierignore index 6d5b68f..5df7e04 100644 --- a/.prettierignore +++ b/.prettierignore @@ -5,6 +5,7 @@ !resources/ !.eslintrc.cjs !package.json +!tsconfig.app.json !tsconfig.json !tsconfig.node.json !vite.config.ts diff --git a/tsconfig.app.json b/tsconfig.app.json new file mode 100644 index 0000000..71bd64e --- /dev/null +++ b/tsconfig.app.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "target": "ESNext", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ESNext", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + + /* Absolute imports */ + "paths": { + "@/*": ["./resources/js/*"] + }, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["resources/js"] +} diff --git a/tsconfig.json b/tsconfig.json index 48e2d0a..ce1c024 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,29 +1,11 @@ { - "compilerOptions": { - "target": "ESNext", - "useDefineForClassFields": true, - "module": "ESNext", - "lib": ["ESNext", "DOM", "DOM.Iterable"], - "skipLibCheck": true, - - /* Bundler mode */ - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - - /* Absolute imports */ - "paths": { - "@/*": ["./resources/js/*"] + "files": [], + "references": [ + { + "path": "./tsconfig.app.json" }, - - /* Linting */ - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true - }, - "include": ["resources/js"], - "references": [{ "path": "./tsconfig.node.json" }] + { + "path": "./tsconfig.node.json" + }, + ] } diff --git a/tsconfig.node.json b/tsconfig.node.json index 97ede7e..911f07c 100644 --- a/tsconfig.node.json +++ b/tsconfig.node.json @@ -4,6 +4,7 @@ "skipLibCheck": true, "module": "ESNext", "moduleResolution": "bundler", + "noEmit": true, "allowSyntheticDefaultImports": true, "strict": true },