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",