mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-03-12 20:19:55 -05:00
refactor(cli-plugin-eslint): merge lint-staged config (#3487)
This commit is contained in:
committed by
Haoqun Jiang
parent
94ff7bf33c
commit
f2a6db2337
@@ -129,8 +129,7 @@ test('lint on commit', async () => {
|
||||
expect(pkg.gitHooks['pre-commit']).toBe('lint-staged')
|
||||
expect(pkg.devDependencies).toHaveProperty('lint-staged')
|
||||
expect(pkg['lint-staged']).toEqual({
|
||||
'*.js': ['vue-cli-service lint', 'git add'],
|
||||
'*.vue': ['vue-cli-service lint', 'git add']
|
||||
'*.{js,vue}': ['vue-cli-service lint', 'git add']
|
||||
})
|
||||
expect(pkg.vue).toEqual({
|
||||
lintOnSave: false
|
||||
|
||||
@@ -77,8 +77,7 @@ module.exports = (api, { config, lintOn = [] }, _, invoking) => {
|
||||
'pre-commit': 'lint-staged'
|
||||
}
|
||||
pkg['lint-staged'] = {
|
||||
'*.js': ['vue-cli-service lint', 'git add'],
|
||||
'*.vue': ['vue-cli-service lint', 'git add']
|
||||
'*.{js,vue}': ['vue-cli-service lint', 'git add']
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user