-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
71 lines (70 loc) · 2.37 KB
/
eslint.config.mjs
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
import stylistic from '@stylistic/eslint-plugin'
// import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
import vueTsEslintConfig from '@vue/eslint-config-typescript'
import pluginVue from 'eslint-plugin-vue'
export default [
{
name: 'app/files-to-lint',
files: ['**/*.{ts,mts,tsx,vue}'],
},
{
name: 'app/files-to-ignore',
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**', '.stylelintrc.js', '**/cypress/**'],
},
...pluginVue.configs['flat/essential'],
...pluginVue.configs['flat/strongly-recommended'],
...pluginVue.configs['flat/recommended'],
...vueTsEslintConfig(),
{
plugins: {
'@stylistic': stylistic,
},
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'vue/script-setup-uses-vars': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@stylistic/semi': ['error', 'never'],
'@stylistic/quotes': ['error', 'single', 'avoid-escape'],
'vue/multi-word-component-names': [
'error',
{
ignores: ['Acl'],
},
],
'vue/valid-v-slot': ['error', { allowModifiers: true }],
'@stylistic/object-curly-spacing': ['error', 'always'],
'@stylistic/no-multiple-empty-lines': ['error', { max: 1, maxEOF: 1 }],
'@stylistic/no-trailing-spaces': 'error',
'@stylistic/comma-dangle': ['error', 'only-multiline'],
'@stylistic/max-len': [
'error',
{
code: 120,
ignoreTrailingComments: true,
ignoreUrls: true,
ignoreRegExpLiterals: true,
ignorePattern: '^import .*',
},
],
'vue/no-template-target-blank': ['error'],
'vue/block-order': ['error', { order: [['script', 'template'], 'style'] }],
'vue/define-macros-order': ['error'],
'vue/component-name-in-template-casing': ['error'],
'vue/component-api-style': ['error'],
'vue/prefer-define-options': ['error'],
'vue/require-typed-ref': ['error'],
'vue/no-setup-props-reactivity-loss': ['error'],
'vue/no-ref-object-reactivity-loss': ['error'],
'@typescript-eslint/no-unused-vars': [
'error',
{
caughtErrors: 'none',
},
],
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
},
},
// skipFormatting,
]