refactor: disable loading project config from rc

This commit is contained in:
Evan You
2018-01-29 18:32:41 -05:00
parent b6853be59b
commit 6efabe11b0
2 changed files with 1 additions and 8 deletions

View File

@@ -59,14 +59,6 @@ test('load project options from vue.config.js', () => {
fs.unlinkSync('/vue.config.js')
})
test('load project options from .vuerc', () => {
fs.writeFileSync('/.vuerc', JSON.stringify({ lintOnSave: false }))
const service = createMockService()
// vue.config.js has higher priority
expect(service.projectOptions.lintOnSave).toBe(false)
fs.unlinkSync('/.vuerc')
})
test('package.json option should take priority', () => {
fs.writeFileSync('/vue.config.js', `module.exports=${JSON.stringify({ lintOnSave: false })}`)
mockPkg({

View File

@@ -155,6 +155,7 @@ module.exports = class Service {
resolved = this.pkg.vue
} else {
const explorer = cosmiconfig('vue', {
rc: false,
sync: true,
stopDir: this.context
})