From cc03d580ec091ab55bc444639420c82dbc9bfa6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AF=9B=E7=91=9E?= Date: Sat, 31 Aug 2019 11:12:38 +0800 Subject: [PATCH] Release 1.1.0 --- .gitignore | 1 + CHANGELOG.md | 6 ++++++ README.md | 2 +- index.js | 18 ++++++++++-------- package.json | 2 +- 5 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d6dbd1..c066d2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.1.0 + +--- + +- Modify scss patterns to `_*camelCase` + ## 1.0.2 --- diff --git a/README.md b/README.md index 5d036d1..f87af48 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Dependencies: - [stylelint](https://stylelint.io): any version - [stylelint-scss](https://github.com/kristerkari/stylelint-scss): 3.10.0 -- [stylelint-order](https://github.com/hudochenkov/stylelint-order): 3.10.0 +- [stylelint-order](https://github.com/hudochenkov/stylelint-order): 3.1.0 - [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard#readme): 18.3.0 - [stylelint-config-rational-order](https://github.com/constverum/stylelint-config-rational-order): 0.1.2 diff --git a/index.js b/index.js index 9850229..1b602ce 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,5 @@ +const pattern = '^_*[a-z]+\\d*(?:[A-Z][a-z]+\\d*)*$' // _*camelCasea + module.exports = { extends: ['stylelint-config-standard', 'stylelint-config-rational-order'], plugins: ['stylelint-scss', 'stylelint-order'], @@ -28,15 +30,15 @@ module.exports = { }, ], 'media-feature-name-no-vendor-prefix': true, - // class选择器名约束:selector-class-pattern 呃,不能区分是否CSS Modules 'property-no-vendor-prefix': true, + 'selector-max-id': 0, 'selector-pseudo-class-no-unknown': [ true, { ignorePseudoClasses: ['global', 'local'], }, ], - 'selector-max-id': 0, + // class选择器名约束:selector-class-pattern 呃,不能区分是否CSS Modules 'string-quotes': 'single', 'selector-no-vendor-prefix': true, 'selector-no-qualifying-type': true, @@ -45,20 +47,20 @@ module.exports = { 'value-no-vendor-prefix': true, // see: https://github.com/kristerkari/stylelint-scss#list-of-rules 'scss/at-rule-no-unknown': true, + 'scss/at-mixin-pattern': pattern, + 'scss/at-function-pattern': pattern, 'scss/at-else-empty-line-before': 'never', 'scss/at-extend-no-missing-placeholder': true, - 'scss/dollar-variable-colon-space-before': 'never', - 'scss/dollar-variable-colon-space-after': 'alw/ays', 'scss/at-import-no-partial-leading-underscore': true, 'scss/at-import-partial-extension-blacklist': ['scss'], - 'scss/at-mixin-pattern': '^[a-z]+([a-z0-9-]+[a-z0-9]+)?$', - 'scss/at-function-pattern': '^[a-z]+([a-z0-9-]+[a-z0-9]+)?$', 'scss/at-if-closing-brace-space-after': 'always-intermediate', 'scss/at-else-closing-brace-space-after': 'always-intermediate', 'scss/at-if-closing-brace-newline-after': 'always-last-in-chain', 'scss/at-else-closing-brace-newline-after': 'always-last-in-chain', - 'scss/dollar-variable-pattern': '^[_]?[a-z]+([a-z0-9-]+[a-z0-9]+)?$', - 'scss/percent-placeholder-pattern': '^[a-z]+([a-z0-9-]+[a-z0-9]+)?$', + 'scss/dollar-variable-pattern': pattern, + 'scss/dollar-variable-colon-space-after': 'always', + 'scss/dollar-variable-colon-space-before': 'never', + 'scss/percent-placeholder-pattern': pattern, 'scss/selector-no-redundant-nesting-selector': true, // see: https://github.com/hudochenkov/stylelint-order#list-of-rules 'order/order': [ diff --git a/package.json b/package.json index d707c8c..794ab7b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stylelint-config-scss-maorey", - "version": "1.0.2", + "version": "1.1.0", "description": "My stylelint config with scss", "keywords": [ "stylelint-config",