Skip to content

Instantly share code, notes, and snippets.

@whidy
Created October 25, 2019 08:00
Show Gist options
  • Save whidy/38a1cb75009b610283523594e3ea3577 to your computer and use it in GitHub Desktop.
Save whidy/38a1cb75009b610283523594e3ea3577 to your computer and use it in GitHub Desktop.
Vue.js develop with ESLint config
module.exports = {
root: true,
env: {
browser: true,
node: true
},
parserOptions: {
parser: 'babel-eslint',
ecmaFeatures: {
legacyDecorators: true
}
},
// with vue cli
extends: [
'plugin:vue/recommended'
],
// if nuxt
// extends: [
// '@nuxtjs',
// 'plugin:nuxt/recommended'
// ],
rules: {
'space-before-function-paren': ["error", "never"],
'nuxt/no-cjs-in-config': 'off',
'no-console': 'off',
'no-unused-vars': 'off',
quotes: [2, 'single'],
semi: [2, 'never'],
'comma-dangle': ['error', 'never'],
'vue/html-closing-bracket-newline': [
2,
{
singleline: 'never',
multiline: 'never'
}
],
'vue/singleline-html-element-content-newline': 'off',
'vue/max-attributes-per-line': [
2,
{
singleline: 3,
multiline: {
max: 1,
allowFirstLine: false
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment