mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 06:19:24 +02:00
build(eslint): add tsconfig for all linted files
This commit is contained in:
@@ -24,7 +24,12 @@ export default tseslint.config(
|
||||
{
|
||||
languageOptions: {
|
||||
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,
|
||||
},
|
||||
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(
|
||||
'!**/.vitepress/**',
|
||||
'!**/vite.config.ts',
|
||||
'!**/tsconfig.json',
|
||||
'!src/docs/index.md',
|
||||
'!**/package.json',
|
||||
'!**/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,
|
||||
"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