Skip to content

Commit

Permalink
config
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeyens committed Aug 30, 2024
1 parent 0da819f commit 949a602
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 28 deletions.
5 changes: 3 additions & 2 deletions templates/plate-playground-template/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const path = require('path');
const prettierConfig = require('./prettier.config.js');

module.exports = {
Expand All @@ -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',
Expand All @@ -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: ['./'],
Expand Down
64 changes: 52 additions & 12 deletions templates/plate-playground-template/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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": {
"@/*": ["./*"]
Expand All @@ -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"]
}
5 changes: 3 additions & 2 deletions templates/plate-template/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const path = require('path');
const prettierConfig = require('./prettier.config.js');

module.exports = {
Expand All @@ -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',
Expand All @@ -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: ['./'],
Expand Down
64 changes: 52 additions & 12 deletions templates/plate-template/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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": {
"@/*": ["./*"]
Expand All @@ -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"]
}

0 comments on commit 949a602

Please sign in to comment.