Skip to content

Commit

Permalink
refactor: disable loading project config from rc
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 29, 2018
1 parent b6853be commit 6efabe1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
8 changes: 0 additions & 8 deletions packages/@vue/cli-service/__tests__/Service.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
1 change: 1 addition & 0 deletions packages/@vue/cli-service/lib/Service.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ module.exports = class Service {
resolved = this.pkg.vue
} else {
const explorer = cosmiconfig('vue', {
rc: false,
sync: true,
stopDir: this.context
})
Expand Down

0 comments on commit 6efabe1

Please sign in to comment.