-
Notifications
You must be signed in to change notification settings - Fork 57
/
eslint.config.mjs
48 lines (47 loc) · 1.19 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
// @ts-check
import js from '@eslint/js';
import prettier from 'eslint-config-prettier';
import unusedImports from 'eslint-plugin-unused-imports';
import vue from 'eslint-plugin-vue';
import ts from 'typescript-eslint';
import autoImport from './.eslintrc-auto-import.json' with { type: 'json' };
export default ts.config(
js.configs.recommended,
...ts.configs.recommended,
// @ts-ignore
...vue.configs['flat/essential'],
prettier,
{
files: ['*.vue', '**/*.vue'],
languageOptions: {
parserOptions: {
parser: '@typescript-eslint/parser',
jsx: true,
},
},
},
{
plugins: {
'unused-imports': unusedImports,
},
},
{
languageOptions: autoImport,
},
{
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'no-empty': 'off',
'prefer-const': 'off',
'unused-imports/no-unused-imports': 'error',
},
},
{
ignores: ['*.d.ts', '*.cjs'],
},
);