@justeattakeaway/stylelint-config-pie 0.6.1 → 0.8.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,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [Changed] - Add file extensions to rule imports ([#2001](https://github.com/justeattakeaway/pie/pull/2001)) by [@ashleynolan](https://github.com/ashleynolan)
8
+
9
+ ## 0.7.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [Changed] - stylelint to latest version 16 ([#1280](https://github.com/justeattakeaway/pie/pull/1280)) by [@raoufswe](https://github.com/raoufswe)
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [[`a3305634e`](https://github.com/justeattakeaway/pie/commit/a3305634e069e32415bc8fb89e03a85a384560ea)]:
18
+ - @justeattakeaway/stylelint-no-logical-props-shorthands@0.3.0
19
+
3
20
  ## 0.6.1
4
21
 
5
22
  ### Patch 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,12 @@
1
- module.exports = {
1
+ /* eslint-disable import/extensions */
2
+ import baseRules from './rules/base.js';
3
+ import strictRules from './rules/strict.js';
4
+ import orderingRules from './rules/ordering.js';
5
+
6
+ export default {
2
7
  extends: [
3
- './rules/base.js',
4
- './rules/strict.js',
5
- './rules/ordering.js'
8
+ baseRules,
9
+ strictRules,
10
+ orderingRules
6
11
  ],
7
12
  };
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@justeattakeaway/stylelint-config-pie",
3
- "version": "0.6.1",
3
+ "version": "0.8.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,17 +18,17 @@
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.2.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 vitest run --config ../../../vite.config.js",
31
+ "test": "run -T vitest run --config ../../../vite.config.js --environment node",
31
32
  "test:ci": "yarn test"
32
33
  },
33
34
  "volta": {
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
  },
File without changes