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