Showing
3 changed files
with
17 additions
and
5 deletions
@@ -15,10 +15,20 @@ | @@ -15,10 +15,20 @@ | ||
15 | "build:dll": "webpack --config ./public/build/webpack.dll.indexcss.config.js", | 15 | "build:dll": "webpack --config ./public/build/webpack.dll.indexcss.config.js", |
16 | "build": "webpack --config ./public/build/webpack.dll.indexcss.config.js && webpack --config ./public/build/webpack.prod.config.js", | 16 | "build": "webpack --config ./public/build/webpack.dll.indexcss.config.js && webpack --config ./public/build/webpack.prod.config.js", |
17 | "debug": "DEBUG=\"express:*\" nodemon -e js,hbs -i public/ app.js", | 17 | "debug": "DEBUG=\"express:*\" nodemon -e js,hbs -i public/ app.js", |
18 | - "lint-js": "lint-js", | ||
19 | - "lint-css": "lint-css", | ||
20 | - "lint-all": "lint-all", | ||
21 | - "precommit": "lint-commit" | 18 | + "lint-css": "stylelint -s scss --cache --custom-formatter ./node_modules/stylelint-formatter-table ./**/*.{scss,css,vue}", |
19 | + "lint-js": "eslint --ext .js,.vue --cache --format table .", | ||
20 | + "lint-all": "echo \"JS: \";npm run -s lint-js;echo \"CSS: \";npm run -s lint-css", | ||
21 | + "precommit": "lint-staged" | ||
22 | + }, | ||
23 | + "lint-staged": { | ||
24 | + "*.{js,vue}": [ | ||
25 | + "npm run lint-js -- --fix", | ||
26 | + "git add" | ||
27 | + ], | ||
28 | + "*.{scss,css,vue}": [ | ||
29 | + "npm run lint-css -- --fix", | ||
30 | + "git add" | ||
31 | + ] | ||
22 | }, | 32 | }, |
23 | "config": { | 33 | "config": { |
24 | "lintJs": [ | 34 | "lintJs": [ |
@@ -98,6 +108,7 @@ | @@ -98,6 +108,7 @@ | ||
98 | "husky": "^0.14.3", | 108 | "husky": "^0.14.3", |
99 | "intersection-observer": "^0.5.0", | 109 | "intersection-observer": "^0.5.0", |
100 | "jquery-lazyload": "^1.9.7", | 110 | "jquery-lazyload": "^1.9.7", |
111 | + "lint-staged": "^7.0.4", | ||
101 | "lozad": "^1.0.9", | 112 | "lozad": "^1.0.9", |
102 | "nodemon": "^1.14.10", | 113 | "nodemon": "^1.14.10", |
103 | "postcss": "^6.0.16", | 114 | "postcss": "^6.0.16", |
@@ -140,7 +151,6 @@ | @@ -140,7 +151,6 @@ | ||
140 | "yoho-jquery": "^2.2.4", | 151 | "yoho-jquery": "^2.2.4", |
141 | "yoho-jquery-lazyload": "^1.9.12", | 152 | "yoho-jquery-lazyload": "^1.9.12", |
142 | "yoho-jquery-qrcode": "^0.14.0", | 153 | "yoho-jquery-qrcode": "^0.14.0", |
143 | - "yoho-lint": "^1.0.2", | ||
144 | "yoho-qs": "^1.0.1", | 154 | "yoho-qs": "^1.0.1", |
145 | "yoho-swiper": "^3.3.2", | 155 | "yoho-swiper": "^3.3.2", |
146 | "yoho-swiper2": "0.0.5" | 156 | "yoho-swiper2": "0.0.5" |
-
Please register or login to post a comment