eslint-plugin-vuetify 2.1.1 → 2.3.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
@@ -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-subheader-2"'
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
  },
@@ -204,6 +197,7 @@ const replacements = {
204
197
  ...size
205
198
  },
206
199
  VBadge: {
200
+ value: 'model-value',
207
201
  avatar: false,
208
202
  mode: false,
209
203
  origin: false,
@@ -229,7 +223,7 @@ const replacements = {
229
223
  app: false,
230
224
  iconColor: false,
231
225
  mobileBreakPoint: false,
232
- outlined: false,
226
+ outlined: 'border',
233
227
  shaped: false,
234
228
  value: false
235
229
  },
@@ -298,7 +292,6 @@ const replacements = {
298
292
  name: 'variant',
299
293
  value: 'text'
300
294
  },
301
- tile: false,
302
295
  top: {
303
296
  name: 'location',
304
297
  value: 'top'
@@ -316,10 +309,6 @@ const replacements = {
316
309
  value: 'compact'
317
310
  },
318
311
  shaped: false,
319
- tile: {
320
- name: 'rounded',
321
- value: 0
322
- },
323
312
  value: 'model-value',
324
313
  valueComparator: false,
325
314
  ...theme
@@ -336,10 +325,6 @@ const replacements = {
336
325
  value: 8
337
326
  },
338
327
  shaped: false,
339
- tile: {
340
- name: 'rounded',
341
- value: 0
342
- },
343
328
  ...link
344
329
  },
345
330
  VCarousel: {
@@ -469,10 +454,8 @@ const replacements = {
469
454
  value: 'popout'
470
455
  },
471
456
  activeClass: 'selected-class',
472
- flat: false,
473
457
  focusable: false,
474
458
  hover: false,
475
- tile: false,
476
459
  value: 'model-value',
477
460
  valueComparator: false
478
461
  },
@@ -499,7 +482,10 @@ const replacements = {
499
482
  ...inputs
500
483
  },
501
484
  VDialog: {
502
- ...overlay
485
+ ...overlay,
486
+ tile: {
487
+ custom: 'apply border-radius changes to the root element of the `v-dialog`\'s content'
488
+ }
503
489
  },
504
490
  VMenu: {
505
491
  allowOverflow: false,
@@ -540,7 +526,9 @@ const replacements = {
540
526
  value: 'right'
541
527
  },
542
528
  rounded: false,
543
- tile: false,
529
+ tile: {
530
+ custom: 'apply border-radius changes to the root element of the `v-menu`\'s content'
531
+ },
544
532
  top: {
545
533
  name: 'location',
546
534
  value: 'top'
@@ -550,10 +538,9 @@ const replacements = {
550
538
  },
551
539
  VFooter: {
552
540
  fixed: false,
553
- outlined: false,
541
+ outlined: 'border',
554
542
  padless: false,
555
543
  shaped: false,
556
- tile: false,
557
544
  width: false,
558
545
  ...size
559
546
  },
@@ -568,17 +555,15 @@ const replacements = {
568
555
  name: 'size',
569
556
  value: 'small'
570
557
  },
571
- disabled: false,
572
558
  left: 'start',
573
559
  right: 'end',
574
- ...sizes
560
+ ...sizes,
561
+ ...theme
575
562
  },
576
563
  VImg: {
577
564
  contain: {
578
565
  custom: 'cover'
579
566
  },
580
- contentClass: false,
581
- position: false,
582
567
  ...theme
583
568
  },
584
569
  VItemGroup: {
@@ -599,7 +584,7 @@ const replacements = {
599
584
  },
600
585
  expand: false,
601
586
  flat: false,
602
- outlined: false,
587
+ outlined: 'border',
603
588
  subheader: false,
604
589
  threeLine: {
605
590
  name: 'lines',
@@ -608,8 +593,7 @@ const replacements = {
608
593
  twoLine: {
609
594
  name: 'lines',
610
595
  value: 'two'
611
- },
612
- tile: false
596
+ }
613
597
  },
614
598
  VListGroup: {
615
599
  activeClass: false,
@@ -672,7 +656,6 @@ const replacements = {
672
656
  },
673
657
  VOverlay: {
674
658
  color: 'scrim',
675
- opacity: false,
676
659
  value: 'model-value'
677
660
  },
678
661
  VPagination: {
@@ -754,9 +737,8 @@ const replacements = {
754
737
  ...sizes
755
738
  },
756
739
  VSheet: {
757
- outlined: false,
758
- shaped: false,
759
- tile: false
740
+ outlined: 'border',
741
+ shaped: false
760
742
  },
761
743
  VSlideGroup: {
762
744
  activeClass: 'selected-class',
@@ -807,7 +789,6 @@ const replacements = {
807
789
  },
808
790
  shaped: false,
809
791
  text: false,
810
- tile: false,
811
792
  top: {
812
793
  name: 'location',
813
794
  value: 'top'
@@ -876,12 +857,11 @@ const replacements = {
876
857
  },
877
858
  VToolbar: {
878
859
  bottom: false,
879
- outlined: false,
860
+ outlined: 'border',
880
861
  prominent: false,
881
862
  shaped: false,
882
863
  short: false,
883
864
  src: 'image',
884
- tile: false,
885
865
  width: false,
886
866
  ...size
887
867
  },
@@ -149,6 +149,23 @@ const groups = [{
149
149
  }
150
150
  });
151
151
  }
152
+ }, {
153
+ components: ['VSnackbar'],
154
+ slots: ['action'],
155
+ handler(context, node, directive, param) {
156
+ context.report({
157
+ node: directive,
158
+ messageId: 'renamed',
159
+ data: {
160
+ component: node.parent.name,
161
+ slot: directive.key.argument.name,
162
+ newSlot: 'actions'
163
+ },
164
+ fix(fixer) {
165
+ return fixer.replaceText(directive.key.argument, 'action');
166
+ }
167
+ });
168
+ }
152
169
  }];
153
170
 
154
171
  // ------------------------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-vuetify",
3
- "version": "2.1.1",
3
+ "version": "2.3.0",
4
4
  "description": "An eslint plugin for Vuetify",
5
5
  "main": "lib/index.js",
6
6
  "author": "Kael Watts-Deuchar <kaelwd@gmail.com>",