@justeattakeaway/eslint-plugin-snacks-pie-migration 0.1.2 → 0.2.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.
|
@@ -38,8 +38,9 @@ module.exports = {
|
|
|
38
38
|
const replacementData = snacksComponentsData[componentName];
|
|
39
39
|
// Specific components can be bypassed if an array of names are provided
|
|
40
40
|
const isBypassedInOptions = bypassedComponents && bypassedComponents.includes(componentName);
|
|
41
|
+
const isDeprecated = replacementData && replacementData.status && replacementData.status === 'stable';
|
|
41
42
|
|
|
42
|
-
if (
|
|
43
|
+
if (!isBypassedInOptions && isDeprecated) {
|
|
43
44
|
context.report({
|
|
44
45
|
node,
|
|
45
46
|
message: `The Snacks component "${componentName}" is being deprecated and can be replaced by "${replacementData.piePackage}".`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/eslint-plugin-snacks-pie-migration",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "This plugin helps developers to identify deprecated Snacks components and provides suggestions of replacement PIE components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
},
|
|
22
22
|
"Checkbox": {
|
|
23
23
|
"piePackage": "@justeattakeaway/pie-checkbox",
|
|
24
|
-
"status": "
|
|
24
|
+
"status": "stable"
|
|
25
25
|
},
|
|
26
26
|
"CheckboxGroup": {
|
|
27
27
|
"piePackage": "@justeattakeaway/pie-checkbox-group",
|
|
28
|
-
"status": "
|
|
28
|
+
"status": "stable"
|
|
29
29
|
},
|
|
30
30
|
"Chip": {
|
|
31
31
|
"piePackage": "@justeattakeaway/pie-chip",
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
},
|
|
62
62
|
"Radio": {
|
|
63
63
|
"piePackage": "@justeattakeaway/pie-radio",
|
|
64
|
-
"status": "
|
|
64
|
+
"status": "stable"
|
|
65
65
|
},
|
|
66
66
|
"RadioGroup": {
|
|
67
67
|
"piePackage": "@justeattakeaway/pie-radio-group",
|
|
68
|
-
"status": "
|
|
68
|
+
"status": "stable"
|
|
69
69
|
},
|
|
70
70
|
"Select": {
|
|
71
71
|
"piePackage": "@justeattakeaway/pie-select",
|