eslint-plugin-vuetify 2.1.1 → 2.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.
package/README.md
CHANGED
|
@@ -47,6 +47,7 @@ These rules will help you avoid deprecated components, props, and classes. They
|
|
|
47
47
|
- Prevent the use of events that have been removed from Vuetify ([`no-deprecated-events`])
|
|
48
48
|
- Prevent the use of classes that have been removed from Vuetify ([`no-deprecated-classes`])
|
|
49
49
|
- Prevent the use of the old theme class syntax ([`no-deprecated-colors`])
|
|
50
|
+
- Prevent the use of deprecated import paths ([`no-deprecated-imports`])
|
|
50
51
|
|
|
51
52
|
### Grid system
|
|
52
53
|
|
|
@@ -61,6 +62,7 @@ These rules are designed to help migrate to the new grid system in Vuetify v2. T
|
|
|
61
62
|
[`no-deprecated-events`]: ./docs/rules/no-deprecated-events.md
|
|
62
63
|
[`no-deprecated-classes`]: ./docs/rules/no-deprecated-classes.md
|
|
63
64
|
[`no-deprecated-colors`]: ./docs/rules/no-deprecated-colors.md
|
|
65
|
+
[`no-deprecated-imports`]: ./docs/rules/no-deprecated-imports.md
|
|
64
66
|
|
|
65
67
|
|
|
66
68
|
## 💪 Supporting Vuetify
|
package/lib/configs/base.js
CHANGED
|
@@ -11,6 +11,7 @@ module.exports = {
|
|
|
11
11
|
'vuetify/no-deprecated-components': 'error',
|
|
12
12
|
'vuetify/no-deprecated-events': 'error',
|
|
13
13
|
'vuetify/no-deprecated-props': 'error',
|
|
14
|
-
'vuetify/no-deprecated-slots': 'error'
|
|
14
|
+
'vuetify/no-deprecated-slots': 'error',
|
|
15
|
+
'vuetify/no-deprecated-imports': 'error'
|
|
15
16
|
}
|
|
16
17
|
};
|
|
@@ -20,7 +20,6 @@ const replacements = {
|
|
|
20
20
|
VListItemSubTitle: 'v-list-item-subtitle',
|
|
21
21
|
VListTileSubtitle: 'v-list-item-subtitle',
|
|
22
22
|
VContent: 'v-main',
|
|
23
|
-
VCalendar: false,
|
|
24
23
|
VData: false,
|
|
25
24
|
VListItemGroup: false,
|
|
26
25
|
VListItemAvatar: {
|
|
@@ -33,17 +32,14 @@ const replacements = {
|
|
|
33
32
|
VOverflowBtn: false,
|
|
34
33
|
VPicker: false,
|
|
35
34
|
VSimpleCheckbox: 'v-checkbox-btn',
|
|
36
|
-
VSparkline: false,
|
|
37
|
-
VSpeedDial: false,
|
|
38
35
|
VSubheader: {
|
|
39
|
-
custom: 'v-list-subheader or class="text-
|
|
36
|
+
custom: 'v-list-subheader or class="text-subtitle-2"'
|
|
40
37
|
},
|
|
41
38
|
VSimpleTable: 'v-table',
|
|
42
39
|
VTabsSlider: false,
|
|
43
40
|
VTabsItems: false,
|
|
44
41
|
VTabItem: false,
|
|
45
|
-
VTimePicker: false
|
|
46
|
-
VTreeview: false
|
|
42
|
+
VTimePicker: false
|
|
47
43
|
};
|
|
48
44
|
|
|
49
45
|
// ------------------------------------------------------------------------------
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
meta: {
|
|
5
|
+
type: 'problem',
|
|
6
|
+
docs: {
|
|
7
|
+
description: 'disallow import from "vuetify/lib/util/colors", suggest "vuetify/util/colors" instead',
|
|
8
|
+
category: 'Best Practices',
|
|
9
|
+
recommended: false
|
|
10
|
+
},
|
|
11
|
+
fixable: 'code',
|
|
12
|
+
schema: []
|
|
13
|
+
},
|
|
14
|
+
create(context) {
|
|
15
|
+
return {
|
|
16
|
+
ImportDeclaration(node) {
|
|
17
|
+
if (node.source.value === 'vuetify/lib/util/colors') {
|
|
18
|
+
context.report({
|
|
19
|
+
node,
|
|
20
|
+
message: 'Import from "vuetify/lib/util/colors" is deprecated. Use "vuetify/util/colors" instead.',
|
|
21
|
+
fix(fixer) {
|
|
22
|
+
return fixer.replaceText(node.source, node.source.raw.replace('vuetify/lib/util/colors', 'vuetify/util/colors'));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
};
|
|
@@ -54,7 +54,6 @@ const inputs = {
|
|
|
54
54
|
},
|
|
55
55
|
fullWidth: false,
|
|
56
56
|
height: false,
|
|
57
|
-
hideSpinButtons: false,
|
|
58
57
|
loaderHeight: false,
|
|
59
58
|
outline: {
|
|
60
59
|
name: 'variant',
|
|
@@ -100,8 +99,7 @@ const select = {
|
|
|
100
99
|
searchInput: 'search',
|
|
101
100
|
smallChips: false,
|
|
102
101
|
filter: 'customFilter',
|
|
103
|
-
...inputs
|
|
104
|
-
dense: false
|
|
102
|
+
...inputs
|
|
105
103
|
};
|
|
106
104
|
const link = {
|
|
107
105
|
append: false,
|
|
@@ -153,7 +151,6 @@ const replacements = {
|
|
|
153
151
|
shaped: false,
|
|
154
152
|
short: false,
|
|
155
153
|
shrinkOnScroll: false,
|
|
156
|
-
tile: false,
|
|
157
154
|
width: false,
|
|
158
155
|
...theme,
|
|
159
156
|
...size
|
|
@@ -185,10 +182,6 @@ const replacements = {
|
|
|
185
182
|
value: 'outlined'
|
|
186
183
|
},
|
|
187
184
|
shaped: false,
|
|
188
|
-
tile: {
|
|
189
|
-
name: 'rounded',
|
|
190
|
-
value: 0
|
|
191
|
-
},
|
|
192
185
|
transition: false,
|
|
193
186
|
...theme
|
|
194
187
|
},
|
|
@@ -229,7 +222,7 @@ const replacements = {
|
|
|
229
222
|
app: false,
|
|
230
223
|
iconColor: false,
|
|
231
224
|
mobileBreakPoint: false,
|
|
232
|
-
outlined:
|
|
225
|
+
outlined: 'border',
|
|
233
226
|
shaped: false,
|
|
234
227
|
value: false
|
|
235
228
|
},
|
|
@@ -298,7 +291,6 @@ const replacements = {
|
|
|
298
291
|
name: 'variant',
|
|
299
292
|
value: 'text'
|
|
300
293
|
},
|
|
301
|
-
tile: false,
|
|
302
294
|
top: {
|
|
303
295
|
name: 'location',
|
|
304
296
|
value: 'top'
|
|
@@ -316,10 +308,6 @@ const replacements = {
|
|
|
316
308
|
value: 'compact'
|
|
317
309
|
},
|
|
318
310
|
shaped: false,
|
|
319
|
-
tile: {
|
|
320
|
-
name: 'rounded',
|
|
321
|
-
value: 0
|
|
322
|
-
},
|
|
323
311
|
value: 'model-value',
|
|
324
312
|
valueComparator: false,
|
|
325
313
|
...theme
|
|
@@ -336,10 +324,6 @@ const replacements = {
|
|
|
336
324
|
value: 8
|
|
337
325
|
},
|
|
338
326
|
shaped: false,
|
|
339
|
-
tile: {
|
|
340
|
-
name: 'rounded',
|
|
341
|
-
value: 0
|
|
342
|
-
},
|
|
343
327
|
...link
|
|
344
328
|
},
|
|
345
329
|
VCarousel: {
|
|
@@ -469,10 +453,8 @@ const replacements = {
|
|
|
469
453
|
value: 'popout'
|
|
470
454
|
},
|
|
471
455
|
activeClass: 'selected-class',
|
|
472
|
-
flat: false,
|
|
473
456
|
focusable: false,
|
|
474
457
|
hover: false,
|
|
475
|
-
tile: false,
|
|
476
458
|
value: 'model-value',
|
|
477
459
|
valueComparator: false
|
|
478
460
|
},
|
|
@@ -540,7 +522,9 @@ const replacements = {
|
|
|
540
522
|
value: 'right'
|
|
541
523
|
},
|
|
542
524
|
rounded: false,
|
|
543
|
-
tile:
|
|
525
|
+
tile: {
|
|
526
|
+
custom: 'apply border-radius changes to the root element of the `v-menu`\'s content'
|
|
527
|
+
},
|
|
544
528
|
top: {
|
|
545
529
|
name: 'location',
|
|
546
530
|
value: 'top'
|
|
@@ -550,10 +534,9 @@ const replacements = {
|
|
|
550
534
|
},
|
|
551
535
|
VFooter: {
|
|
552
536
|
fixed: false,
|
|
553
|
-
outlined:
|
|
537
|
+
outlined: 'border',
|
|
554
538
|
padless: false,
|
|
555
539
|
shaped: false,
|
|
556
|
-
tile: false,
|
|
557
540
|
width: false,
|
|
558
541
|
...size
|
|
559
542
|
},
|
|
@@ -571,14 +554,13 @@ const replacements = {
|
|
|
571
554
|
disabled: false,
|
|
572
555
|
left: 'start',
|
|
573
556
|
right: 'end',
|
|
574
|
-
...sizes
|
|
557
|
+
...sizes,
|
|
558
|
+
...theme
|
|
575
559
|
},
|
|
576
560
|
VImg: {
|
|
577
561
|
contain: {
|
|
578
562
|
custom: 'cover'
|
|
579
563
|
},
|
|
580
|
-
contentClass: false,
|
|
581
|
-
position: false,
|
|
582
564
|
...theme
|
|
583
565
|
},
|
|
584
566
|
VItemGroup: {
|
|
@@ -599,7 +581,7 @@ const replacements = {
|
|
|
599
581
|
},
|
|
600
582
|
expand: false,
|
|
601
583
|
flat: false,
|
|
602
|
-
outlined:
|
|
584
|
+
outlined: 'border',
|
|
603
585
|
subheader: false,
|
|
604
586
|
threeLine: {
|
|
605
587
|
name: 'lines',
|
|
@@ -608,8 +590,7 @@ const replacements = {
|
|
|
608
590
|
twoLine: {
|
|
609
591
|
name: 'lines',
|
|
610
592
|
value: 'two'
|
|
611
|
-
}
|
|
612
|
-
tile: false
|
|
593
|
+
}
|
|
613
594
|
},
|
|
614
595
|
VListGroup: {
|
|
615
596
|
activeClass: false,
|
|
@@ -672,7 +653,6 @@ const replacements = {
|
|
|
672
653
|
},
|
|
673
654
|
VOverlay: {
|
|
674
655
|
color: 'scrim',
|
|
675
|
-
opacity: false,
|
|
676
656
|
value: 'model-value'
|
|
677
657
|
},
|
|
678
658
|
VPagination: {
|
|
@@ -754,9 +734,8 @@ const replacements = {
|
|
|
754
734
|
...sizes
|
|
755
735
|
},
|
|
756
736
|
VSheet: {
|
|
757
|
-
outlined:
|
|
758
|
-
shaped: false
|
|
759
|
-
tile: false
|
|
737
|
+
outlined: 'border',
|
|
738
|
+
shaped: false
|
|
760
739
|
},
|
|
761
740
|
VSlideGroup: {
|
|
762
741
|
activeClass: 'selected-class',
|
|
@@ -807,7 +786,6 @@ const replacements = {
|
|
|
807
786
|
},
|
|
808
787
|
shaped: false,
|
|
809
788
|
text: false,
|
|
810
|
-
tile: false,
|
|
811
789
|
top: {
|
|
812
790
|
name: 'location',
|
|
813
791
|
value: 'top'
|
|
@@ -876,12 +854,11 @@ const replacements = {
|
|
|
876
854
|
},
|
|
877
855
|
VToolbar: {
|
|
878
856
|
bottom: false,
|
|
879
|
-
outlined:
|
|
857
|
+
outlined: 'border',
|
|
880
858
|
prominent: false,
|
|
881
859
|
shaped: false,
|
|
882
860
|
short: false,
|
|
883
861
|
src: 'image',
|
|
884
|
-
tile: false,
|
|
885
862
|
width: false,
|
|
886
863
|
...size
|
|
887
864
|
},
|