-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
75 lines (74 loc) · 2.24 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
require('@rushstack/eslint-patch/modern-module-resolution')
/**
* @type {import('eslint").Linter.Config}
*/
module.exports = {
root: true,
extends: [
'plugin:vue/vue3-recommended',
'eslint:recommended',
'plugin:@intlify/vue-i18n/recommended',
'@vue/eslint-config-typescript/recommended',
'@vue/eslint-config-prettier',
],
rules: {
'prefer-template': 'warn',
'vue/block-lang': ['error', { script: { lang: 'ts' } }],
'vue/component-api-style': ['error', ['script-setup']],
'vue/component-name-in-template-casing': ['error', 'PascalCase'],
'vue/custom-event-name-casing': ['error', 'camelCase'],
'vue/no-empty-component-block': 'error',
'vue/no-template-target-blank': 'error',
'vue/no-useless-mustaches': 'error',
'vue/padding-line-between-blocks': 'error',
'vue/prefer-separate-static-class': 'error',
'vue/prefer-true-attribute-shorthand': 'error',
'vue/v-for-delimiter-style': 'error',
'vue/v-on-function-call': 'error',
'vue/no-undef-components': 'error',
'vue/component-tags-order': [
'error',
{ order: ['script', 'template', 'style'] },
],
'@intlify/vue-i18n/key-format-style': 'error',
'@intlify/vue-i18n/no-duplicate-keys-in-locale': 'error',
'@intlify/vue-i18n/no-dynamic-keys': 'error',
'@intlify/vue-i18n/no-missing-keys-in-other-locales': 'error',
'@intlify/vue-i18n/no-unknown-locale': 'error',
'@intlify/vue-i18n/no-unused-keys': 'error',
'@intlify/vue-i18n/prefer-sfc-lang-attr': 'error',
'@intlify/vue-i18n/prefer-linked-key-with-paren': 'error',
'@intlify/vue-i18n/sfc-locale-attr': 'error',
'@intlify/vue-i18n/no-raw-text': [
'error',
{
ignorePattern: '^\\s*[-#:|()&]+\\s*$',
},
],
},
settings: {
'vue-i18n': {
localeDir: {
pattern: './src/locales/*.{json,json5,yaml,yml}',
localeKey: 'file',
},
messageSyntaxVersion: '^9.0.0',
},
},
overrides: [
{
files: ['cypress/e2e/**/*.{cy,spec}.{js,ts,jsx,tsx}'],
extends: ['plugin:cypress/recommended'],
},
{
files: ['./*'],
env: {
node: true,
},
},
],
parserOptions: {
ecmaVersion: 'latest',
warnOnUnsupportedTypeScriptVersion: false,
},
}