@@ -8,9 +8,11 @@ test('base', async () => {
88 } )
99
1010 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'
1416 } )
1517} )
1618
@@ -24,9 +26,12 @@ test('airbnb', async () => {
2426 } )
2527
2628 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'
3035 } )
3136 expect ( pkg . devDependencies ) . toHaveProperty ( '@vue/eslint-config-airbnb' )
3237} )
@@ -41,9 +46,12 @@ test('standard', async () => {
4146 } )
4247
4348 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'
4755 } )
4856 expect ( pkg . devDependencies ) . toHaveProperty ( '@vue/eslint-config-standard' )
4957} )
@@ -58,9 +66,12 @@ test('prettier', async () => {
5866 } )
5967
6068 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'
6475 } )
6576 expect ( pkg . devDependencies ) . toHaveProperty ( '@vue/eslint-config-prettier' )
6677} )
@@ -82,10 +93,12 @@ test('typescript', async () => {
8293 ] )
8394
8495 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' )
89102 expect ( pkg . devDependencies ) . toHaveProperty ( '@vue/eslint-config-prettier' )
90103 expect ( pkg . devDependencies ) . toHaveProperty ( '@vue/eslint-config-typescript' )
91104} )
0 commit comments