From 0f72ce750a0e508bd48346d86c5812e961aa2f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Fri, 22 Nov 2024 14:29:52 +0900 Subject: [PATCH] chore: create `lint-staged.config.js` (#166) --- .editorconfig-checker.json | 1 + lint-staged.config.js | 11 +++++++++++ package.json | 13 +------------ 3 files changed, 13 insertions(+), 12 deletions(-) create mode 100644 .editorconfig-checker.json create mode 100644 lint-staged.config.js diff --git a/.editorconfig-checker.json b/.editorconfig-checker.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/.editorconfig-checker.json @@ -0,0 +1 @@ +{} diff --git a/lint-staged.config.js b/lint-staged.config.js new file mode 100644 index 0000000..cc45385 --- /dev/null +++ b/lint-staged.config.js @@ -0,0 +1,11 @@ +module.exports = { + '*': [ + 'npx prettier --check', + 'npx editorconfig-checker -config .editorconfig-checker.json', + ], + '*.{js,jsx}': 'npx eslint', + '*.{css,scss}': 'npx stylelint', + '*.md': 'npx markdownlint', + 'src/docs/**/*.md': 'npx textlint -f pretty-error', + '*.{h,c,cpp}': 'npx clang-format -n -Werror', +}; diff --git a/package.json b/package.json index 95e3d04..bc6e229 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "lint-eslint": "npx eslint . --ext .js,.jsx", "lint-stylelint": "npx stylelint **/*.{css,scss}", "lint-prettier": "npx prettier . --check", - "lint-editorconfig": "npx editorconfig-checker", + "lint-editorconfig": "npx editorconfig-checker -config .editorconfig-checker.json", "lint-markdownlint": "npx markdownlint **/*.md", "lint-textlint": "npx textlint -f pretty-error src/docs", "lint-clangformat": "find . -name '*.h' -o -name '*.c' -o -name '*.cpp' -print0 | xargs -0 npx clang-format -n -Werror", @@ -57,16 +57,5 @@ "stylelint-config-standard-scss": "^13.1.0", "textlint": "^14.3.0", "textlint-rule-allowed-uris": "^1.0.5" - }, - "lint-staged": { - "*": [ - "npx prettier --check", - "npx editorconfig-checker" - ], - "*.{js,jsx}": "npx eslint", - "*.{css,scss}": "npx stylelint", - "*.md": "npx markdownlint", - "src/docs/**/*.md": "npx textlint -f pretty-error", - "*.{h,c,cpp}": "npx clang-format -n -Werror" } }