70 lines
1.8 KiB
JavaScript
70 lines
1.8 KiB
JavaScript
|
// http://eslint.org/docs/user-guide/configuring
|
||
|
|
||
|
module.exports = {
|
||
|
root: true,
|
||
|
parserOptions: {
|
||
|
parser: 'babel-eslint',
|
||
|
sourceType: 'module'
|
||
|
},
|
||
|
extends: [
|
||
|
// https://github.com/vuejs/eslint-plugin-vue#bulb-rules
|
||
|
'plugin:vue/essential',
|
||
|
'plugin:vue/recommended',
|
||
|
'plugin:vue/strongly-recommended',
|
||
|
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
|
||
|
'standard',
|
||
|
'prettier/standard'
|
||
|
],
|
||
|
// required to lint *.vue files
|
||
|
plugins: ['vue'],
|
||
|
// add your custom rules here
|
||
|
rules: {
|
||
|
// allow paren-less arrow functions
|
||
|
'arrow-parens': 0,
|
||
|
// allow async-await
|
||
|
'generator-star-spacing': 0,
|
||
|
// allow debugger during development
|
||
|
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
|
||
|
'no-multi-spaces': ['error', { ignoreEOLComments: true }],
|
||
|
'no-template-curly-in-string': 0,
|
||
|
// to many false positives
|
||
|
'vue/no-side-effects-in-computed-properties': 0,
|
||
|
// fix unused var error for JSX custom tags
|
||
|
'vue/jsx-uses-vars': 2,
|
||
|
'vue/require-default-prop': 0,
|
||
|
'vue/name-property-casing': ['error', 'kebab-case'],
|
||
|
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
|
||
|
'vue/html-indent': [
|
||
|
'error',
|
||
|
2,
|
||
|
{
|
||
|
attribute: 1,
|
||
|
baseIndent: 0,
|
||
|
closeBracket: 0,
|
||
|
alignAttributesVertically: true
|
||
|
}
|
||
|
],
|
||
|
'vue/html-self-closing': [
|
||
|
'error',
|
||
|
{
|
||
|
html: {
|
||
|
void: 'never',
|
||
|
normal: 'always',
|
||
|
component: 'always'
|
||
|
},
|
||
|
svg: 'always',
|
||
|
math: 'always'
|
||
|
}
|
||
|
],
|
||
|
'vue/html-closing-bracket-spacing': [
|
||
|
'error',
|
||
|
{
|
||
|
startTag: 'never',
|
||
|
endTag: 'never',
|
||
|
selfClosingTag: 'never'
|
||
|
}
|
||
|
],
|
||
|
'vue/no-v-html': 0
|
||
|
}
|
||
|
}
|