mirror of
https://github.com/affaan-m/ECC.git
synced 2026-10-26 18:35:05 +00:00
fix(config-protection): cover the TypeScript and ESM config variants
Stylelint resolves stylelint.config.{ts,mts,cts} through cosmiconfig and
markdownlint reads .markdownlint.{cjs,mjs}; both were still editable while the
hook was active.
This commit is contained in:
1 parent
9a44131a1a
commit
e19e74a7fc
2 files changed
+10
No files matched your search
@@ -67,10 +67,15 @@ const PROTECTED_FILES = new Set([
|
||||
'stylelint.config.js',
|
||||
'stylelint.config.cjs',
|
||||
'stylelint.config.mjs',
|
||||
'stylelint.config.ts',
|
||||
'stylelint.config.mts',
|
||||
'stylelint.config.cts',
|
||||
'.markdownlint.json',
|
||||
'.markdownlint.jsonc',
|
||||
'.markdownlint.yaml',
|
||||
'.markdownlint.yml',
|
||||
'.markdownlint.cjs',
|
||||
'.markdownlint.mjs',
|
||||
'.markdownlintrc',
|
||||
// markdownlint-cli2 reads its own config names, not `.markdownlint.*`.
|
||||
'.markdownlint-cli2.jsonc',
|
||||
|
||||
@@ -374,8 +374,13 @@ function runTests() {
|
||||
for (const name of [
|
||||
'stylelint.config.js',
|
||||
'stylelint.config.mjs',
|
||||
'stylelint.config.ts',
|
||||
'stylelint.config.mts',
|
||||
'stylelint.config.cts',
|
||||
'.stylelintrc.js',
|
||||
'.markdownlint.jsonc',
|
||||
'.markdownlint.cjs',
|
||||
'.markdownlint.mjs',
|
||||
'.markdownlint-cli2.jsonc'
|
||||
]) {
|
||||
const absPath = path.join(tmpDir, name);
|
||||
|
||||
Reference in new issue
Block a user