Browse Source

test: stylelint测试

lanjianrong 4 years ago
parent
commit
16955b6f9c
3 changed files with 7 additions and 7 deletions
  1. 3 3
      package.json
  2. 2 2
      src/components/Menu/index.module.scss
  3. 2 2
      src/pages/Login/index.module.scss

+ 3 - 3
package.json

@@ -13,14 +13,14 @@
     "lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx ./src && npm run lint:style",
     "lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx ./src && npm run lint:style",
     "lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx ./src",
     "lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx ./src",
     "lint:prettier": "prettier --check \"src/**/*\" --end-of-line auto",
     "lint:prettier": "prettier --check \"src/**/*\" --end-of-line auto",
-    "lint:style": "stylelint --fix \"src/**/*.less\" --syntax less",
+    "lint:style": "stylelint --fix \"src/**/*.scss\" --syntax scss",
     "precommit": "lint-staged",
     "precommit": "lint-staged",
     "prettier": "prettier -c --write \"src/**/*\""
     "prettier": "prettier -c --write \"src/**/*\""
   },
   },
   "lint-staged": {
   "lint-staged": {
-    "**/*.less": "stylelint --syntax less",
+    "**/*.scss": "stylelint --syntax scss",
     "**/*.{js,jsx,ts,tsx}": "npm run lint-staged:js",
     "**/*.{js,jsx,ts,tsx}": "npm run lint-staged:js",
-    "**/*.{js,jsx,tsx,ts,less,md,json}": [
+    "**/*.{js,jsx,tsx,ts,scss,md,json}": [
       "prettier --write"
       "prettier --write"
     ]
     ]
   },
   },

+ 2 - 2
src/components/Menu/index.module.scss

@@ -1,7 +1,7 @@
 .bottomBtn {
 .bottomBtn {
   height: 20px;
   height: 20px;
-  padding: 0px 8px;
+  padding: 0 8px;
+  margin-bottom: 3px;
   font-size: 12px;
   font-size: 12px;
   border-radius: 3px;
   border-radius: 3px;
-  margin-bottom: 3px;
 }
 }

+ 2 - 2
src/pages/Login/index.module.scss

@@ -2,8 +2,8 @@
   max-width: 400px;
   max-width: 400px;
   padding: 30px;
   padding: 30px;
   margin-left: 140px;
   margin-left: 140px;
-  background: #fff;
-  border: 1px solid #ddd;
+  background: #ffffff;
+  border: 1px solid #dddddd;
   border-radius: 0.25rem;
   border-radius: 0.25rem;
   h4 {
   h4 {
     margin-bottom: 1rem;
     margin-bottom: 1rem;