Skip to content

Instantly share code, notes, and snippets.

@jbenner-radham
Last active May 31, 2018 16:12
Show Gist options
  • Select an option

  • Save jbenner-radham/5cbdfa991d207a32f2f98e87125576ca to your computer and use it in GitHub Desktop.

Select an option

Save jbenner-radham/5cbdfa991d207a32f2f98e87125576ca to your computer and use it in GitHub Desktop.
Testing out an ESLint config for Vue CLI projects.
module.exports = {
root: true,
env: {
node: true
},
extends: [
'plugin:vue/recommended',
'eslint:recommended'
],
rules: {
camelcase: 'error',
'comma-dangle': ['error', 'never'],
'consistent-return': 'off',
'eol-last': ['error', 'always'],
indent: ['error', 4],
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-trailing-spaces': 'error',
'object-curly-spacing': ['error', 'always'],
quotes: ['error', 'single'],
semi: ['error', 'always']
},
parserOptions: {
parser: 'babel-eslint' // TODO: Is this still needed?!
},
overrides: [
{
files: ['**/*.vue'],
rules: {
indent: 'off',
'vue/html-indent': ['error', 4],
'vue/max-attributes-per-line': 'off',
'vue/script-indent': ['error', 4, { baseIndent: 1, switchCase: 1 }]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment