Skip to content

Commit

Permalink
feat: don't throw on console/debugger statements for vue serve (#5029)
Browse files Browse the repository at this point in the history
1. they're useful in development
2. to be in line with the default preset
  • Loading branch information
sodatea authored and pksunkara committed Jan 6, 2020
1 parent 2531d10 commit 413470d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/@vue/cli-service-global/lib/globalConfigPlugin.js
Expand Up @@ -112,6 +112,10 @@ module.exports = function createConfigPlugin (context, entry, asLib) {
],
parserOptions: {
parser: 'babel-eslint'
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': `process.env.NODE_ENV === 'production' ? 'error' : 'off'`
}
}
}))
Expand Down

0 comments on commit 413470d

Please sign in to comment.