Skip to content

Instantly share code, notes, and snippets.

@brs14ku
Created December 9, 2017 16:38
Show Gist options
  • Save brs14ku/c8407437e378639ae721f78f6c798fd9 to your computer and use it in GitHub Desktop.
Save brs14ku/c8407437e378639ae721f78f6c798fd9 to your computer and use it in GitHub Desktop.
eslint
// http://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
env: {
browser: true,
},
"globals": {
"Promise": true,
"process": true,
"google": true
},
// required to lint *.vue files
plugins: [
'html'
],
// add your custom rules here
'rules': {
// Warn of Debugger statements, Console.logs(), and Unused vars while developing ...but don't let these break compiling (until you're building for higher environments)
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 1,
'no-console': process.env.NODE_ENV === 'production' ? 2 : 1,
'no-unused-vars': process.env.NODE_ENV === 'production' ? 2 : 1,
'no-unreachable': process.env.NODE_ENV === 'production' ? 2 : 1
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment