-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy patheslint.config.mjs
More file actions
82 lines (77 loc) · 2.46 KB
/
eslint.config.mjs
File metadata and controls
82 lines (77 loc) · 2.46 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
77
78
79
80
81
82
import js from '@eslint/js';
import vue from 'eslint-plugin-vue';
import importPlugin from 'eslint-plugin-import-x';
import globals from 'globals';
export default [
{
ignores: [
'dist/**',
'node_modules/**',
'public/**',
'docs/**',
'coverage/**',
'user-data/**',
],
},
js.configs.recommended,
...vue.configs['flat/recommended'],
importPlugin.flatConfigs.recommended,
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.browser,
...globals.node,
...globals.es2022,
},
},
settings: {
'import-x/resolver-next': [importPlugin.createNodeResolver({ extensions: ['.js', '.mjs', '.vue'] })],
},
rules: {
'arrow-parens': 'off',
'no-else-return': 'off',
'no-console': 'off',
'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'vue/multi-word-component-names': 'off',
'vue/no-reserved-component-names': 'off',
'vue/no-v-html': ['warn', { ignorePattern: '(?:^|\\.)(sanitized|safeHtml)' }],
// TODO: Enable these rules. Once I have enough sanity to fix all issues.
'vue/html-indent': 'off',
'vue/max-attributes-per-line': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/multiline-html-element-content-newline': 'off',
'vue/html-self-closing': 'off',
'vue/attributes-order': 'off',
'vue/attribute-hyphenation': 'off',
'vue/v-on-event-hyphenation': 'off',
'vue/first-attribute-linebreak': 'off',
'vue/html-closing-bracket-newline': 'off',
'vue/html-closing-bracket-spacing': 'off',
'vue/mustache-interpolation-spacing': 'off',
'vue/order-in-components': 'off',
'vue/no-multi-spaces': 'off',
'vue/v-bind-style': 'off',
'vue/v-on-style': 'off',
'vue/v-slot-style': 'off',
'vue/component-definition-name-casing': 'off',
'import-x/no-unresolved': 'off',
'import-x/extensions': 'off',
'import-x/order': ['warn', {
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
'newlines-between': 'ignore',
}],
'import-x/newline-after-import': 'warn',
'import-x/no-duplicates': 'error',
},
},
{
files: ['tests/**', 'vitest.config.mjs', 'vite.config.mjs', 'eslint.config.mjs'],
rules: {
'no-undef': 'off',
'no-unused-vars': 'off',
'import-x/no-extraneous-dependencies': 'off',
},
},
];