From 315b660b4dd75a5cd08959d190fe6ad6cbbea90a Mon Sep 17 00:00:00 2001 From: nikogu <644506165@qq.com> Date: Wed, 13 Sep 2017 16:13:29 +0800 Subject: [PATCH] add style lint --- package.json | 7 +++++-- src/layouts/BasicLayout.less | 4 ++-- src/layouts/UserLayout.less | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4e43a268..7b5fd807 100755 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "scripts": { "start": "roadhog server", "build": "roadhog build", - "lint": "eslint --ext .js src mock tests", + "lint:style": "stylelint \"src/**/*.less\" --syntax less", + "lint": "eslint --ext .js src mock tests && npm run lint:style", "precommit": "npm run lint", "site": "roadhog-api-doc static", "test": "jest", @@ -49,7 +50,9 @@ "react-test-renderer": "^15.6.1", "redbox-react": "^1.3.2", "roadhog": "^1.0.2", - "roadhog-api-doc": "^0.1.5" + "roadhog-api-doc": "^0.1.5", + "stylelint": "^8.0.0", + "stylelint-config-standard": "^17.0.0" }, "babel": { "presets": [ diff --git a/src/layouts/BasicLayout.less b/src/layouts/BasicLayout.less index b3dc0393..72d722ef 100644 --- a/src/layouts/BasicLayout.less +++ b/src/layouts/BasicLayout.less @@ -12,7 +12,7 @@ line-height: 64px; padding-left: 32px; transition: all .3s; - background: #00284D; + background: #00284d; overflow: hidden; img { display: inline-block; @@ -25,7 +25,7 @@ vertical-align: middle; font-size: 22px; margin-left: 12px; - font-family: Lato,'Helvetica Neue',Arial,Helvetica,sans-serif; + font-family: Lato, 'Helvetica Neue', Arial, Helvetica, sans-serif; margin-top: -2px; } } diff --git a/src/layouts/UserLayout.less b/src/layouts/UserLayout.less index 7815b7e1..1a66afc5 100644 --- a/src/layouts/UserLayout.less +++ b/src/layouts/UserLayout.less @@ -33,7 +33,7 @@ .title { font-size: 33px; color: @heading-color; - font-family: Lato,'Helvetica Neue',Arial,Helvetica,sans-serif; + font-family: Lato, 'Helvetica Neue', Arial, Helvetica, sans-serif; position: relative; top: -2px; } -- GitLab