diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 00000000..e49d971d --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npm run prettier diff --git a/.lintstagedrc.json b/.lintstagedrc.json new file mode 100644 index 00000000..89b77a3f --- /dev/null +++ b/.lintstagedrc.json @@ -0,0 +1,3 @@ +{ + "*.{js,json,md,sol,ts,yml}": ["npm run prettier -- --write", "git add"] +} diff --git a/commitlint.config.js b/commitlint.config.js index b836a716..548f121e 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,7 +1,6 @@ module.exports = { - extends: ['@commitlint/config-conventional'], - rules: { - 'type-enum': [2, 'always', ['ci', 'chore', 'docs', 'ticket', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style']], - }, - }; - \ No newline at end of file + extends: ["@commitlint/config-conventional"], + rules: { + "type-enum": [2, "always", ["ci", "chore", "docs", "ticket", "feat", "fix", "perf", "refactor", "revert", "style"]], + }, +};