Last active
January 11, 2024 20:37
-
-
Save santiagoaloi/49b60756d872114bee27c1012aaf8aef to your computer and use it in GitHub Desktop.
.eslintrc.cjs
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
/* eslint-env node */ | |
// require('@rushstack/eslint-patch/modern-module-resolution') | |
module.exports = { | |
root: true, | |
extends: [ | |
'./.eslintrc-auto-import.json', | |
'plugin:vue/vue3-strongly-recommended', | |
'plugin:vuetify/base', | |
'eslint:recommended', | |
// Skip formatting rules from ESLint when using Prettier. | |
'@vue/eslint-config-prettier/skip-formatting' | |
// 'plugin:tailwindcss/recommended' | |
], | |
plugins: ['prettier'], | |
parserOptions: { | |
ecmaVersion: 'latest', | |
sourceType: 'module' | |
}, | |
rules: { | |
'vue/html-comment-indent': ['error'], | |
'vue/html-comment-content-spacing': ['error', 'always'], | |
'vue/html-comment-content-newline': [ | |
'error', | |
{ | |
singleline: 'never', | |
multiline: 'never' | |
} | |
], | |
'vue/block-tag-newline': [ | |
'error', | |
{ | |
singleline: 'always', | |
multiline: 'always', | |
maxEmptyLines: 0, | |
blocks: { | |
template: { | |
singleline: 'always', | |
multiline: 'always', | |
maxEmptyLines: 0 | |
}, | |
script: { | |
singleline: 'always', | |
multiline: 'always', | |
maxEmptyLines: 0 | |
} | |
} | |
} | |
], | |
'vue/define-macros-order': [ | |
'error', | |
{ | |
order: ['defineProps', 'defineEmits'] | |
} | |
], | |
// Enforce PascalCase for component names in Vue templates. | |
// For example, <some-component /> becomes <SomeComponent /> | |
'vue/component-name-in-template-casing': [ | |
'error', | |
'PascalCase', | |
{ | |
registeredComponentsOnly: false, | |
ignores: [] | |
} | |
], | |
// Define the order of attributes in Vue templates. | |
'vue/attributes-order': [ | |
'error', | |
{ | |
order: [ | |
'DEFINITION', | |
'LIST_RENDERING', | |
'CONDITIONALS', | |
'RENDER_MODIFIERS', | |
'GLOBAL', | |
['UNIQUE', 'SLOT'], | |
'TWO_WAY_BINDING', | |
'ATTR_DYNAMIC', | |
'OTHER_DIRECTIVES', | |
['ATTR_STATIC', 'ATTR_SHORTHAND_BOOL'], | |
'EVENTS', | |
'CONTENT' | |
], | |
alphabetical: true | |
} | |
], | |
'vue/multi-word-component-names': 'off', | |
'no-irregular-whitespace': 'off' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment