diff --git a/.prettierrc b/.prettierrc index e40e621..36301bc 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,6 +1,5 @@ { "semi": false, "singleQuote": true, - "trailingComma": "es5", - "tabWidth": 2 + "trailingComma": "es5" } diff --git a/.stylelintrc b/.stylelintrc index d329a86..53400a9 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -1,6 +1,7 @@ { "extends": [ - "stylelint-config-standard" + "stylelint-config-standard", + "./node_modules/prettier-stylelint/config.js" ], "syntax": "scss", "rules": { diff --git a/package.json b/package.json index 8ba67ca..fb5389b 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "build": "gatsby build", "start": "gatsby develop", "format": "prettier --write 'src/**/*.{js,jsx}'", + "format:css": "prettier-stylelint --write --quiet 'src/**/*.{css,scss}'", "test": "npm run lint", "deploy": "./deploy.sh" }, @@ -50,6 +51,7 @@ "eslint-plugin-prettier": "^2.6.0", "eslint-plugin-react": "^7.8.1", "prettier": "^1.12.1", + "prettier-stylelint": "^0.4.2", "stylelint": "^9.2.0", "stylelint-config-standard": "^18.2.0" }, diff --git a/src/components/molecules/Availability.scss b/src/components/molecules/Availability.scss index d219248..7d1acc3 100644 --- a/src/components/molecules/Availability.scss +++ b/src/components/molecules/Availability.scss @@ -14,7 +14,9 @@ color: $text-color-light--dark; } - p { margin-bottom: 0; } + p { + margin-bottom: 0; + } &.available { background: rgba($brand-light, .8); diff --git a/src/components/molecules/ThemeSwitch.scss b/src/components/molecules/ThemeSwitch.scss index c3b5526..65f40bd 100644 --- a/src/components/molecules/ThemeSwitch.scss +++ b/src/components/molecules/ThemeSwitch.scss @@ -73,7 +73,7 @@ $knob-space: 1px; opacity: .8; } - [type="checkbox"], + [type='checkbox'], .checkbox__label { width: 1px; height: 1px; @@ -85,7 +85,7 @@ $knob-space: 1px; position: absolute; } - [type="checkbox"] { + [type='checkbox'] { &:checked { + .checkbox__faux-container { .checkbox__faux {