Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 0658294

Browse files
committed
Merge branch 'staging' into develop
2 parents 53c2571 + 0d419c4 commit 0658294

File tree

3 files changed

+161
-339
lines changed

3 files changed

+161
-339
lines changed

lefthook.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# https://github.com/Arkweid/lefthook/blob/master/docs/full_guide.md
2+
3+
pre-commit:
4+
parallel: true
5+
commands:
6+
eslint:
7+
glob: '*.{js,jsx,ts,tsx}'
8+
run: npx eslint --config=.eslintrc.js --fix {staged_files}
9+
stylelint:
10+
glob: '*.{css,scss}'
11+
run: npx stylelint --config=stylelint.config.js --fix {staged_files}
12+
prettier:
13+
glob: '*.{md,html,json,yml}'
14+
run: npx prettier --config=prettier.config.js --write {staged_files}

package.json

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"dev": "yarn clean && next dev",
2525
"develop": "yarn dev",
2626
"export": "next export",
27-
"format": "npx prettier --config=prettier.config.js '**/*.{js,jsx,ts,tsx,md,html,css,scss,json}' --write || true",
27+
"format": "npx prettier --config=prettier.config.js '**/*.{js,jsx,ts,tsx,md,html,css,scss,json,yml}' --write || true",
2828
"lint": "yarn format && yarn lint:js && yarn lint:css",
2929
"lint:css": "npx stylelint --config=stylelint.config.js '**/*.css' --fix || true",
3030
"lint:js": "npx eslint --config=.eslintrc.js ./ --fix || true",
@@ -39,12 +39,13 @@
3939
},
4040
"devDependencies": {
4141
"@apollo/client": "^3.3.8",
42+
"@arkweid/lefthook": "^0.7.2",
4243
"@babel/core": "^7.12.13",
4344
"@storybook/addon-a11y": "^6.1.17",
4445
"@storybook/addon-essentials": "^6.1.17",
4546
"@storybook/addon-links": "^6.1.17",
4647
"@storybook/react": "^6.1.17",
47-
"algoliasearch": "^4.8.4",
48+
"algoliasearch": "^4.8.5",
4849
"apollo-link-rest": "^0.8.0-beta.0",
4950
"babel-loader": "^8.2.2",
5051
"chromatic": "^5.6.1",
@@ -62,10 +63,8 @@
6263
"graphql": "^15.5.0",
6364
"graphql-anywhere": "^4.2.7",
6465
"hamburger-react": "^2.4.0",
65-
"husky": "^4.3.8",
66-
"lint-staged": "^10.5.4",
6766
"next-seo": "^4.19.0",
68-
"next-sitemap": "^1.4.17",
67+
"next-sitemap": "^1.4.19",
6968
"postcss-flexbugs-fixes": "^4.2.1",
7069
"postcss-preset-env": "^6.7.0",
7170
"prettier": "^2.2.1",
@@ -74,21 +73,11 @@
7473
"react-is": "^17.0.1",
7574
"react-syntax-highlighter": "^15.4.3",
7675
"react-twitter-embed": "^3.0.3",
77-
"storybook-addon-next-router": "^2.0.0",
76+
"storybook-addon-next-router": "^2.0.4",
7877
"storybook-css-modules-preset": "^1.0.5",
7978
"stylelint": "^13.9.0",
8079
"stylelint-config-standard": "^20.0.0",
8180
"tailwindcss": "npm:@tailwindcss/postcss7-compat",
8281
"yup": "^0.32.8"
83-
},
84-
"husky": {
85-
"hooks": {
86-
"pre-commit": "lint-staged"
87-
}
88-
},
89-
"lint-staged": {
90-
"*.{js,jsx,ts,tsx}": "npx eslint --config=.eslintrc.js --fix",
91-
"*.{css,scss}": "npx stylelint --config=stylelint.config.js --fix",
92-
"*.{md,html,json}": "npx prettier --config=prettier.config.js --write"
9382
}
9483
}

0 commit comments

Comments
 (0)