@justeattakeaway/stylelint-config-pie 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [Added] - Rule for custom property naming convention ([#550](https://github.com/justeattakeaway/pie/pull/550)) by [@ashleynolan](https://github.com/ashleynolan)
8
+
9
+ ## 0.3.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [Added] - Ignore rule for max-line-length for hsl ([#482](https://github.com/justeattakeaway/pie/pull/482)) by [@ashleynolan](https://github.com/ashleynolan)
14
+
15
+ [Added] - Update ruleset with adjusted sensible defaults
16
+
3
17
  ## 0.2.0
4
18
 
5
19
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justeattakeaway/stylelint-config-pie",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Shareable Stylelint config for use with any front-end web projects across JET.",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
package/rules/base.js CHANGED
@@ -7,7 +7,7 @@ module.exports = {
7
7
  {
8
8
  except: ['blockless-after-blockless', 'first-nested'],
9
9
  ignore: ['after-comment'],
10
- ignoreAtRules: ['if', 'else']
10
+ ignoreAtRules: ['if', 'else', 'include', 'use', 'forward'],
11
11
  }
12
12
  ],
13
13
  'at-rule-name-case': 'lower',
@@ -16,7 +16,7 @@ module.exports = {
16
16
  'block-closing-brace-newline-after': [
17
17
  'always',
18
18
  {
19
- ignoreAtRules: ['if', 'else']
19
+ ignoreAtRules: ['if', 'else'],
20
20
  }
21
21
  ],
22
22
  'block-closing-brace-newline-before': 'always',
@@ -32,15 +32,16 @@ module.exports = {
32
32
  'always',
33
33
  {
34
34
  except: ['first-nested'],
35
- ignore: ['stylelint-commands']
35
+ ignore: ['stylelint-commands'],
36
36
  }
37
37
  ],
38
38
  'comment-whitespace-inside': 'always',
39
+ 'custom-property-pattern': '^([a-z][a-z0-9]*)(-[-a-z0-9]+)*$',
39
40
  'declaration-bang-space-after': 'never',
40
41
  'declaration-bang-space-before': 'always',
41
42
  'declaration-block-no-duplicate-properties': [
42
43
  true, {
43
- ignore: ['consecutive-duplicates-with-different-values']
44
+ ignore: ['consecutive-duplicates-with-different-values'],
44
45
  }
45
46
  ],
46
47
  'declaration-block-no-shorthand-property-overrides': true,
@@ -51,6 +52,7 @@ module.exports = {
51
52
  'declaration-colon-newline-after': 'always-multi-line',
52
53
  'declaration-colon-space-after': 'always-single-line',
53
54
  'declaration-colon-space-before': 'never',
55
+ 'declaration-empty-line-before': null,
54
56
  'font-family-name-quotes': 'always-where-recommended',
55
57
  'font-weight-notation': 'numeric',
56
58
  'function-calc-no-unspaced-operator': true,
@@ -59,7 +61,12 @@ module.exports = {
59
61
  'function-comma-space-after': 'always',
60
62
  'function-comma-space-before': 'never',
61
63
  'function-linear-gradient-no-nonstandard-direction': true,
62
- 'function-name-case': 'lower',
64
+ 'function-name-case': [
65
+ 'lower',
66
+ {
67
+ ignoreFunctions: ['/zIndex/'],
68
+ }
69
+ ],
63
70
  'function-parentheses-space-inside': 'never',
64
71
  'function-url-quotes': 'always',
65
72
  'function-whitespace-after': 'always',
@@ -67,6 +74,13 @@ module.exports = {
67
74
  'keyframes-name-pattern': '^([a-z0-9]+)(((([A-Z]){1}([a-z0-9]+))?)+)',
68
75
  'length-zero-no-unit': true,
69
76
  'max-empty-lines': 2,
77
+ 'max-line-length': [
78
+ 120,
79
+ {
80
+ ignore: ['non-comments'],
81
+ ignorePattern: '/hsl\\(/',
82
+ }
83
+ ],
70
84
  'media-feature-colon-space-after': 'always',
71
85
  'media-feature-colon-space-before': 'never',
72
86
  'media-feature-name-case': 'lower',
@@ -77,6 +91,12 @@ module.exports = {
77
91
  'media-query-list-comma-newline-before': null,
78
92
  'media-query-list-comma-space-after': 'always-single-line',
79
93
  'media-query-list-comma-space-before': 'never',
94
+ 'no-descending-specificity': [
95
+ true,
96
+ {
97
+ ignore: ['selectors-within-list'],
98
+ }
99
+ ],
80
100
  'no-duplicate-selectors': null,
81
101
  'no-eol-whitespace': true,
82
102
  'no-missing-end-of-source-newline': true,
@@ -91,7 +111,7 @@ module.exports = {
91
111
  'always',
92
112
  {
93
113
  except: ['first-nested'],
94
- ignore: ['after-comment']
114
+ ignore: ['after-comment'],
95
115
  }
96
116
  ],
97
117
  'scss/at-else-closing-brace-newline-after': 'always-last-in-chain',
@@ -99,6 +119,8 @@ module.exports = {
99
119
  'scss/at-else-empty-line-before': 'never',
100
120
  'scss/at-else-if-parentheses-space-before': 'always',
101
121
  'scss/at-if-closing-brace-newline-after': 'always-last-in-chain',
122
+ 'scss/dollar-variable-colon-space-after': 'at-least-one-space',
123
+ 'scss/dollar-variable-pattern': null,
102
124
  'selector-attribute-quotes': 'always',
103
125
  'selector-class-pattern': null,
104
126
  'selector-combinator-space-after': 'always',
@@ -119,6 +141,6 @@ module.exports = {
119
141
  'value-list-comma-newline-before': 'never-multi-line',
120
142
  'value-list-comma-space-after': 'always-single-line',
121
143
  'value-list-comma-space-before': 'never',
122
- 'value-no-vendor-prefix': true
123
- }
144
+ 'value-no-vendor-prefix': true,
145
+ },
124
146
  };