Skip to content

Commit c66924b

Browse files
authored
Upgrade to stylelint v15 & other dependencies to latest (#28)
1 parent 526179e commit c66924b

File tree

11 files changed

+1222
-2457
lines changed

11 files changed

+1222
-2457
lines changed

CHANGELOG.md

Lines changed: 186 additions & 1 deletion
Large diffs are not rendered by default.

README.md

Lines changed: 46 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,11 @@ To get the most out of this config, it is assumed that projects have the followi
103103

104104
## What’s included
105105

106-
> See [`config.js`](./config.js) for the config definition. This package depends on:
106+
> See [`config.js`](./config.js) for the config definition. This package includes configuration from:
107107
>
108-
> - [`stylelint-scss`](https://github.com/kristerkari/stylelint-scss)
108+
> - [`stylelint-config-standard-scss`](https://github.com/stylelint-scss/stylelint-config-standard-scss)
109109
> - [`stylelint-order`](https://github.com/hudochenkov/stylelint-order)
110110
> - [`stylelint-declaration-strict-value`](https://github.com/AndyOGo/stylelint-declaration-strict-value)
111-
> - [`stylelint-config-standard`](https://github.com/stylelint/stylelint-config-standard)
112-
> - [`stylelint-config-prettier`](https://github.com/prettier/stylelint-config-prettier)
113111

114112
<!-- Generated with: npm run build:docs -->
115113

@@ -120,7 +118,6 @@ To get the most out of this config, it is assumed that projects have the followi
120118
#### Custom rules
121119

122120
- [`color-named`](https://stylelint.io/user-guide/rules/color-named/): `never`
123-
- [`number-leading-zero`](https://stylelint.io/user-guide/rules/number-leading-zero/): `always`
124121
- [`declaration-block-no-shorthand-property-overrides`](https://stylelint.io/user-guide/rules/declaration-block-no-shorthand-property-overrides/)
125122
- [`declaration-no-important`](https://stylelint.io/user-guide/rules/declaration-no-important/)
126123
- [`selector-max-id`](https://stylelint.io/user-guide/rules/selector-max-id/): `0`
@@ -146,49 +143,73 @@ To get the most out of this config, it is assumed that projects have the followi
146143

147144
## Inherited rules
148145

146+
- [`block-no-empty`](https://stylelint.io/user-guide/rules/block-no-empty/)
149147
- [`color-hex-length`](https://stylelint.io/user-guide/rules/color-hex-length/): `short`
148+
- [`color-no-invalid-hex`](https://stylelint.io/user-guide/rules/color-no-invalid-hex/)
150149
- [`comment-empty-line-before`](https://stylelint.io/user-guide/rules/comment-empty-line-before/): `always, except: first-nested, ignore: stylelint-commands`
151150
- [`comment-whitespace-inside`](https://stylelint.io/user-guide/rules/comment-whitespace-inside/): `always`
152151
- [`custom-property-empty-line-before`](https://stylelint.io/user-guide/rules/custom-property-empty-line-before/): `always, except: after-custom-property, first-nested, ignore: after-comment, inside-single-line-block`
153-
- [`declaration-block-single-line-max-declarations`](https://stylelint.io/user-guide/rules/declaration-block-single-line-max-declarations/): `1`
154-
- [`font-family-name-quotes`](https://stylelint.io/user-guide/rules/font-family-name-quotes/): `always-where-recommended`
155-
- [`function-name-case`](https://stylelint.io/user-guide/rules/function-name-case/): `lower`
156-
- [`function-url-quotes`](https://stylelint.io/user-guide/rules/function-url-quotes/): `always`
157-
- [`function-whitespace-after`](https://stylelint.io/user-guide/rules/function-whitespace-after/): `always`
158-
- [`hue-degree-notation`](https://stylelint.io/user-guide/rules/hue-degree-notation/): `angle`
159-
- [`length-zero-no-unit`](https://stylelint.io/user-guide/rules/length-zero-no-unit/)
160-
- [`media-feature-range-operator-space-after`](https://stylelint.io/user-guide/rules/media-feature-range-operator-space-after/): `always`
161-
- [`media-feature-range-operator-space-before`](https://stylelint.io/user-guide/rules/media-feature-range-operator-space-before/): `always`
162-
- [`no-irregular-whitespace`](https://stylelint.io/user-guide/rules/no-irregular-whitespace/)
163-
- [`number-max-precision`](https://stylelint.io/user-guide/rules/number-max-precision/): `4`
164-
- [`rule-empty-line-before`](https://stylelint.io/user-guide/rules/rule-empty-line-before/): `always-multi-line, except: first-nested, ignore: after-comment`
165-
- [`selector-pseudo-element-colon-notation`](https://stylelint.io/user-guide/rules/selector-pseudo-element-colon-notation/): `double`
166-
- [`selector-type-case`](https://stylelint.io/user-guide/rules/selector-type-case/): `lower`
167-
- [`value-keyword-case`](https://stylelint.io/user-guide/rules/value-keyword-case/): `lower`
168-
- [`block-no-empty`](https://stylelint.io/user-guide/rules/block-no-empty/)
169-
- [`color-no-invalid-hex`](https://stylelint.io/user-guide/rules/color-no-invalid-hex/)
170-
- [`comment-no-empty`](https://stylelint.io/user-guide/rules/comment-no-empty/)
171152
- [`custom-property-no-missing-var-function`](https://stylelint.io/user-guide/rules/custom-property-no-missing-var-function/)
172153
- [`declaration-block-no-duplicate-custom-properties`](https://stylelint.io/user-guide/rules/declaration-block-no-duplicate-custom-properties/)
173-
- [`declaration-block-no-duplicate-properties`](https://stylelint.io/user-guide/rules/declaration-block-no-duplicate-properties/): `true, ignore: consecutive-duplicates-with-different-values`
154+
- [`declaration-block-no-duplicate-properties`](https://stylelint.io/user-guide/rules/declaration-block-no-duplicate-properties/): `true, ignore: consecutive-duplicates-with-different-syntaxes`
155+
- [`declaration-block-single-line-max-declarations`](https://stylelint.io/user-guide/rules/declaration-block-single-line-max-declarations/): `1`
156+
- [`font-family-name-quotes`](https://stylelint.io/user-guide/rules/font-family-name-quotes/): `always-where-recommended`
174157
- [`font-family-no-duplicate-names`](https://stylelint.io/user-guide/rules/font-family-no-duplicate-names/)
175158
- [`font-family-no-missing-generic-family-keyword`](https://stylelint.io/user-guide/rules/font-family-no-missing-generic-family-keyword/)
176159
- [`function-calc-no-unspaced-operator`](https://stylelint.io/user-guide/rules/function-calc-no-unspaced-operator/)
177160
- [`function-linear-gradient-no-nonstandard-direction`](https://stylelint.io/user-guide/rules/function-linear-gradient-no-nonstandard-direction/)
161+
- [`function-name-case`](https://stylelint.io/user-guide/rules/function-name-case/): `lower`
162+
- [`function-url-quotes`](https://stylelint.io/user-guide/rules/function-url-quotes/): `always`
163+
- [`hue-degree-notation`](https://stylelint.io/user-guide/rules/hue-degree-notation/): `angle`
164+
- [`import-notation`](https://stylelint.io/user-guide/rules/import-notation/): `string`
165+
- [`keyframe-block-no-duplicate-selectors`](https://stylelint.io/user-guide/rules/keyframe-block-no-duplicate-selectors/)
178166
- [`keyframe-declaration-no-important`](https://stylelint.io/user-guide/rules/keyframe-declaration-no-important/)
167+
- [`keyframe-selector-notation`](https://stylelint.io/user-guide/rules/keyframe-selector-notation/): `percentage-unless-within-keyword-only-block`
168+
- [`length-zero-no-unit`](https://stylelint.io/user-guide/rules/length-zero-no-unit/): `true, ignore: custom-properties`
179169
- [`media-feature-name-no-unknown`](https://stylelint.io/user-guide/rules/media-feature-name-no-unknown/)
180170
- [`named-grid-areas-no-invalid`](https://stylelint.io/user-guide/rules/named-grid-areas-no-invalid/)
181171
- [`no-duplicate-at-import-rules`](https://stylelint.io/user-guide/rules/no-duplicate-at-import-rules/)
182172
- [`no-duplicate-selectors`](https://stylelint.io/user-guide/rules/no-duplicate-selectors/)
183173
- [`no-empty-source`](https://stylelint.io/user-guide/rules/no-empty-source/)
184174
- [`no-invalid-double-slash-comments`](https://stylelint.io/user-guide/rules/no-invalid-double-slash-comments/)
185-
- [`no-invalid-position-at-import-rule`](https://stylelint.io/user-guide/rules/no-invalid-position-at-import-rule/)
175+
- [`no-invalid-position-at-import-rule`](https://stylelint.io/user-guide/rules/no-invalid-position-at-import-rule/): `true, ignoreAtRules: use, forward`
176+
- [`no-irregular-whitespace`](https://stylelint.io/user-guide/rules/no-irregular-whitespace/)
177+
- [`number-max-precision`](https://stylelint.io/user-guide/rules/number-max-precision/): `4`
186178
- [`property-no-unknown`](https://stylelint.io/user-guide/rules/property-no-unknown/)
179+
- [`rule-empty-line-before`](https://stylelint.io/user-guide/rules/rule-empty-line-before/): `always-multi-line, except: first-nested, ignore: after-comment`
180+
- [`scss/at-else-closing-brace-newline-after`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-else-closing-brace-newline-after/README.md): `always-last-in-chain`
181+
- [`scss/at-else-closing-brace-space-after`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-else-closing-brace-space-after/README.md): `always-intermediate`
182+
- [`scss/at-else-empty-line-before`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-else-empty-line-before/README.md): `never`
183+
- [`scss/at-else-if-parentheses-space-before`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-else-if-parentheses-space-before/README.md): `always`
184+
- [`scss/at-function-parentheses-space-before`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-function-parentheses-space-before/README.md): `never`
185+
- [`scss/at-if-closing-brace-newline-after`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-if-closing-brace-newline-after/README.md): `always-last-in-chain`
186+
- [`scss/at-if-closing-brace-space-after`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-if-closing-brace-space-after/README.md): `always-intermediate`
187+
- [`scss/at-if-no-null`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-if-no-null/README.md)
188+
- [`scss/at-import-no-partial-leading-underscore`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-import-no-partial-leading-underscore/README.md)
189+
- [`scss/at-import-partial-extension`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-import-partial-extension/README.md): `never`
190+
- [`scss/at-mixin-parentheses-space-before`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-mixin-parentheses-space-before/README.md): `never`
191+
- [`scss/at-rule-conditional-no-parentheses`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-rule-conditional-no-parentheses/README.md)
192+
- [`scss/comment-no-empty`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/comment-no-empty/README.md)
193+
- [`scss/declaration-nested-properties-no-divided-groups`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/declaration-nested-properties-no-divided-groups/README.md)
194+
- [`scss/dollar-variable-colon-space-after`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/dollar-variable-colon-space-after/README.md): `always`
195+
- [`scss/dollar-variable-colon-space-before`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/dollar-variable-colon-space-before/README.md): `never`
196+
- [`scss/double-slash-comment-whitespace-inside`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/double-slash-comment-whitespace-inside/README.md): `always`
197+
- [`scss/function-quote-no-quoted-strings-inside`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/function-quote-no-quoted-strings-inside/README.md)
198+
- [`scss/function-unquote-no-unquoted-strings-inside`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/function-unquote-no-unquoted-strings-inside/README.md)
199+
- [`scss/no-duplicate-mixins`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/no-duplicate-mixins/README.md)
200+
- [`scss/operator-no-newline-after`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/operator-no-newline-after/README.md)
201+
- [`scss/operator-no-newline-before`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/operator-no-newline-before/README.md)
202+
- [`scss/operator-no-unspaced`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/operator-no-unspaced/README.md)
203+
- [`selector-anb-no-unmatchable`](https://stylelint.io/user-guide/rules/selector-anb-no-unmatchable/)
204+
- [`selector-attribute-quotes`](https://stylelint.io/user-guide/rules/selector-attribute-quotes/): `always`
187205
- [`selector-pseudo-class-no-unknown`](https://stylelint.io/user-guide/rules/selector-pseudo-class-no-unknown/)
206+
- [`selector-pseudo-element-colon-notation`](https://stylelint.io/user-guide/rules/selector-pseudo-element-colon-notation/): `double`
188207
- [`selector-pseudo-element-no-unknown`](https://stylelint.io/user-guide/rules/selector-pseudo-element-no-unknown/)
208+
- [`selector-type-case`](https://stylelint.io/user-guide/rules/selector-type-case/): `lower`
189209
- [`selector-type-no-unknown`](https://stylelint.io/user-guide/rules/selector-type-no-unknown/): `true, ignore: custom-elements`
190210
- [`string-no-newline`](https://stylelint.io/user-guide/rules/string-no-newline/)
191211
- [`unit-no-unknown`](https://stylelint.io/user-guide/rules/unit-no-unknown/)
212+
- [`value-keyword-case`](https://stylelint.io/user-guide/rules/value-keyword-case/): `lower`
192213

193214
## Contributing
194215

config.js

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
'use strict';
22

3-
const postcssScss = require('postcss-scss');
4-
53
// See https://stylelint.io/user-guide/rules/.
64
module.exports = {
7-
extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
8-
customSyntax: postcssScss,
9-
plugins: [
10-
'stylelint-scss',
11-
'stylelint-order',
12-
'stylelint-declaration-strict-value',
13-
],
5+
extends: ['stylelint-config-standard-scss'],
6+
plugins: ['stylelint-order', 'stylelint-declaration-strict-value'],
147
rules: {
158
'color-named': 'never',
16-
'number-leading-zero': 'always',
179
'declaration-block-no-shorthand-property-overrides': true,
1810
'declaration-no-important': true,
1911
'selector-max-id': 0,
@@ -39,16 +31,23 @@ module.exports = {
3931
'color-function-notation': null,
4032
'max-nesting-depth': 4,
4133
'selector-max-specificity': '0,4,0',
34+
// Normally: `complex`. Disabled due to backwards-compatibility concerns.
35+
'selector-not-notation': null,
4236
'value-no-vendor-prefix': true,
4337
'property-no-vendor-prefix': true,
4438
'selector-no-vendor-prefix': true,
4539
'media-feature-name-no-vendor-prefix': true,
40+
// Normally: `context`. Disabled due to backwards-compatibility concerns.
41+
'media-feature-range-notation': null,
42+
// Normally: `true`. Disabled due to backwards-compatibility concerns.
43+
'scss/no-global-function-names': null,
4644
'declaration-empty-line-before': null,
4745
'no-descending-specificity': null,
4846
'at-rule-no-vendor-prefix': true,
4947
'at-rule-no-unknown': null,
5048
'declaration-block-no-redundant-longhand-properties': null,
5149
'shorthand-property-no-redundant-values': null,
50+
'at-rule-empty-line-before': null,
5251
// Replaces previously-used `a11y/no-text-align-justify`.
5352
'declaration-property-value-disallowed-list': {
5453
'text-align': ['justify'],
@@ -67,8 +66,13 @@ module.exports = {
6766
},
6867
],
6968
'scss/declaration-nested-properties': 'never',
69+
'scss/double-slash-comment-empty-line-before': null,
70+
'scss/dollar-variable-empty-line-before': null,
7071
'scss/selector-no-redundant-nesting-selector': true,
72+
'scss/dollar-variable-pattern': null,
73+
'scss/at-function-pattern': null,
7174
'scss/percent-placeholder-pattern': '^do-not-use-placeholders$',
75+
'scss/at-extend-no-missing-placeholder': null,
7276
'scss/dollar-variable-no-missing-interpolation': true,
7377
'scss/at-mixin-argumentless-call-parentheses': 'always',
7478
'scss/at-mixin-pattern': /^[a-z0-9-]+$/,

0 commit comments

Comments
 (0)