Created
October 25, 2019 08:00
-
-
Save whidy/38a1cb75009b610283523594e3ea3577 to your computer and use it in GitHub Desktop.
Vue.js develop with ESLint config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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