@lucca/stylelint-config-prisme 21.1.3 → 21.2.0-rc.3

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.
@@ -1,4 +1,19 @@
1
1
  export default [
2
+ // Any occurrence of one of these selectors in any part of a selector
3
+ // SEE https://regex101.com/r/OTnSEg
4
+ {
5
+ objectPattern: [
6
+ /\.active/,
7
+ /\.disabled/,
8
+ /\.error/,
9
+ /\.label/,
10
+ /\.mod-delete/,
11
+ /\.mod-link/,
12
+ /\.mod-outline/,
13
+ /\.success/,
14
+ /\.u-textLight/,
15
+ ],
16
+ },
2
17
  {
3
18
  // Any combination of .button and .mod-counter, with any non-whitespace character between
4
19
  // SEE https://regex101.com/r/9WOlXc.
@@ -6,7 +21,7 @@ export default [
6
21
  versionDeleted: '18.1.0',
7
22
  },
8
23
  {
9
- objectPattern: ['.button-counter', '.navSide-item-alert', '.textfield-actionClear', '.lu-select-value .label'],
24
+ objectPattern: [/\.button-counter/, /\.navSide-item-alert/, /\.textfield-actionClear/, /\.lu-select-value .label/],
10
25
  versionDeleted: '18.1.0',
11
26
  },
12
27
  {
@@ -15,12 +30,10 @@ export default [
15
30
  objectPattern: /(?=\S*\.\bcallout\b)(?=\S*\.\bmod-tiny\b)\S*/,
16
31
  versionDeleted: '18.1.0',
17
32
  },
33
+ // Any occurrence of one of these selectors in any part of a selector
34
+ // SEE https://regex101.com/r/VHfdte.
18
35
  {
19
- objectPattern: ['.user-info', /\.user-tile-(title|label|footnote)/],
20
- versionDeleted: '20.1.0',
21
- },
22
- {
23
- objectPattern: ['.user-info', 'user-tile', '.picture'],
36
+ objectPattern: [/\.user-info/, /\.user-tile(-(title|label|footnote))?/, /\.picture/],
24
37
  versionDeleted: '20.1.0',
25
38
  },
26
39
  {
@@ -31,14 +44,14 @@ export default [
31
44
  versionDeleted: '19.1.0',
32
45
  },
33
46
  {
34
- objectPattern: ['.u-comma', '.u-unit'],
47
+ objectPattern: [/\.u-comma/, /\.u-unit/],
35
48
  versionDeprecated: '17.3.0',
36
49
  versionDeleted: '19.1.0',
37
50
  },
38
51
  {
39
52
  objectPattern: /\.palette-(grey|primary|secondary|lucca)/,
40
53
  versionDeprecated: '17.3.0',
41
- versionDeleted: '21.1.0',
54
+ versionDeleted: '22.0.0',
42
55
  },
43
56
  {
44
57
  objectPattern: /\.u-(padding|margin|gap)X*(S|M|L)/,
@@ -46,17 +59,18 @@ export default [
46
59
  versionDeleted: '19.1.0',
47
60
  },
48
61
  {
49
- objectPattern: ['.u-textLeft', '.u-textCenter', '.u-textRight'],
62
+ objectPattern: [/\.u-textLeft/, /\.u-textCenter/, /\.u-textRight/],
50
63
  versionDeprecated: '18.1.0',
51
- versionDeleted: '21.1.0',
64
+ versionDeleted: '22.0.0',
52
65
  },
53
66
  {
54
- objectPattern: '.mod-columnSticky',
67
+ objectPattern: /\.mod-columnSticky/,
55
68
  versionDeprecated: '18.2.0',
56
69
  versionDeleted: '20.1.0',
57
70
  },
71
+ // SEE https://regex101.com/r/1EfDam
58
72
  {
59
- objectPattern: ['.table-head-row-cell-sortableButton', '.indexTable-head-row-cell-sortableButton'],
73
+ objectPattern: [/\.(indexT|t)able-head-row-cell-sortableButton/],
60
74
  versionDeprecated: '18.2.0',
61
75
  versionDeleted: '20.1.0',
62
76
  },
@@ -72,14 +86,14 @@ export default [
72
86
  versionDeprecated: '18.2.0',
73
87
  },
74
88
  {
75
- objectPattern: ['.comment-content-textContainer', '.mod-withMenuCompact'],
89
+ objectPattern: [/\.comment-content-textContainer/, /\.mod-withMenuCompact/],
76
90
  versionDeprecated: '18.3.0',
77
91
  versionDeleted: '20.1.0',
78
92
  },
79
93
  {
80
- objectPattern: ['.dialog-form', '.dialog-formOptional'],
94
+ objectPattern: [/\.dialog-form/, /\.dialog-formOptional/],
81
95
  versionDeprecated: '18.3.0',
82
- versionDeleted: '21.1.0',
96
+ versionDeleted: '22.0.0',
83
97
  },
84
98
  {
85
99
  objectPattern: /\.u-elevate.*/,
@@ -89,7 +103,7 @@ export default [
89
103
  {
90
104
  objectPattern: /\.lu-dropdown-(content|options|options-item|options-item-action)/,
91
105
  versionDeprecated: '19.2.0',
92
- versionDeleted: '21.1.0',
106
+ versionDeleted: '22.0.0',
93
107
  },
94
108
  {
95
109
  // SEE https://regex101.com/r/VqPdDw.
@@ -100,19 +114,69 @@ export default [
100
114
  {
101
115
  objectPattern: /\.menu-?/,
102
116
  versionDeprecated: '19.3.0',
103
- versionDeleted: '21.1.0',
117
+ versionDeleted: '22.0.0',
104
118
  },
105
119
  {
106
120
  // SEE https://regex101.com/r/rOqMxE.
107
121
  objectPattern: /\.u-text(X?S|M|X{0,3}L)/,
108
122
  versionDeprecated: '20.1.0',
109
- versionDeleted: '22.1.0',
123
+ versionDeleted: '22.0.0',
110
124
  },
111
125
  {
112
- // Any combination of .button and .mod-text or .mod-deleted, with any non-whitespace character between
126
+ // Any combination of .button and .mod-text, .mod-deleted or .loading, with any non-whitespace character between
113
127
  // SEE https://regex101.com/r/5qB2gm.
114
- objectPattern: /(?=\S*\.\bbutton\b)(?=\S*\.\b(mod-text|mod-deleted)\b)\S*/,
128
+ objectPattern: /(?=\S*\.\bbutton\b)(?=\S*\.\b(mod-text|mod-deleted|loading)\b)\S*/,
115
129
  versionDeprecated: '20.2.0',
116
- versionDeleted: '22.1.0',
130
+ versionDeleted: '22.0.0',
131
+ },
132
+ {
133
+ // Utilitaires renommés très utilisés
134
+ objectPattern: [
135
+ /\.pr-u-textPrimary/,
136
+ /\.pr-u-textProduct/,
137
+ /\.pr-u-textSecondary/,
138
+ /\.pr-u-textBrand/,
139
+ /\.pr-u-textCritical/,
140
+ /\.pr-u-textDefault/,
141
+ /\.pr-u-textError/,
142
+ /\.pr-u-textGrey/,
143
+ /\.pr-u-textLight/,
144
+ /\.pr-u-textLucca/,
145
+ /\.pr-u-textNeutral/,
146
+ /\.pr-u-textPlaceholder/,
147
+ /\.pr-u-textSuccess/,
148
+ /\.pr-u-textWarning/,
149
+ ],
150
+ versionDeprecated: '21.0.0',
151
+ },
152
+ {
153
+ // Utilitaires renommés peu ou pas utilisés
154
+ objectPattern: [
155
+ /\.pr-u-textSuccessContrasted/,
156
+ /\.pr-u-textWarningContrasted/,
157
+ /\.pr-u-textBrandContrasted/,
158
+ /\.pr-u-textNavigation/,
159
+ /\.pr-u-textAI/,
160
+ /\.pr-u-textProduct/,
161
+ /\.pr-u-textPagga/,
162
+ /\.pr-u-textPoplee/,
163
+ /\.pr-u-textCoreHR/,
164
+ /\.pr-u-textTimmi/,
165
+ /\.pr-u-textCleemy/,
166
+ /\.pr-u-textCc/,
167
+ /\.pr-u-textKiwi/,
168
+ /\.pr-u-textLime/,
169
+ /\.pr-u-textCucumber/,
170
+ /\.pr-u-textMint/,
171
+ /\.pr-u-textGlacier/,
172
+ /\.pr-u-textLagoon/,
173
+ /\.pr-u-textBlueberry/,
174
+ /\.pr-u-textLavender/,
175
+ /\.pr-u-textGrape/,
176
+ /\.pr-u-textWatermelon/,
177
+ /\.pr-u-textPumpkin/,
178
+ /\.pr-u-textPineapple/,
179
+ ],
180
+ versionDeprecated: '21.0.0',
117
181
  },
118
182
  ];
package/README.md CHANGED
@@ -58,7 +58,7 @@ npx stylelint "./**/*.scss" showCachePath
58
58
 
59
59
  You can [apply specific rules with overrides](https://stylelint.io/user-guide/configure/#overrides) as needed.
60
60
 
61
- Rules can be disabled while incrementally fixing your code. Set them to `null`. The following example will ignore the `no-descending-specificity` rule in all SCSS files within `*some-path* :
61
+ Rules can be disabled while incrementally fixing your code. Set them to `null`. The following example will ignore the `no-empty-source` rule in all SCSS files within `*some-path* :
62
62
 
63
63
  ```js
64
64
  module.exports = {
@@ -67,7 +67,7 @@ module.exports = {
67
67
  {
68
68
  files: ['some-path/**/*.scss'],
69
69
  rules: {
70
- 'no-descending-specificity': null,
70
+ 'no-empty-source': null,
71
71
  }
72
72
  },
73
73
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucca/stylelint-config-prisme",
3
- "version": "21.1.3",
3
+ "version": "21.2.0-rc.3",
4
4
  "description": "Lucca Front stylelint configuration",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,8 +22,9 @@
22
22
  },
23
23
  "homepage": "https://github.com/LuccaSA/lucca-front#readme",
24
24
  "peerDependencies": {
25
- "stylelint": "^16.23.1",
26
- "stylelint-config-prettier-scss": "^1.0.0",
27
- "stylelint-config-standard-scss": "^15.0.1"
25
+ "@stylistic/stylelint-config": "^4.0.0",
26
+ "@stylistic/stylelint-plugin": "^5.0.1",
27
+ "stylelint": "^17.4.0",
28
+ "stylelint-config-standard-scss": "^17.0.0"
28
29
  }
29
30
  }
@@ -5,8 +5,16 @@ import LFDeprecatedSelectors from './LFDeprecatedSelectors.mjs';
5
5
  import { getDisallowedObjects, getDisallowedData } from './stylelintForLF.mjs';
6
6
 
7
7
  export default {
8
- extends: ['stylelint-config-standard-scss', 'stylelint-config-prettier-scss'],
8
+ extends: ['@stylistic/stylelint-config', 'stylelint-config-standard-scss'],
9
9
  overrides: [
10
+ {
11
+ files: ['**/*.scss'],
12
+ rules: {
13
+ // Disable for now because of bugs with SCSS files.
14
+ // SEE https://github.com/stylelint-scss/stylelint-config-standard-scss/issues/252
15
+ 'no-invalid-position-declaration': null,
16
+ },
17
+ },
10
18
  {
11
19
  // Allow common component files to be empty.
12
20
  files: ['**/vars.scss'],
@@ -45,6 +53,7 @@ export default {
45
53
  message: (variable) => `Expected "${variable}" to match pattern $foo(-bar(Baz)*)*`,
46
54
  },
47
55
  ],
56
+ 'scss/operator-no-newline-before': null,
48
57
  'scss/percent-placeholder-pattern': [
49
58
  '^([a-z][a-zA-Z0-9]*)((-(([a-z0-9]+[a-zA-Z0-9]*)|([A-Z]+))+)*)$',
50
59
  {
@@ -155,5 +164,25 @@ export default {
155
164
  },
156
165
  ],
157
166
  'value-keyword-case': null,
167
+
168
+ // Formatting with @stylistic
169
+ // SEE: https://github.com/stylelint-stylistic/stylelint-stylistic/blob/main/docs/user-guide/rules.md
170
+ // ============================================================================================
171
+
172
+ '@stylistic/block-closing-brace-newline-after': [
173
+ 'always-multi-line',
174
+ {
175
+ ignoreAtRules: ['if', 'else'],
176
+ },
177
+ ],
178
+ '@stylistic/indentation': 'tab',
179
+ '@stylistic/max-line-length': null,
180
+ '@stylistic/named-grid-areas-alignment': [
181
+ true,
182
+ {
183
+ alignQuotes: true,
184
+ },
185
+ ],
186
+ '@stylistic/string-quotes': 'single',
158
187
  },
159
188
  };