@lucca/stylelint-config-prisme 21.4.0 → 21.4.2
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/LFDeprecatedProperties.mjs +19 -2
- package/LFDeprecatedSelectors.mjs +42 -14
- package/package.json +1 -1
- package/stylelintForLF.mjs +22 -10
|
@@ -15,7 +15,15 @@ export default [
|
|
|
15
15
|
{
|
|
16
16
|
objectPattern: /--palettes-(grey|primary|secondary|lucca)-[0-9]{2,3}/,
|
|
17
17
|
versionDeprecated: '17.3.0',
|
|
18
|
-
versionDeleted: '
|
|
18
|
+
versionDeleted: '22.0.0',
|
|
19
|
+
actions: `
|
|
20
|
+
* Remplacer \`grey\` par \`neutral\`.
|
|
21
|
+
* Remplacer \`primary\` & \`secondary\` par \`product\`.
|
|
22
|
+
* Remplacer \`lucca\` par \`brand\`.
|
|
23
|
+
`,
|
|
24
|
+
urls: {
|
|
25
|
+
schematics: 'https://prisme.lucca.io/94310e217/p/40c515-cycle-de-vie-des-composants/b/15c256',
|
|
26
|
+
},
|
|
19
27
|
},
|
|
20
28
|
{
|
|
21
29
|
objectPattern: /--spacings-X*(S|M|L)/,
|
|
@@ -25,7 +33,11 @@ export default [
|
|
|
25
33
|
{
|
|
26
34
|
objectPattern: /--colors-(black|white)-color/,
|
|
27
35
|
versionDeprecated: '18.2.0',
|
|
28
|
-
versionDeleted: '
|
|
36
|
+
versionDeleted: '22.0.0',
|
|
37
|
+
actions: `
|
|
38
|
+
* Remplacer \`--colors-white-color\` par \`--palettes-neutral-0\` ou \`--pr-t-elevation-surface-raised\` selon si la couleur en question est considérée comme une couleur ou une surface.
|
|
39
|
+
* Remplacer \`--colors-black-color\` par \`--palettes-neutral-900\`.
|
|
40
|
+
`,
|
|
29
41
|
},
|
|
30
42
|
{
|
|
31
43
|
objectPattern: /--commons-navSide-compact-width/,
|
|
@@ -35,5 +47,10 @@ export default [
|
|
|
35
47
|
{
|
|
36
48
|
objectPattern: /--commons-borderRadius-(M|L|XL|full)/,
|
|
37
49
|
versionDeprecated: '20.2.0',
|
|
50
|
+
versionDeleted: '22.0.0',
|
|
51
|
+
actions: 'Remplacer par \`--pr-t-border-radius-XXX\`',
|
|
52
|
+
urls: {
|
|
53
|
+
schematics: 'https://prisme.lucca.io/94310e217/p/40c515-cycle-de-vie-des-composants/t/page-40c515-88288181-15c256-0',
|
|
54
|
+
},
|
|
38
55
|
},
|
|
39
56
|
];
|
|
@@ -52,6 +52,14 @@ export default [
|
|
|
52
52
|
objectPattern: /\.palette-(grey|primary|secondary|lucca)/,
|
|
53
53
|
versionDeprecated: '17.3.0',
|
|
54
54
|
versionDeleted: '22.0.0',
|
|
55
|
+
actions: `
|
|
56
|
+
* Remplacer \`grey\` par \`neutral\`.
|
|
57
|
+
* Remplacer \`primary\` & \`secondary\` par \`product\`.
|
|
58
|
+
* Remplacer \`lucca\` par \`brand\`.
|
|
59
|
+
`,
|
|
60
|
+
urls: {
|
|
61
|
+
schematics: 'https://prisme.lucca.io/94310e217/p/40c515-cycle-de-vie-des-composants/b/15c256',
|
|
62
|
+
},
|
|
55
63
|
},
|
|
56
64
|
{
|
|
57
65
|
objectPattern: /\.u-(padding|margin|gap)X*(S|M|L)/,
|
|
@@ -62,6 +70,7 @@ export default [
|
|
|
62
70
|
objectPattern: [/\.u-textLeft/, /\.u-textCenter/, /\.u-textRight/],
|
|
63
71
|
versionDeprecated: '18.1.0',
|
|
64
72
|
versionDeleted: '22.0.0',
|
|
73
|
+
actions: `Doublon. Remplacer par : \`.u-textAlignLeft\`, \`.u-textAlignCenter\` & \`.u-textAlignRight\`.`,
|
|
65
74
|
},
|
|
66
75
|
{
|
|
67
76
|
objectPattern: /\.mod-columnSticky/,
|
|
@@ -81,19 +90,19 @@ export default [
|
|
|
81
90
|
versionDeprecated: '18.2.0',
|
|
82
91
|
versionDeleted: '20.1.0',
|
|
83
92
|
},
|
|
84
|
-
{
|
|
85
|
-
objectPattern: /\.u-text(Left|Center|Right)/,
|
|
86
|
-
versionDeprecated: '18.2.0',
|
|
87
|
-
},
|
|
88
93
|
{
|
|
89
94
|
objectPattern: [/\.comment-content-textContainer/, /\.mod-withMenuCompact/],
|
|
90
95
|
versionDeprecated: '18.3.0',
|
|
91
96
|
versionDeleted: '20.1.0',
|
|
97
|
+
urls: {
|
|
98
|
+
schematics: 'https://prisme.lucca.io/94310e217/p/40c515-cycle-de-vie-des-composants/b/95175f',
|
|
99
|
+
},
|
|
92
100
|
},
|
|
93
101
|
{
|
|
94
102
|
objectPattern: [/\.dialog-form/, /\.dialog-formOptional/],
|
|
95
103
|
versionDeprecated: '18.3.0',
|
|
96
104
|
versionDeleted: '22.0.0',
|
|
105
|
+
actions: `Remplacer par la classe unique \`.dialog-inside-formOptional\`.`,
|
|
97
106
|
},
|
|
98
107
|
{
|
|
99
108
|
objectPattern: /\.u-elevate.*/,
|
|
@@ -104,34 +113,52 @@ export default [
|
|
|
104
113
|
objectPattern: /\.lu-dropdown-(content|options|options-item|options-item-action)/,
|
|
105
114
|
versionDeprecated: '19.2.0',
|
|
106
115
|
versionDeleted: '22.0.0',
|
|
116
|
+
actions: `Remplacer par le nouveau DOM du composant [Dropdown](https://prisme.lucca.io/94310e217/p/557682-dropdown).`,
|
|
107
117
|
},
|
|
108
118
|
{
|
|
109
119
|
// SEE https://regex101.com/r/VqPdDw.
|
|
110
120
|
objectPattern: /\.filterBarDeprecated-?/,
|
|
111
121
|
versionDeprecated: '19.2.0',
|
|
112
|
-
versionDeleted: '
|
|
122
|
+
versionDeleted: '22.0.0',
|
|
113
123
|
},
|
|
114
124
|
{
|
|
115
125
|
objectPattern: /\.menu-?/,
|
|
116
126
|
versionDeprecated: '19.3.0',
|
|
117
127
|
versionDeleted: '22.0.0',
|
|
128
|
+
actions: `Remplacer par [Horizontal navigation](https://prisme.lucca.io/94310e217/p/29aaef-horizontal-navigation).`,
|
|
118
129
|
},
|
|
119
130
|
{
|
|
120
131
|
// SEE https://regex101.com/r/rOqMxE.
|
|
121
132
|
objectPattern: /\.u-text(X?S|M|X{0,3}L)/,
|
|
122
133
|
versionDeprecated: '20.1.0',
|
|
123
134
|
versionDeleted: '22.0.0',
|
|
135
|
+
actions: `
|
|
136
|
+
Remplacer par les classes \`.pr-u-bodyXS\`, \`.pr-u-bodyS\`, \`.pr-u-bodyM\`.
|
|
137
|
+
|
|
138
|
+
Les utilitaires L ~ XXXL peuvent être remplacés par un utilitaire de titre \`.pr-u-hx\` ou le [token typographie](https://prisme.lucca.io/94310e217/p/73bd2f-typographie/b/23f311) correspondant.
|
|
139
|
+
|
|
140
|
+
[Plus d’informations sur le sujet](https://www.notion.so/luccasoftware/Tokens-Typo-1ebd278ab26e808a9b58d1017514ecb9).
|
|
141
|
+
`,
|
|
124
142
|
},
|
|
125
143
|
{
|
|
126
144
|
// Any combination of .button and .mod-text, .mod-deleted or .loading, with any non-whitespace character between
|
|
127
145
|
// SEE https://regex101.com/r/5qB2gm.
|
|
128
|
-
objectPattern:
|
|
146
|
+
objectPattern: [
|
|
147
|
+
// Classes pour button :
|
|
148
|
+
/(?=\S*\.\bbutton\b)(?=\S*\.\b(mod-text|mod-deleted|loading)\b)\S*/,
|
|
149
|
+
// Inputs Angular :
|
|
150
|
+
// * `delete`
|
|
151
|
+
// * `text`
|
|
152
|
+
// * `text-invert`
|
|
153
|
+
],
|
|
129
154
|
versionDeprecated: '20.2.0',
|
|
130
155
|
versionDeleted: '22.0.0',
|
|
156
|
+
actions: `Remplacer par les classes \`.mod-ghost\` & \`.mod-critical\` et les inputs Angular \`critical\`, \`ghost\` & \`ghost-invert\``,
|
|
131
157
|
},
|
|
132
158
|
{
|
|
133
|
-
// Utilitaires renommés très utilisés
|
|
134
159
|
objectPattern: [
|
|
160
|
+
// [Liste complète](https://www.notion.so/luccasoftware/Utilitaires-color-text-2c7d278ab26e808b9d61f3734eeb77a2)
|
|
161
|
+
// **Utilitaires renommés très utilisés :**
|
|
135
162
|
/\.pr-u-textPrimary/,
|
|
136
163
|
/\.pr-u-textProduct/,
|
|
137
164
|
/\.pr-u-textSecondary/,
|
|
@@ -146,18 +173,13 @@ export default [
|
|
|
146
173
|
/\.pr-u-textPlaceholder/,
|
|
147
174
|
/\.pr-u-textSuccess/,
|
|
148
175
|
/\.pr-u-textWarning/,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
// Utilitaires renommés peu ou pas utilisés
|
|
154
|
-
objectPattern: [
|
|
176
|
+
|
|
177
|
+
// **Utilitaires renommés peu ou pas utilisés :**
|
|
155
178
|
/\.pr-u-textSuccessContrasted/,
|
|
156
179
|
/\.pr-u-textWarningContrasted/,
|
|
157
180
|
/\.pr-u-textBrandContrasted/,
|
|
158
181
|
/\.pr-u-textNavigation/,
|
|
159
182
|
/\.pr-u-textAI/,
|
|
160
|
-
/\.pr-u-textProduct/,
|
|
161
183
|
/\.pr-u-textPagga/,
|
|
162
184
|
/\.pr-u-textPoplee/,
|
|
163
185
|
/\.pr-u-textCoreHR/,
|
|
@@ -178,5 +200,11 @@ export default [
|
|
|
178
200
|
/\.pr-u-textPineapple/,
|
|
179
201
|
],
|
|
180
202
|
versionDeprecated: '21.0.0',
|
|
203
|
+
actions: `
|
|
204
|
+
Remplacer par les [nouvelles classes](https://prisme.lucca.io/94310e217/p/21a286-utilitaires) liées aux tokens (\`.pr-u-color\`…)
|
|
205
|
+
`,
|
|
206
|
+
urls: {
|
|
207
|
+
schematics: 'https://prisme.lucca.io/94310e217/p/40c515-cycle-de-vie-des-composants/t/17d7fdfdaf',
|
|
208
|
+
},
|
|
181
209
|
},
|
|
182
210
|
];
|
package/package.json
CHANGED
package/stylelintForLF.mjs
CHANGED
|
@@ -108,22 +108,34 @@ function getMessage(objectData) {
|
|
|
108
108
|
messageLFVersionWarning = ' | LF version not found';
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
if (objectData.
|
|
112
|
-
|
|
113
|
-
const daysAgoString = new Intl.RelativeTimeFormat().format(daysAgo, 'day');
|
|
111
|
+
if (objectData.versionDeprecated) {
|
|
112
|
+
let detail = `LF ${objectData.versionDeprecated}`;
|
|
114
113
|
|
|
115
|
-
|
|
114
|
+
if (objectData.dateDeprecated) {
|
|
115
|
+
const daysAgo = Math.ceil((objectData.dateDeprecated.getTime() - new Date().getTime()) / (1000 * 60 * 60 * 24));
|
|
116
|
+
const daysAgoString = new Intl.RelativeTimeFormat().format(daysAgo, 'day');
|
|
117
|
+
|
|
118
|
+
detail = `${detail} (${objectData.dateDeprecated.toLocaleDateString()}, ${daysAgoString})`;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
messageDeprecated = ` | since ${detail}`;
|
|
116
122
|
}
|
|
117
123
|
|
|
118
|
-
if (objectData.
|
|
119
|
-
|
|
120
|
-
|
|
124
|
+
if (objectData.versionDeleted) {
|
|
125
|
+
let detail = `LF ${objectData.versionDeleted}`;
|
|
126
|
+
|
|
127
|
+
if (objectData.dateDeleted) {
|
|
128
|
+
const daysLeft = Math.ceil((objectData.dateDeleted.getTime() - new Date().getTime()) / (1000 * 60 * 60 * 24));
|
|
129
|
+
const daysLeftString = new Intl.RelativeTimeFormat().format(daysLeft, 'day');
|
|
130
|
+
|
|
131
|
+
if (daysLeft <= 0) {
|
|
132
|
+
status = 'deleted';
|
|
133
|
+
}
|
|
121
134
|
|
|
122
|
-
|
|
123
|
-
status = 'deleted';
|
|
135
|
+
detail = `${detail} (${objectData.dateDeleted.toLocaleDateString()}, ${daysLeftString})`;
|
|
124
136
|
}
|
|
125
137
|
|
|
126
|
-
messageDeleted = ` | until ${
|
|
138
|
+
messageDeleted = ` | until ${detail}`;
|
|
127
139
|
}
|
|
128
140
|
|
|
129
141
|
return `${status}${messageLFVersionWarning}${messageDeprecated}${messageDeleted} | ${pattern}`;
|