Skip to content

Instantly share code, notes, and snippets.

@Manyaka
Last active May 28, 2021 08:40
Show Gist options
  • Save Manyaka/b4bc7d44a97db55ff2ed9aad57c4ca0e to your computer and use it in GitHub Desktop.
Save Manyaka/b4bc7d44a97db55ff2ed9aad57c4ca0e to your computer and use it in GitHub Desktop.
.eslintrc.js
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