feat: husky for linting only staged code (#698)
This commit is contained in:
committed by
GitHub
parent
4ffde6bfcd
commit
5fdd17b63b
+4
-1
@@ -26,4 +26,7 @@ packages/server/reports*
|
||||
**/start/
|
||||
|
||||
# Profiler output
|
||||
events.json
|
||||
events.json
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
@@ -0,0 +1 @@
|
||||
_
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx lint-staged
|
||||
+4
-1
@@ -14,4 +14,7 @@ yarn.lock
|
||||
events.json
|
||||
|
||||
# Prettier doesn't understand the syntax inside the Yaml files, because of the brackets
|
||||
utils/helm/speckle-server/templates
|
||||
utils/helm/speckle-server/templates
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
Generated
+1325
-247
File diff suppressed because it is too large
Load Diff
+9
-6
@@ -11,15 +11,18 @@
|
||||
"docker:deps:up": "docker-compose -f ./docker-compose-deps.yml up -d",
|
||||
"docker:deps:down": "docker-compose -f ./docker-compose-deps.yml down",
|
||||
"dev": "lerna run dev --parallel",
|
||||
"dev:no-server": "npm run dev -- --ignore @speckle/server"
|
||||
"dev:no-server": "npm run dev -- --ignore @speckle/server",
|
||||
"prepare": "husky install",
|
||||
"postinstall": "husky install"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/eslint": "^8.4.1",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"eslint": "^8.11.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"husky": "^7.0.4",
|
||||
"lerna": "^3.22.1",
|
||||
"pre-commit": "^1.2.2",
|
||||
"lint-staged": "^12.3.7",
|
||||
"prettier": "^2.5.1"
|
||||
},
|
||||
"config": {
|
||||
@@ -27,8 +30,8 @@
|
||||
"path": "./node_modules/cz-conventional-changelog"
|
||||
}
|
||||
},
|
||||
"pre-commit": [
|
||||
"lint",
|
||||
"prettier:check"
|
||||
]
|
||||
"lint-staged": {
|
||||
"*.{js,ts,vue}": "eslint --cache --max-warnings=0",
|
||||
"*.**": "prettier --check --ignore-unknown"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user