2017-07-23 18:42:08 +00:00
|
|
|
// http://eslint.org/docs/user-guide/configuring
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
root: true,
|
|
|
|
parser: 'babel-eslint',
|
|
|
|
parserOptions: {
|
|
|
|
sourceType: 'module'
|
|
|
|
},
|
|
|
|
env: {
|
|
|
|
browser: true,
|
|
|
|
},
|
|
|
|
extends: 'airbnb-base',
|
|
|
|
// required to lint *.vue files
|
|
|
|
plugins: [
|
|
|
|
'html'
|
|
|
|
],
|
2017-10-02 00:34:48 +00:00
|
|
|
globals: {
|
|
|
|
"NODE_ENV": false,
|
2018-01-04 20:19:10 +00:00
|
|
|
"VERSION": false,
|
|
|
|
"GOOGLE_CLIENT_ID": false,
|
|
|
|
"GITHUB_CLIENT_ID": false
|
2017-10-02 00:34:48 +00:00
|
|
|
},
|
2017-07-23 18:42:08 +00:00
|
|
|
// check if imports actually resolve
|
|
|
|
'settings': {
|
|
|
|
'import/resolver': {
|
|
|
|
'webpack': {
|
|
|
|
'config': 'build/webpack.base.conf.js'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
// add your custom rules here
|
|
|
|
'rules': {
|
|
|
|
'no-param-reassign': [2, { 'props': false }],
|
|
|
|
// don't require .vue extension when importing
|
|
|
|
'import/extensions': ['error', 'always', {
|
|
|
|
'js': 'never',
|
|
|
|
'vue': 'never'
|
|
|
|
}],
|
|
|
|
// allow optionalDependencies
|
|
|
|
'import/no-extraneous-dependencies': ['error', {
|
|
|
|
'optionalDependencies': ['test/unit/index.js']
|
|
|
|
}],
|
|
|
|
// allow debugger during development
|
|
|
|
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
|
|
|
|
}
|
|
|
|
}
|