mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-02-09 00:18:28 -06:00
21 lines
466 B
JavaScript
21 lines
466 B
JavaScript
module.exports = api => {
|
|
const options = {
|
|
extensions: ['.js', '.vue'],
|
|
envs: ['node'],
|
|
rules: {
|
|
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
|
|
}
|
|
}
|
|
|
|
if (api.hasPlugin('typescript')) {
|
|
options.extensions.push('.ts')
|
|
} else {
|
|
options.parserOptions = {
|
|
parser: require.resolve('babel-eslint')
|
|
}
|
|
}
|
|
|
|
return options
|
|
}
|