forked from ruxailab/RUXAILAB
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
76 lines (67 loc) · 1.93 KB
/
eslint.config.mjs
File metadata and controls
76 lines (67 loc) · 1.93 KB
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
76
import { defineConfig } from 'eslint/config'
import vueParser from 'vue-eslint-parser'
import babelParser from '@babel/eslint-parser'
import pluginVue from 'eslint-plugin-vue'
import vuetify from 'eslint-plugin-vuetify'
import globals from 'globals'
import eslintConfigPrettier from 'eslint-config-prettier'
import VueI18n from '@intlify/eslint-plugin-vue-i18n'
export default defineConfig([
{
ignores: ['src/features/legal/**'],
},
{
files: ['src/**/*.{js,vue}'],
languageOptions: {
parser: vueParser,
parserOptions: {
parser: babelParser,
ecmaVersion: 'latest',
sourceType: 'module',
requireConfigFile: false,
},
globals: {
...globals.browser,
},
},
plugins: {
vue: pluginVue,
vuetify,
'vue-i18n': VueI18n,
},
settings: {
'vue-i18n': {
localeDir: './src/app/plugins/locales/*.json',
messageSyntaxVersion: '^9.0.0',
},
},
extends: [
...pluginVue.configs['flat/recommended'],
...vuetify.configs['flat/base'],
...VueI18n.configs['flat/recommended'],
eslintConfigPrettier, // disable rules that conflicts with prettier
],
rules: {
// Environment
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
// Vue
'vue/multi-word-component-names': 'off',
'vue/no-required-prop-with-default': 'off',
'vue/require-default-prop': 'off',
'vue/no-template-shadow': 'off',
// JS
'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
// Prettier format
semi: 'off',
// Vue I18n
'@intlify/vue-i18n/no-raw-text': [
'warn',
{
ignorePattern: String.raw`^\s*[mdi-]|^[%.,!?;:()\s/•-]+$|^\d+$|^\/\d+$`
},
],
'@intlify/vue-i18n/no-missing-keys': 'warn',
},
},
])