build(eslint): add tsconfig for all linted files

This commit is contained in:
Alois Klink
2024-06-28 22:59:03 +09:00
parent 14622b0386
commit 0ba712f53c
6 changed files with 48 additions and 2 deletions

View File

@@ -24,7 +24,12 @@ export default tseslint.config(
{ {
languageOptions: { languageOptions: {
parserOptions: { parserOptions: {
project: ['./tsconfig.eslint.json', './packages/*/tsconfig.json'], project: [
'./tsconfig.eslint.json',
'./packages/*/tsconfig.json',
'./packages/*/tsconfig.eslint.json',
'./packages/mermaid/src/docs/tsconfig.json',
],
tsconfigRootDir: import.meta.dirname, tsconfigRootDir: import.meta.dirname,
}, },
globals: { globals: {

View File

@@ -0,0 +1,11 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": ["./tsconfig.json"],
"compilerOptions": {
"noEmit": true
},
"include": [
"./src/**/*.spec.js",
"./src/**/*.spec.ts" // test files
]
}

View File

@@ -509,6 +509,7 @@ export const getGlobs = (globs: string[]): string[] => {
globs.push( globs.push(
'!**/.vitepress/**', '!**/.vitepress/**',
'!**/vite.config.ts', '!**/vite.config.ts',
'!**/tsconfig.json',
'!src/docs/index.md', '!src/docs/index.md',
'!**/package.json', '!**/package.json',
'!**/user-avatars/**' '!**/user-avatars/**'

View File

@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": ["../../../../tsconfig.json"],
"compilerOptions": {
"noEmit": true
},
"include": ["./**/*.ts", "./.vitepress/**/*.ts"]
}

View File

@@ -0,0 +1,20 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": ["./tsconfig.json"],
"compilerOptions": {
"noEmit": true
},
"include": [
"./src/**/*.spec.js",
"./src/**/*.spec.ts", // test files
"./scripts",
"./.lintstagedrc.mjs",
// These seem to be orphaned files
// Can we delete them?
"./src/dagre-wrapper/intersect.js",
"./src/dagre-wrapper/patterns.js",
"./src/diagrams/git/gitGraphRenderer-old.js",
"./src/diagrams/git/layout.js",
"./src/diagrams/git/mockDb.js"
]
}

View File

@@ -6,5 +6,6 @@
"noEmit": true, "noEmit": true,
"allowJs": true "allowJs": true
}, },
"include": [".build", "tests", "scripts", "cypress", "__mocks__", "demos/dev", "eslint.config.js"] "include": ["./.build/*.ts", "./.esbuild/*.ts", "./.vite/*.ts", "./cypress.config.ts", "./tests", "./scripts", "./cypress", "./__mocks__", "./demos/dev", "./vite.config.ts",
"./vitest.workspace.js", "eslint.config.js"]
} }