Last active
May 28, 2021 08:40
-
-
Save Manyaka/b4bc7d44a97db55ff2ed9aad57c4ca0e to your computer and use it in GitHub Desktop.
.eslintrc.js
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: { | |
es2021: true, | |
browser: true, | |
node: true | |
}, | |
plugins: [ | |
'prettier', | |
'vue' | |
], | |
extends: [ | |
'eslint:recommended', | |
'plugin:vue/recommended', | |
'plugin:prettier/recommended' | |
], | |
rules: { | |
'prettier/prettier': ['warn'], | |
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | |
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | |
// override default options for rules from base configurations | |
'arrow-parens': ['error', 'always'], | |
'comma-dangle': ['error', 'only-multiline'], | |
// disable rules from base configurations | |
indent: ['off', 2], | |
'spaced-comment': 'off', | |
'prefer-const': 'off', | |
'template-curly-spacing': 'off', | |
semi: ['error', 'always'], | |
//vue | |
'vue/html-self-closing': [ | |
'warn', | |
{ | |
html: { | |
void: 'always', | |
normal: 'any', | |
component: 'always' | |
} | |
} | |
], | |
'vue/max-attributes-per-line': [ | |
'warn', | |
{ | |
singleline: 3, | |
multiline: { | |
max: 3, | |
allowFirstLine: true | |
} | |
} | |
], | |
'vue/html-closing-bracket-newline': [ | |
'warn', | |
{ | |
singleline: 'never', | |
multiline: 'always' | |
} | |
], | |
'vue/html-closing-bracket-spacing': [ | |
'warn', | |
{ | |
startTag: 'never', | |
endTag: 'never', | |
selfClosingTag: 'always' | |
} | |
], | |
'vue/multiline-html-element-content-newline': [ | |
'warn', | |
{ | |
ignoreWhenEmpty: true, | |
ignores: ['pre', 'textarea'], | |
allowEmptyLines: true | |
} | |
], | |
'vue/singleline-html-element-content-newline': 'off', | |
'vue/return-in-computed-property': ['warn'], | |
'vue/v-slot-style': ['off'], | |
'vue/component-definition-name-casing': ['warn', 'kebab-case'], | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment