-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.eslintrc.cjs
59 lines (57 loc) · 2.15 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
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution');
const path = require('path');
module.exports = {
root: true,
plugins: ['import'],
extends: [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier/skip-formatting',
'plugin:@intlify/vue-i18n/recommended'
],
rules: {
'max-len': ['warn', { "code": 120 }],
'semi': ['error', 'always'],
'object-curly-spacing': ['error', 'always'],
'vue/component-api-style': ['error', ['script-setup', 'composition']],
'vue/block-lang': ['error', { 'script': { 'lang': 'ts' } }],
"vue/mustache-interpolation-spacing": ["error", "always"],
'@intlify/vue-i18n/no-raw-text': 'error',
'@intlify/vue-i18n/no-missing-keys': 'error',
'@intlify/vue-i18n/no-missing-keys-in-other-locales': ['error'],
'@intlify/vue-i18n/no-unused-keys': ['warn', { 'enableFix': false, 'extensions': ['.js', '.vue', '.ts'] }],
'@intlify/vue-i18n/no-duplicate-keys-in-locale': 'error'
},
ignorePatterns: ["/src/components/icons/*.vue", "package-lock.json"],
parserOptions: {
ecmaVersion: 'latest'
},
settings: {
'vue-i18n': {
localeDir: [
// English locale configuration
{
pattern: './src/locales/en/**/*.json', // Match JSON files in the English 'modules' folder
localePattern: "^.*\\\\(?<locale>en)\\\\.*\\.json$", // Regex to capture 'en' in the path
localeKey: 'path'
},
{
pattern: './src/locales/nl/**/*.json', // Match JSON files in the English 'modules' folder
localePattern: "^.*\\\\(?<locale>nl)\\\\.*\\.json$", // Regex to capture 'en' in the path
localeKey: 'path'
},
],
messageSyntaxVersion: '^9.2.2'
}
},
overrides: [
{
files: ['src/locales/**/*.json'],
rules: {
'max-len': 'off'
}
}
]
};