Skip to content

Commit d96067f

Browse files
authored
test: Adjust tests for new parserOptions
1 parent 9a65ace commit d96067f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

packages/@vue/cli-plugin-eslint/__tests__/eslintGenerator.spec.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ test('base', async () => {
1212
'plugin:vue/essential', 'eslint:recommended'
1313
])
1414
expect(pkg.eslintConfig.parserOptions).toEqual({
15-
parser: 'babel-eslint'
15+
parser: 'babel-eslint',
16+
ecmaVersion: 2017
1617
})
1718
})
1819

@@ -31,7 +32,8 @@ test('airbnb', async () => {
3132
'@vue/airbnb'
3233
])
3334
expect(pkg.eslintConfig.parserOptions).toEqual({
34-
parser: 'babel-eslint'
35+
parser: 'babel-eslint',
36+
ecmaVersion: 2017
3537
})
3638
expect(pkg.devDependencies).toHaveProperty('@vue/eslint-config-airbnb')
3739
})
@@ -51,7 +53,8 @@ test('standard', async () => {
5153
'@vue/standard'
5254
])
5355
expect(pkg.eslintConfig.parserOptions).toEqual({
54-
parser: 'babel-eslint'
56+
parser: 'babel-eslint',
57+
ecmaVersion: 2017
5558
})
5659
expect(pkg.devDependencies).toHaveProperty('@vue/eslint-config-standard')
5760
})
@@ -71,7 +74,8 @@ test('prettier', async () => {
7174
'@vue/prettier'
7275
])
7376
expect(pkg.eslintConfig.parserOptions).toEqual({
74-
parser: 'babel-eslint'
77+
parser: 'babel-eslint',
78+
ecmaVersion: 2017
7579
})
7680
expect(pkg.devDependencies).toHaveProperty('@vue/eslint-config-prettier')
7781
})

0 commit comments

Comments
 (0)