-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.cjs
61 lines (60 loc) · 1.77 KB
/
.eslintrc.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution');
module.exports = {
root: true,
ignorePatterns: ['dist'],
parserOptions: {
ecmaVersion: '2022',
sourceType: 'module'
},
extends: [
'plugin:vue/vue3-strongly-recommended',
'eslint:recommended',
'@vue/eslint-config-prettier'
],
env: {
'vue/setup-compiler-macros': true
},
rules: {
'no-unused-vars': [
'error',
{ varsIgnorePattern: '^_', argsIgnorePattern: '^_' }
],
'vue/multi-word-component-names': 'off',
'vue/script-setup-uses-vars': 'error',
'vue/v-on-function-call': ['warn', 'never'],
'vue/require-emit-validator': ['error'],
'vue/require-explicit-emits': ['error'],
'vue/prefer-separate-static-class': ['error'],
'vue/padding-line-between-blocks': ['error', 'always'],
'vue/no-unused-refs': ['error'],
'vue/no-unused-properties': ['error'],
'vue/no-undef-properties': ['error'],
'vue/no-duplicate-attr-inheritance': ['warn'],
'vue/component-definition-name-casing': ['error', 'PascalCase'],
'vue/component-name-in-template-casing': [
'error',
'PascalCase',
{ registeredComponentsOnly: false }
],
'vue/component-options-name-casing': ['error', 'PascalCase'],
'vue/attribute-hyphenation': ['error', 'never'],
'vue/v-on-event-hyphenation': ['error', 'never', { autofix: true }],
'vue/custom-event-name-casing': ['error', 'camelCase'],
'vue/component-tags-order': [
'error',
{
order: ['route', 'script', 'template', 'style']
}
]
},
overrides: [
{
files: [
'**/__tests__/*.spec.{js,ts,jsx,tsx}',
'cypress/integration/**.spec.{js,ts,jsx,tsx}'
],
extends: ['plugin:cypress/recommended']
}
]
};