feat: add husky, commit linting

This commit is contained in:
Sergey Krylov 2024-03-29 07:17:18 +03:00
parent bbdeac1013
commit af768b871c
7 changed files with 1519 additions and 177 deletions

3
.commitlintrc Normal file
View File

@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}

1
.husky/commit-msg Normal file
View File

@ -0,0 +1 @@
npx --no -- commitlint --edit $1

1
.husky/pre-commit Normal file
View File

@ -0,0 +1 @@
npx lint-staged

3
.lintstagedrc Normal file
View File

@ -0,0 +1,3 @@
{
"*.[j|t]s": "eslint"
}

8
.versionrc Normal file
View File

@ -0,0 +1,8 @@
{
"header": "# ksv741 React Scripts",
"releaseCommitMessageFormat": "build: v{{currentTag}}",
"types": [
{"type": "feat", "section": "🚀 New Features"},
{"type": "fix", "section": "\uD83D\uDEE0\uFE0F Bug Fixes"}
]
}

View File

@ -16,11 +16,10 @@
"scripts": { "scripts": {
"prepare": "rm -rf dist && tsc && tsc-alias", "prepare": "rm -rf dist && tsc && tsc-alias",
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
"lint": "eslint --ignore-pattern node_modules --color src" "lint": "eslint --ignore-pattern node_modules --color src",
}, "release": "standard-version"
"bin": {
"ksv741-react-scripts": "./bin/scripts.js"
}, },
"bin": "./bin/scripts.js",
"engines": { "engines": {
"node": ">16" "node": ">16"
}, },
@ -86,19 +85,25 @@
"webpack-dev-server": "5.0.0" "webpack-dev-server": "5.0.0"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^19.2.1",
"@commitlint/config-conventional": "^19.1.0",
"eslint": "8.57.0", "eslint": "8.57.0",
"eslint-config-ksv741": "0.0.1" "eslint-config-ksv741": "0.0.1",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"standard-version": "^9.5.0"
}, },
"peerDependencies": { "peerDependencies": {
"eslint": ">8.0.0", "eslint": ">8.0.0",
"typescript": "^3.6.0" "typescript": "^3.6.0"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {
"typescript": {
"optional": true
},
"eslint": { "eslint": {
"optional": true "optional": true
},
"typescript": {
"optional": true
} }
} },
"packageManager": "yarn@1.22.19"
} }

1657
yarn.lock

File diff suppressed because it is too large Load Diff