This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/@vue/cli-plugin-eslint/eslintOptions.js

31 lines
856 B
JavaScript
Raw Permalink Normal View History

2019-08-11 18:48:02 +00:00
exports.config = api => {
const config = {
root: true,
env: { node: true },
extends: ['plugin:vue/essential'],
rules: {
'no-console': makeJSOnlyValue(`process.env.NODE_ENV === 'production' ? 'error' : 'off'`),
'no-debugger': makeJSOnlyValue(`process.env.NODE_ENV === 'production' ? 'error' : 'off'`)
}
}
if (!api.hasPlugin('typescript')) {
config.parserOptions = {
parser: 'babel-eslint'
}
}
return config
}
// __expression is a special flag that allows us to customize stringification
// output when extracting configs into standalone files
function makeJSOnlyValue (str) {
const fn = () => {}
fn.__expression = str
return fn
}
const baseExtensions = ['.js', '.jsx', '.vue']
exports.extensions = api => api.hasPlugin('typescript')
? baseExtensions.concat('.ts', '.tsx')
: baseExtensions