Skip to content

Commit f69a806

Browse files
committed
test: add test for #4347
1 parent 59d3e74 commit f69a806

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

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

+17
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,23 @@ test('lint on commit', async () => {
136136
})
137137
})
138138

139+
test('should lint ts files when typescript plugin co-exists', async () => {
140+
const { read } = await create('eslint-lint-ts-files', {
141+
plugins: {
142+
'@vue/cli-plugin-eslint': {
143+
lintOn: 'commit'
144+
},
145+
'@vue/cli-plugin-typescript': {}
146+
}
147+
}, null, true)
148+
const pkg = JSON.parse(await read('package.json'))
149+
expect(pkg).toMatchObject({
150+
'lint-staged': {
151+
'*.{js,vue,ts}': ['vue-cli-service lint', 'git add']
152+
}
153+
})
154+
})
155+
139156
test('generate .editorconfig for new projects', async () => {
140157
const { files } = await generateWithPlugin({
141158
id: 'eslint',

0 commit comments

Comments
 (0)