wickes-css2 2.103.0-IC-976-pre-commit-lint.9 → 2.103.0-IC-976-pre-commit-lint.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/Readme.md +5 -0
  2. package/package.json +17 -2
package/Readme.md CHANGED
@@ -279,3 +279,8 @@ For activation sticky functionality in checkout-right-aside, please do next step
279
279
  1) please wrap right aside content by <div class=“right-aside-sticky”></div>;
280
280
  2) if page contains "recently viewed" component, please wrap it by <div class="footer_sticky-right-aside">
281
281
 
282
+ ## Husky pre-commit lint
283
+ To configure pre-commit lint run:
284
+ ```
285
+ yarn setup:husky
286
+ ```
package/package.json CHANGED
@@ -1,11 +1,23 @@
1
1
  {
2
2
  "name": "wickes-css2",
3
- "version": "2.103.0-IC-976-pre-commit-lint.9",
3
+ "version": "2.103.0-IC-976-pre-commit-lint.11",
4
4
  "description": "CSS and JS and page templates in use by Wickes",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "lint:fix": "sass-lint-auto-fix",
8
- "build": "gulp build"
8
+ "build": "gulp build",
9
+ "prepare": "husky install",
10
+ "setup:husky": "yarn prepare && npx husky add .husky/pre-commit \"yarn lint-staged\" && git add .husky/pre-commit"
11
+ },
12
+ "lint-staged": {
13
+ "src/js/**/*.js": [
14
+ "eslint --fix",
15
+ "prettier --write"
16
+ ],
17
+ "src/scss/**/*.{scss,css}": [
18
+ "prettier --write",
19
+ "sass-lint-auto-fix"
20
+ ]
9
21
  },
10
22
  "keywords": [
11
23
  "css",
@@ -48,11 +60,14 @@
48
60
  "gulp-uglify": "^3.0.2",
49
61
  "gulp-watch": "^5.0.0",
50
62
  "handlebars-layouts": "^3.1.4",
63
+ "husky": "8.0.3",
64
+ "lint-staged": "13.2.3",
51
65
  "mocha": "^6.2.2",
52
66
  "node-sass": "^4.0.0",
53
67
  "postcss": "^8.4.16",
54
68
  "postcss-combine-duplicated-selectors": "^10.0.3",
55
69
  "postcss-combine-media-query": "^1.0.1",
70
+ "prettier": "^3.7.4",
56
71
  "pug": "2.0.4",
57
72
  "sass": "^1.54.9",
58
73
  "sass-lint-auto-fix": "^0.21.2",