mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-29 04:55:12 +02: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:
@@ -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