diff --git a/templates/plate-playground-template/.eslintrc.js b/templates/plate-playground-template/.eslintrc.js index ab5dd5ccd4..db0f19178a 100644 --- a/templates/plate-playground-template/.eslintrc.js +++ b/templates/plate-playground-template/.eslintrc.js @@ -1,3 +1,4 @@ +const path = require('path'); const prettierConfig = require('./prettier.config.js'); module.exports = { @@ -11,7 +12,7 @@ module.exports = { plugins: ['tailwindcss', 'unused-imports', 'prettier'], rules: { '@next/next/no-html-link-for-pages': 'off', - 'prettier/prettier': ['warn', prettierConfig], + 'prettier/prettier': ['warn', { ...prettierConfig }], 'react/jsx-key': 'off', 'tailwindcss/classnames-order': 'warn', 'tailwindcss/no-custom-classname': 'error', @@ -30,7 +31,7 @@ module.exports = { settings: { tailwindcss: { callees: ['cn', 'cva', 'withCn'], - config: 'tailwind.config.js', + config: path.join(__dirname, './tailwind.config.js'), }, next: { rootDir: ['./'], diff --git a/templates/plate-playground-template/tsconfig.json b/templates/plate-playground-template/tsconfig.json index 7d6c87693b..b4e1596928 100644 --- a/templates/plate-playground-template/tsconfig.json +++ b/templates/plate-playground-template/tsconfig.json @@ -1,18 +1,45 @@ { "compilerOptions": { - "lib": ["dom", "dom.iterable", "esnext"], + "strict": false, + "strictNullChecks": true, + "allowUnusedLabels": false, + "allowUnreachableCode": false, + "exactOptionalPropertyTypes": false, + "noFallthroughCasesInSwitch": true, + "noImplicitOverride": true, + "noImplicitReturns": false, + "noPropertyAccessFromIndexSignature": false, + "noUncheckedIndexedAccess": false, + "noUnusedLocals": false, + "noUnusedParameters": false, + + "isolatedModules": true, + "allowJs": true, + "checkJs": false, + + "esModuleInterop": true, "skipLibCheck": true, - "strict": true, "forceConsistentCasingInFileNames": true, - "noEmit": true, - "incremental": true, - "esModuleInterop": true, + + "lib": ["dom", "dom.iterable", "esnext"], + "jsx": "preserve", "module": "esnext", - "moduleResolution": "node", + "target": "es2022", + "moduleResolution": "bundler", + "moduleDetection": "force", + "allowImportingTsExtensions": false, "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", + "noEmit": true, + "incremental": true, + "declaration": false, + "declarationMap": false, + "sourceMap": true, + "pretty": true, + "preserveWatchOutput": true, + + "tsBuildInfoFile": "tsconfig.tsbuildinfo", + "baseUrl": "src", "paths": { "@/*": ["./*"] @@ -21,10 +48,23 @@ { "name": "next" } - ], - "typeRoots": ["./node_modules/@types"], - "strictNullChecks": true + ] }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "include": [ + "next-env.d.ts", + ".next/types/**/*.ts", + "src/**/*.ts", + "src/**/*.tsx", + "src/**/*.cts", + "src/**/*.ctsx", + "src/**/*.mts", + "src/**/*.mtsx", + "src/**/*.js", + "src/**/*.jsx", + "src/**/*.cjs", + "src/**/*.cjsx", + "src/**/*.mjs", + "src/**/*.mjsx" + ], "exclude": ["node_modules"] } diff --git a/templates/plate-template/.eslintrc.js b/templates/plate-template/.eslintrc.js index ab5dd5ccd4..db0f19178a 100644 --- a/templates/plate-template/.eslintrc.js +++ b/templates/plate-template/.eslintrc.js @@ -1,3 +1,4 @@ +const path = require('path'); const prettierConfig = require('./prettier.config.js'); module.exports = { @@ -11,7 +12,7 @@ module.exports = { plugins: ['tailwindcss', 'unused-imports', 'prettier'], rules: { '@next/next/no-html-link-for-pages': 'off', - 'prettier/prettier': ['warn', prettierConfig], + 'prettier/prettier': ['warn', { ...prettierConfig }], 'react/jsx-key': 'off', 'tailwindcss/classnames-order': 'warn', 'tailwindcss/no-custom-classname': 'error', @@ -30,7 +31,7 @@ module.exports = { settings: { tailwindcss: { callees: ['cn', 'cva', 'withCn'], - config: 'tailwind.config.js', + config: path.join(__dirname, './tailwind.config.js'), }, next: { rootDir: ['./'], diff --git a/templates/plate-template/tsconfig.json b/templates/plate-template/tsconfig.json index 7d6c87693b..b4e1596928 100644 --- a/templates/plate-template/tsconfig.json +++ b/templates/plate-template/tsconfig.json @@ -1,18 +1,45 @@ { "compilerOptions": { - "lib": ["dom", "dom.iterable", "esnext"], + "strict": false, + "strictNullChecks": true, + "allowUnusedLabels": false, + "allowUnreachableCode": false, + "exactOptionalPropertyTypes": false, + "noFallthroughCasesInSwitch": true, + "noImplicitOverride": true, + "noImplicitReturns": false, + "noPropertyAccessFromIndexSignature": false, + "noUncheckedIndexedAccess": false, + "noUnusedLocals": false, + "noUnusedParameters": false, + + "isolatedModules": true, + "allowJs": true, + "checkJs": false, + + "esModuleInterop": true, "skipLibCheck": true, - "strict": true, "forceConsistentCasingInFileNames": true, - "noEmit": true, - "incremental": true, - "esModuleInterop": true, + + "lib": ["dom", "dom.iterable", "esnext"], + "jsx": "preserve", "module": "esnext", - "moduleResolution": "node", + "target": "es2022", + "moduleResolution": "bundler", + "moduleDetection": "force", + "allowImportingTsExtensions": false, "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", + "noEmit": true, + "incremental": true, + "declaration": false, + "declarationMap": false, + "sourceMap": true, + "pretty": true, + "preserveWatchOutput": true, + + "tsBuildInfoFile": "tsconfig.tsbuildinfo", + "baseUrl": "src", "paths": { "@/*": ["./*"] @@ -21,10 +48,23 @@ { "name": "next" } - ], - "typeRoots": ["./node_modules/@types"], - "strictNullChecks": true + ] }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "include": [ + "next-env.d.ts", + ".next/types/**/*.ts", + "src/**/*.ts", + "src/**/*.tsx", + "src/**/*.cts", + "src/**/*.ctsx", + "src/**/*.mts", + "src/**/*.mtsx", + "src/**/*.js", + "src/**/*.jsx", + "src/**/*.cjs", + "src/**/*.cjsx", + "src/**/*.mjs", + "src/**/*.mjsx" + ], "exclude": ["node_modules"] }