-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
64 lines (63 loc) · 1.46 KB
/
eslint.config.js
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
import globals from "globals";
import pluginJs from "@eslint/js";
import vueI18n from "@intlify/eslint-plugin-vue-i18n";
import tseslint from "typescript-eslint";
import pluginVue from "eslint-plugin-vue";
export default [
{
files: ["**/*.{js,mjs,cjs,ts,vue}"]
},
{
languageOptions: {
globals: globals.browser
}
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
...pluginVue.configs["flat/essential"],
{
files: ["**/*.vue"],
languageOptions: {
parserOptions: {
parser: tseslint.parser
}
}
},
...vueI18n.configs["flat/base"],
{
rules: {
'@intlify/vue-i18n/no-dynamic-keys': 'error',
'@intlify/vue-i18n/no-unused-keys': [
'error',
{
extensions: ['.ts', '.js', '.vue'],
},
],
'@intlify/vue-i18n/no-raw-text': [
'error',
{
'attributes': {
'/.+/': [
'title',
'aria-label',
'aria-placeholder',
'aria-roledescription',
'aria-valuetext',
],
'input': ['placeholder'],
'img': ['alt'],
},
'ignoreNodes': ['md-icon', 'v-icon'],
'ignorePattern': '^[-#:()&]+$',
'ignoreText': ['EUR', 'HKD', 'USD'],
},
],
},
settings: {
'vue-i18n': {
localeDir: './src/translations/*.ts',
messageSyntaxVersion: '^9.0.0',
},
},
},
];