forked from ping-pub/explorer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.mjs
73 lines (70 loc) · 2.24 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
72
73
import globals from 'globals';
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintPluginVue from 'eslint-plugin-vue';
import eslintPrettierConfig from 'eslint-config-prettier';
import eslintPluginPrettier from 'eslint-plugin-prettier/recommended';
export default tseslint.config(
{ files: ['**/*.{js,mjs,cjs,ts,vue,html}'] },
eslint.configs.recommended,
...tseslint.configs.recommended,
...eslintPluginVue.configs['flat/recommended'],
{ languageOptions: { globals: globals.browser } },
{
files: ['**/*.vue', '*.vue'],
languageOptions: {
parserOptions: {
projectService: true,
extraFileExtensions: ['.vue'],
tsconfigRootDir: import.meta.dirname,
},
},
},
{
languageOptions: {
parserOptions: {
sourceType: 'module',
ecmaVersion: 'latest',
parser: tseslint.parser,
ecmaFeatures: { jsx: true },
},
},
},
{
rules: {
'prettier/prettier': [
'error',
{},
{ usePrettierrc: true, fileInfoOptions: { withNodeModules: true } },
],
/**
* the following rules are all temporarily disabled
*/
'no-empty': ['off'],
'no-debugger': ['off'],
'no-unsafe-optional-chaining': ['off'],
'@typescript-eslint/ban-ts-comment': ['off'],
'@typescript-eslint/no-unused-vars': ['off'],
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/no-empty-object-type': ['off'],
'@typescript-eslint/no-unused-expressions': ['off'],
'@typescript-eslint/no-unsafe-function-type': ['off'],
'vue/valid-v-for': ['off'],
'vue/valid-v-else': ['off'],
'vue/no-dupe-keys': ['off'],
'vue/no-unused-vars': ['off'],
'vue/no-explicit-any': ['off'],
'vue/no-parsing-error': ['off'],
'vue/require-v-for-key': ['off'],
'vue/require-prop-types': ['off'],
'vue/no-use-v-if-with-v-for': ['off'],
'vue/no-empty-component-block': ['off'],
'vue/multi-word-component-names': ['off'],
'vue/return-in-computed-property': ['off'],
'vue/no-unsafe-optional-chaining': ['off'],
'vue/no-async-in-computed-properties': ['off'],
},
},
eslintPrettierConfig,
eslintPluginPrettier,
);