Skip to content

Commit

Permalink
chore: create lint-staged.config.js (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
lumirlumir authored Nov 22, 2024
1 parent 874cd25 commit 0f72ce7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions .editorconfig-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
11 changes: 11 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -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',
};
13 changes: 1 addition & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
}
}

0 comments on commit 0f72ce7

Please sign in to comment.