@@ -8,9 +8,11 @@ test('base', async () => {
8
8
} )
9
9
10
10
expect ( pkg . scripts . lint ) . toBeTruthy ( )
11
- expect ( pkg . eslintConfig ) . toEqual ( {
12
- root : true ,
13
- extends : [ 'plugin:vue/essential' , 'eslint:recommended' ]
11
+ expect ( pkg . eslintConfig . extends ) . toEqual ( [
12
+ 'plugin:vue/essential' , 'eslint:recommended'
13
+ ] )
14
+ expect ( pkg . eslintConfig . parserOptions ) . toEqual ( {
15
+ parser : 'babel-eslint'
14
16
} )
15
17
} )
16
18
@@ -24,9 +26,12 @@ test('airbnb', async () => {
24
26
} )
25
27
26
28
expect ( pkg . scripts . lint ) . toBeTruthy ( )
27
- expect ( pkg . eslintConfig ) . toEqual ( {
28
- root : true ,
29
- extends : [ 'plugin:vue/essential' , '@vue/airbnb' ]
29
+ expect ( pkg . eslintConfig . extends ) . toEqual ( [
30
+ 'plugin:vue/essential' ,
31
+ '@vue/airbnb'
32
+ ] )
33
+ expect ( pkg . eslintConfig . parserOptions ) . toEqual ( {
34
+ parser : 'babel-eslint'
30
35
} )
31
36
expect ( pkg . devDependencies ) . toHaveProperty ( '@vue/eslint-config-airbnb' )
32
37
} )
@@ -41,9 +46,12 @@ test('standard', async () => {
41
46
} )
42
47
43
48
expect ( pkg . scripts . lint ) . toBeTruthy ( )
44
- expect ( pkg . eslintConfig ) . toEqual ( {
45
- root : true ,
46
- extends : [ 'plugin:vue/essential' , '@vue/standard' ]
49
+ expect ( pkg . eslintConfig . extends ) . toEqual ( [
50
+ 'plugin:vue/essential' ,
51
+ '@vue/standard'
52
+ ] )
53
+ expect ( pkg . eslintConfig . parserOptions ) . toEqual ( {
54
+ parser : 'babel-eslint'
47
55
} )
48
56
expect ( pkg . devDependencies ) . toHaveProperty ( '@vue/eslint-config-standard' )
49
57
} )
@@ -58,9 +66,12 @@ test('prettier', async () => {
58
66
} )
59
67
60
68
expect ( pkg . scripts . lint ) . toBeTruthy ( )
61
- expect ( pkg . eslintConfig ) . toEqual ( {
62
- root : true ,
63
- extends : [ 'plugin:vue/essential' , '@vue/prettier' ]
69
+ expect ( pkg . eslintConfig . extends ) . toEqual ( [
70
+ 'plugin:vue/essential' ,
71
+ '@vue/prettier'
72
+ ] )
73
+ expect ( pkg . eslintConfig . parserOptions ) . toEqual ( {
74
+ parser : 'babel-eslint'
64
75
} )
65
76
expect ( pkg . devDependencies ) . toHaveProperty ( '@vue/eslint-config-prettier' )
66
77
} )
@@ -82,10 +93,12 @@ test('typescript', async () => {
82
93
] )
83
94
84
95
expect ( pkg . scripts . lint ) . toBeTruthy ( )
85
- expect ( pkg . eslintConfig ) . toEqual ( {
86
- root : true ,
87
- extends : [ 'plugin:vue/essential' , '@vue/prettier' , '@vue/typescript' ]
88
- } )
96
+ expect ( pkg . eslintConfig . extends ) . toEqual ( [
97
+ 'plugin:vue/essential' ,
98
+ '@vue/prettier' ,
99
+ '@vue/typescript'
100
+ ] )
101
+ expect ( pkg . eslintConfig ) . not . toHaveProperty ( 'parserOptions' )
89
102
expect ( pkg . devDependencies ) . toHaveProperty ( '@vue/eslint-config-prettier' )
90
103
expect ( pkg . devDependencies ) . toHaveProperty ( '@vue/eslint-config-typescript' )
91
104
} )
0 commit comments