@justeattakeaway/stylelint-config-pie 0.6.0 → 0.7.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.
@@ -2,7 +2,6 @@ module.exports = {
2
2
  env: {
3
3
  browser: true,
4
4
  es6: true,
5
- jest: true,
6
5
  node: true,
7
6
  },
8
7
  extends: [require.resolve('@justeattakeaway/eslint-config-pie/strict')],
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [Changed] - stylelint to latest version 16 ([#1280](https://github.com/justeattakeaway/pie/pull/1280)) by [@raoufswe](https://github.com/raoufswe)
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`a3305634e`](https://github.com/justeattakeaway/pie/commit/a3305634e069e32415bc8fb89e03a85a384560ea)]:
12
+ - @justeattakeaway/stylelint-no-logical-props-shorthands@0.3.0
13
+
14
+ ## 0.6.1
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [[`e3da38b60`](https://github.com/justeattakeaway/pie/commit/e3da38b60c5074da5422115ad16116a7413227f1)]:
19
+ - @justeattakeaway/stylelint-no-logical-props-shorthands@0.2.0
20
+
3
21
  ## 0.6.0
4
22
 
5
23
  ### Minor Changes
@@ -1,5 +1,5 @@
1
- const stylelint = require('stylelint');
2
- const baseConfig = require('../../rules/base');
1
+ import stylelint from 'stylelint';
2
+ import baseConfig from '../../rules/base';
3
3
 
4
4
  describe('base Stylelint rules', () => {
5
5
  describe('alpha-value-notation', () => {
@@ -1,5 +1,5 @@
1
- const stylelint = require('stylelint');
2
- const strictConfig = require('../../rules/strict');
1
+ import stylelint from 'stylelint';
2
+ import strictConfig from '../../rules/strict';
3
3
 
4
4
  describe('strict Stylelint rules', () => {
5
5
  describe('color-named', () => {
package/index.js CHANGED
@@ -1,7 +1,11 @@
1
- module.exports = {
1
+ import baseRules from './rules/base';
2
+ import strictRules from './rules/strict';
3
+ import orderingRules from './rules/ordering';
4
+
5
+ export default {
2
6
  extends: [
3
- './rules/base.js',
4
- './rules/strict.js',
5
- './rules/ordering.js'
7
+ baseRules,
8
+ strictRules,
9
+ orderingRules
6
10
  ],
7
11
  };
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@justeattakeaway/stylelint-config-pie",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Shareable Stylelint config for use with any front-end web projects across JET.",
5
5
  "license": "Apache-2.0",
6
+ "type": "module",
6
7
  "keywords": [
7
8
  "PIE",
8
9
  "stylelint",
@@ -17,22 +18,19 @@
17
18
  "./ordering": "./rules/ordering.js"
18
19
  },
19
20
  "peerDependencies": {
20
- "stylelint": "14.x",
21
- "stylelint-config-standard-scss": "5.x",
22
- "stylelint-order": "5.x"
21
+ "stylelint": "16.x",
22
+ "stylelint-config-standard-scss": "13.x",
23
+ "stylelint-order": "6.x"
23
24
  },
24
25
  "dependencies": {
25
- "@justeattakeaway/stylelint-no-logical-props-shorthands": "0.1.0"
26
+ "@justeattakeaway/stylelint-no-logical-props-shorthands": "0.3.0"
26
27
  },
27
28
  "scripts": {
28
29
  "lint:scripts": "run -T eslint .",
29
30
  "lint:scripts:fix": "run -T eslint . --fix",
30
- "test": "run -T jest",
31
+ "test": "run -T vitest run --config ../../../vite.config.js --environment node",
31
32
  "test:ci": "yarn test"
32
33
  },
33
- "jest": {
34
- "testEnvironment": "jsdom"
35
- },
36
34
  "volta": {
37
35
  "extends": "../../../package.json"
38
36
  }
package/rules/base.js CHANGED
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  extends: 'stylelint-config-standard-scss',
3
3
  plugins: [
4
4
  '@justeattakeaway/stylelint-no-logical-props-shorthands',
@@ -14,22 +14,8 @@ module.exports = {
14
14
  ignoreAtRules: ['if', 'else', 'include', 'use', 'forward'],
15
15
  }
16
16
  ],
17
- 'at-rule-name-case': 'lower',
18
- 'at-rule-name-space-after': 'always',
19
17
  'at-rule-no-vendor-prefix': true,
20
- 'block-closing-brace-newline-after': [
21
- 'always',
22
- {
23
- ignoreAtRules: ['if', 'else'],
24
- }
25
- ],
26
- 'block-closing-brace-newline-before': 'always',
27
- 'block-closing-brace-space-before': 'always-single-line',
28
- 'block-opening-brace-newline-after': 'always',
29
- 'block-opening-brace-space-after': 'always-single-line',
30
- 'block-opening-brace-space-before': 'always',
31
18
  'color-function-notation': 'legacy',
32
- 'color-hex-case': 'lower',
33
19
  'color-hex-length': 'short',
34
20
  'color-no-invalid-hex': true,
35
21
  'comment-empty-line-before': [
@@ -41,29 +27,21 @@ module.exports = {
41
27
  ],
42
28
  'comment-whitespace-inside': 'always',
43
29
  'custom-property-pattern': '^([a-z][a-z0-9]*)(-[-a-z0-9]+)*$',
44
- 'declaration-bang-space-after': 'never',
45
- 'declaration-bang-space-before': 'always',
46
30
  'declaration-block-no-duplicate-properties': [
47
31
  true, {
48
32
  ignore: ['consecutive-duplicates-with-different-values'],
49
33
  }
50
34
  ],
51
- 'declaration-block-no-shorthand-property-overrides': true,
52
- 'declaration-block-semicolon-newline-after': 'always',
53
- 'declaration-block-semicolon-newline-before': 'never-multi-line',
54
- 'declaration-block-semicolon-space-before': 'never',
55
- 'declaration-block-trailing-semicolon': 'always',
56
- 'declaration-colon-newline-after': 'always-multi-line',
57
- 'declaration-colon-space-after': 'always-single-line',
58
- 'declaration-colon-space-before': 'never',
35
+ 'declaration-block-no-redundant-longhand-properties': [
36
+ true, {
37
+ // Excluding margin/padding logical operators to avoid "stylelint-no-logical-props-shorthands" conflict
38
+ ignoreShorthands: ['/margin-inline/', '/margin-block/', 'padding-inline', 'padding-block'],
39
+ }
40
+ ],
59
41
  'declaration-empty-line-before': null,
60
42
  'font-family-name-quotes': 'always-where-recommended',
61
43
  'font-weight-notation': 'numeric',
62
44
  'function-calc-no-unspaced-operator': true,
63
- 'function-comma-newline-after': 'never-multi-line',
64
- 'function-comma-newline-before': 'never-multi-line',
65
- 'function-comma-space-after': 'always',
66
- 'function-comma-space-before': 'never',
67
45
  'function-linear-gradient-no-nonstandard-direction': true,
68
46
  'function-name-case': [
69
47
  'lower',
@@ -71,30 +49,10 @@ module.exports = {
71
49
  ignoreFunctions: ['/zIndex/'],
72
50
  }
73
51
  ],
74
- 'function-parentheses-space-inside': 'never',
75
52
  'function-url-quotes': 'always',
76
- 'function-whitespace-after': 'always',
77
- indentation: 4,
78
53
  'keyframes-name-pattern': '^([a-z0-9]+)(((([A-Z]){1}([a-z0-9]+))?)+)',
79
54
  'length-zero-no-unit': true,
80
- 'max-empty-lines': 2,
81
- 'max-line-length': [
82
- 120,
83
- {
84
- ignore: ['non-comments'],
85
- ignorePattern: '/hsl\\(/',
86
- }
87
- ],
88
- 'media-feature-colon-space-after': 'always',
89
- 'media-feature-colon-space-before': 'never',
90
- 'media-feature-name-case': 'lower',
91
55
  'media-feature-name-no-vendor-prefix': true,
92
- 'media-feature-parentheses-space-inside': 'never',
93
- 'media-feature-range-operator-space-after': 'always',
94
- 'media-feature-range-operator-space-before': 'always',
95
- 'media-query-list-comma-newline-before': null,
96
- 'media-query-list-comma-space-after': 'always-single-line',
97
- 'media-query-list-comma-space-before': 'never',
98
56
  'no-descending-specificity': [
99
57
  true,
100
58
  {
@@ -102,12 +60,7 @@ module.exports = {
102
60
  }
103
61
  ],
104
62
  'no-duplicate-selectors': null,
105
- 'no-eol-whitespace': true,
106
- 'no-missing-end-of-source-newline': true,
107
- 'number-leading-zero': 'always',
108
63
  'number-max-precision': 3,
109
- 'number-no-trailing-zeros': true,
110
- 'property-case': 'lower',
111
64
  'property-no-unknown': true,
112
65
  // TODO - we need to figure out what exceptions to add to this
113
66
  'property-no-vendor-prefix': null,
@@ -127,24 +80,12 @@ module.exports = {
127
80
  'scss/dollar-variable-pattern': null,
128
81
  'selector-attribute-quotes': 'always',
129
82
  'selector-class-pattern': null,
130
- 'selector-combinator-space-after': 'always',
131
- 'selector-combinator-space-before': 'always',
132
- 'selector-descendant-combinator-no-non-space': true,
133
- 'selector-list-comma-newline-after': 'always',
134
- 'selector-list-comma-newline-before': 'never-multi-line',
135
- 'selector-list-comma-space-before': 'never',
136
- 'selector-max-empty-lines': 0,
137
83
  // TODO - Test * > * works
138
84
  'selector-max-universal': [1, { ignoreAfterCombinators: ['>'] }],
139
85
  'selector-no-vendor-prefix': true,
140
86
  'selector-pseudo-element-colon-notation': 'single',
141
87
  'selector-type-case': 'lower',
142
- 'string-quotes': 'single',
143
88
  'unit-no-unknown': true,
144
- 'value-list-comma-newline-after': 'always-multi-line',
145
- 'value-list-comma-newline-before': 'never-multi-line',
146
- 'value-list-comma-space-after': 'always-single-line',
147
- 'value-list-comma-space-before': 'never',
148
89
  'value-no-vendor-prefix': true,
149
90
  },
150
91
  };
package/rules/ordering.js CHANGED
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  plugins: ['stylelint-order'],
3
3
  rules: {
4
4
  'order/order': [
package/rules/strict.js CHANGED
@@ -1,8 +1,7 @@
1
- module.exports = {
1
+ export default {
2
2
  rules: {
3
3
  'color-named': 'never',
4
4
  'max-nesting-depth': 3,
5
- 'media-query-list-comma-newline-after': 'always-multi-line',
6
5
  'selector-max-compound-selectors': 5,
7
6
  'selector-max-id': 0,
8
7
  },