From 93d1e8dc585068edaa5639a3559d3fb57bc720cb Mon Sep 17 00:00:00 2001 From: Maximilian Franzke Date: Thu, 25 Jul 2024 23:50:11 +0200 Subject: [PATCH] refactor: moved those config files --- .commitlintrc.json => .config/.commitlintrc.json | 0 .jscpd.json => .config/.jscpd.json | 0 .lintstagedrc.js => .config/.lintstagedrc.js | 2 +- .markdown-lint.yml => .config/.markdown-lint.yml | 0 .husky/commit-msg | 2 +- .husky/pre-commit | 2 +- package.json | 4 ++-- 7 files changed, 5 insertions(+), 5 deletions(-) rename .commitlintrc.json => .config/.commitlintrc.json (100%) rename .jscpd.json => .config/.jscpd.json (100%) rename .lintstagedrc.js => .config/.lintstagedrc.js (68%) rename .markdown-lint.yml => .config/.markdown-lint.yml (100%) diff --git a/.commitlintrc.json b/.config/.commitlintrc.json similarity index 100% rename from .commitlintrc.json rename to .config/.commitlintrc.json diff --git a/.jscpd.json b/.config/.jscpd.json similarity index 100% rename from .jscpd.json rename to .config/.jscpd.json diff --git a/.lintstagedrc.js b/.config/.lintstagedrc.js similarity index 68% rename from .lintstagedrc.js rename to .config/.lintstagedrc.js index 667e8e750dc..3a6fa02b1ec 100644 --- a/.lintstagedrc.js +++ b/.config/.lintstagedrc.js @@ -1,5 +1,5 @@ export default { - '*.md': 'markdownlint -c .markdown-lint.yml', + '*.md': 'markdownlint -c .config/.markdown-lint.yml', '*.{css,scss}': 'stylelint --fix --allow-empty-input', '*.{js,ts,tsx,jsx,mjs,cjs}': ['xo --fix'] }; diff --git a/.markdown-lint.yml b/.config/.markdown-lint.yml similarity index 100% rename from .markdown-lint.yml rename to .config/.markdown-lint.yml diff --git a/.husky/commit-msg b/.husky/commit-msg index 284b65c58b7..22a940267cd 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1 +1 @@ -commitlint --edit "$1" +commitlint --edit "$1" --config .config/.commitlintrc.json diff --git a/.husky/pre-commit b/.husky/pre-commit index 8ad80db40d0..19c87ca767e 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,6 +1,6 @@ validate-branch-name node scripts/check-commit-mail.js -lint-staged --config ./.lintstagedrc.js +lint-staged --config .config/.lintstagedrc.js prettier $(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g') --write --ignore-unknown git update-index --again npm run lint:jscpd diff --git a/package.json b/package.json index 6cbd3fd336b..46ae94cb901 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "dev": "npm run dev --workspace=scripts", "generate:component": "npm run generate:component --workspace=@db-ui/components", "lint": "npm-run-all -p lint:*", - "lint:jscpd": "jscpd --exitCode 1 .", - "lint:markdownlint": "markdownlint -c .markdown-lint.yml **/*.md", + "lint:jscpd": "jscpd . --exitCode 1 --config .config/.jscpd.json", + "lint:markdownlint": "markdownlint -c .config/.markdown-lint.yml **/*.md", "lint:stylelint": "stylelint **/*.scss", "lint:xo": "cross-env TIMING=1 NODE_OPTIONS=\"--max-old-space-size=4096\" xo", "prepare": "husky",