File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -15,5 +15,6 @@ module.exports = {
15
15
'vuetify/no-deprecated-events' : 'error' ,
16
16
'vuetify/no-deprecated-props' : 'error' ,
17
17
'vuetify/no-deprecated-slots' : 'error' ,
18
+ 'vuetify/no-deprecated-imports' : 'error' ,
18
19
} ,
19
20
}
Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ meta : {
3
+ type : 'problem' ,
4
+ docs : {
5
+ description : 'disallow import from "vuetify/lib/util/colors", suggest "vuetify/util/colors" instead' ,
6
+ category : 'Best Practices' ,
7
+ recommended : false ,
8
+ } ,
9
+ fixable : 'code' ,
10
+ schema : [ ] ,
11
+ } ,
12
+ create ( context ) {
13
+ return {
14
+ ImportDeclaration ( node ) {
15
+ const source = node . source . value
16
+ if ( source === 'vuetify/lib/util/colors' ) {
17
+ context . report ( {
18
+ node,
19
+ message : 'Import from "vuetify/lib/util/colors" is deprecated. Use "vuetify/util/colors" instead.' ,
20
+ fix ( fixer ) {
21
+ const fixedSource = source . replace ( 'vuetify/lib/util/colors' , 'vuetify/util/colors' )
22
+ return fixer . replaceText ( node . source , `'${ fixedSource } '` )
23
+ } ,
24
+ } )
25
+ }
26
+ } ,
27
+ }
28
+ } ,
29
+ }
You can’t perform that action at this time.
0 commit comments