mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-29 13:16:40 +02:00
build(eslint): add tsconfig for all linted files
This commit is contained in:
@@ -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: {
|
||||||
|
11
packages/mermaid-example-diagram/tsconfig.eslint.json
Normal file
11
packages/mermaid-example-diagram/tsconfig.eslint.json
Normal 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
|
||||||
|
]
|
||||||
|
}
|
@@ -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/**'
|
||||||
|
8
packages/mermaid/src/docs/tsconfig.json
Normal file
8
packages/mermaid/src/docs/tsconfig.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/tsconfig",
|
||||||
|
"extends": ["../../../../tsconfig.json"],
|
||||||
|
"compilerOptions": {
|
||||||
|
"noEmit": true
|
||||||
|
},
|
||||||
|
"include": ["./**/*.ts", "./.vitepress/**/*.ts"]
|
||||||
|
}
|
20
packages/mermaid/tsconfig.eslint.json
Normal file
20
packages/mermaid/tsconfig.eslint.json
Normal 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"
|
||||||
|
]
|
||||||
|
}
|
@@ -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"]
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user