From c077e5e2f0dda7a21ed3e300705182cd1d281789 Mon Sep 17 00:00:00 2001 From: Sasha Date: Mon, 9 Sep 2019 15:16:02 +0300 Subject: [PATCH] add stylelint --- .stylelintrc.json | 39 +++++++++++++-------------------------- CHANGELOG.md | 3 ++- package.json | 2 ++ 3 files changed, 17 insertions(+), 27 deletions(-) diff --git a/.stylelintrc.json b/.stylelintrc.json index 82dae57a..f29a800e 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,6 +1,7 @@ { "extends": [ - "stylelint-config-standard" + "stylelint-config-standard", + "stylelint-config-prettier" ], "fix": true, "formatter": "verbose", @@ -8,34 +9,20 @@ "stylelint-scss" ], "rules": { - "selector-list-comma-newline-after": "always", - "selector-type-case": "lower", + "indentation": 2, + "selector-list-comma-newline-after": "never-multi-line", + "rule-empty-line-before": "always", + "at-rule-whitelist": ["include", "import", "keyframes", "mixin", "extend"], "at-rule-no-unknown": null, "scss/at-rule-no-unknown": true, "declaration-empty-line-before": "never", - "rule-empty-line-before": [ "always-multi-line", { - "except": ["inside-block"], - "ignore": ["after-comment"] - }], - "no-descending-specificity": true, - "declaration-block-no-duplicate-properties": true, - "declaration-colon-space-after": "always-single-line", - "at-rule-whitelist": ["include", "import", "keyframes", "mixin", "extend"], - "string-quotes": "double", - "no-duplicate-selectors": true, - "color-named": "never", - "selector-attribute-quotes": "always", - "declaration-block-trailing-semicolon": "always", - "declaration-colon-space-before": "never", - "property-no-vendor-prefix": true, - "value-no-vendor-prefix": true, - "number-leading-zero": "always", - "function-url-quotes": "always", - "font-family-name-quotes": "always-unless-keyword", - "at-rule-no-vendor-prefix": true, - "selector-no-vendor-prefix": true, - "media-feature-name-no-vendor-prefix": true, - "max-empty-lines": 2 + "no-missing-end-of-source-newline": true, + "no-descending-specificity": null, + "color-hex-case": "lower", + "color-hex-length": "short", + "declaration-block-no-duplicate-properties": null, + "no-duplicate-selectors": null, + "declaration-colon-space-after": "always-single-line" }, "syntax": "scss" } diff --git a/CHANGELOG.md b/CHANGELOG.md index c6e1db4f..1ed60432 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,4 +2,5 @@ All notable changes to this project will be documented in this file. ## [4.0.0-beta] -- add sentry \ No newline at end of file +- add sentry +- add stylelint \ No newline at end of file diff --git a/package.json b/package.json index 6e70b0e2..416fc21e 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,9 @@ "jest": "^24.1.0", "jest-cli": "^24.1.0", "jest-enzyme": "^7.0.1", + "postcss": "^7.0.17", "postcss-inline-svg": "^3.0.0", + "prettier": "^1.18.2", "react-test-renderer": "^16.8.3", "redux-mock-store": "^1.5.1", "reload-html-webpack-plugin": "^0.1.2",