Skip to content

Commit

Permalink
⬆️ Upgrade husky and eslint-config-prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
hans-lizihan committed Mar 31, 2021
1 parent 3435368 commit 66edaec
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 15 deletions.
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

lint-staged
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn test
2 changes: 1 addition & 1 deletion client/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
jest: true,
},

extends: ['airbnb', 'prettier', 'prettier/react'],
extends: ['airbnb', 'prettier'],

parserOptions: {
ecmaVersion: 2018,
Expand Down
14 changes: 4 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,15 @@
"build:clean": "rm -rf ./static ./dist",
"dev:server": "nodemon example.js",
"dev:client": "NODE_ENV=development webpack-dev-server --hot --client-log-level warning --progress --port 4888",
"test": "NODE_ENV=test jest --coverage --collectCoverageFrom=**/*.{js,jsx}"
"test": "NODE_ENV=test jest --coverage --collectCoverageFrom=**/*.{js,jsx}",
"prepare": "husky install"
},
"lint-staged": {
"*.{js,jsx}": [
"prettier --write",
"eslint --fix"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-push": "yarn test"
}
},
"dependencies": {
"body-parser": "^1.19.0",
"express": "4.17.1",
Expand Down Expand Up @@ -76,13 +70,13 @@
"enzyme-to-json": "3.6.1",
"eslint": "7.23.0",
"eslint-config-airbnb": "18.2.1",
"eslint-config-prettier": "7.2.0",
"eslint-config-prettier": "8.1.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsx-a11y": "6.4.1",
"eslint-plugin-prettier": "3.3.1",
"eslint-plugin-react": "7.23.1",
"eslint-plugin-react-hooks": "4.2.0",
"husky": "6.0.0",
"husky": "^6.0.0",
"jest": "26.6.3",
"lint-staged": "10.5.4",
"nodemon": "2.0.7",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4680,10 +4680,10 @@ [email protected]:
object.assign "^4.1.2"
object.entries "^1.1.2"

eslint-config-prettier@7.2.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz#f4a4bd2832e810e8cc7c1411ec85b3e85c0c53f9"
integrity sha512-rV4Qu0C3nfJKPOAhFujFxB7RMP+URFyQqqOZW9DMRD7ZDTFyjaIlETU3xzHELt++4ugC0+Jm084HQYkkJe+Ivg==
eslint-config-prettier@8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.1.0.tgz#4ef1eaf97afe5176e6a75ddfb57c335121abc5a6"
integrity sha512-oKMhGv3ihGbCIimCAjqkdzx2Q+jthoqnXSP+d86M9tptwugycmTFdVR4IpLgq2c4SHifbwO90z2fQ8/Aio73yw==

eslint-import-resolver-node@^0.3.4:
version "0.3.4"
Expand Down

0 comments on commit 66edaec

Please sign in to comment.