fix: Enable extending lintstagedrc.

This commit is contained in:
Sidharth Vinod 2022-11-22 23:05:27 +05:30
parent 5967289172
commit 009a32d20b
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD
4 changed files with 12 additions and 10 deletions

View File

@ -1,5 +0,0 @@
{
"!(docs/**/*)*.{ts,js,json,html,md,mts}": ["eslint --fix", "prettier --write"],
"cSpell.json": ["ts-node-esm scripts/fixCSpell.ts"],
"**/*.jison": ["pnpm run lint:jison"]
}

5
.lintstagedrc.mjs Normal file
View File

@ -0,0 +1,5 @@
export default {
'!(docs/**/*)*.{ts,js,json,html,md,mts}': ['eslint --fix', 'prettier --write'],
'cSpell.json': ['ts-node-esm scripts/fixCSpell.ts'],
'**/*.jison': ['pnpm -w run lint:jison'],
};

View File

@ -1,5 +0,0 @@
{
"src/docs/**": ["pnpm --filter mermaid run docs:build --git"],
"src/docs.mts": ["pnpm --filter mermaid run docs:build --git"],
"src/(defaultConfig|config|mermaidAPI).ts": ["pnpm --filter mermaid run docs:build --git"]
}

View File

@ -0,0 +1,7 @@
import baseConfig from '../../.lintstagedrc.mjs';
export default {
...baseConfig,
'src/docs/**': ['pnpm --filter mermaid run docs:build --git'],
'src/docs.mts': ['pnpm --filter mermaid run docs:build --git'],
'src/(defaultConfig|config|mermaidAPI).ts': ['pnpm --filter mermaid run docs:build --git'],
};