-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
66 lines (61 loc) · 1.63 KB
/
eslint.config.js
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
// @ts-check
import eslint from '@eslint/js';
import tsEslint from 'typescript-eslint';
import pluginVue from 'eslint-plugin-vue';
import globals from 'globals';
import pluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import pluginCompat from 'eslint-plugin-compat';
export default tsEslint.config(
{
files: ['**/*.ts', '**/*.d.ts', '**/*.js', '**/*.vue'],
extends: [
eslint.configs.recommended,
...tsEslint.configs.recommendedTypeChecked,
...pluginVue.configs['flat/recommended'],
pluginPrettierRecommended,
pluginCompat.configs['flat/recommended'],
],
languageOptions: {
parserOptions: {
projectService: true,
parser: tsEslint.parser,
tsconfigRootDir: import.meta.dirname,
extraFileExtensions: ['.vue'],
},
},
rules: {
'no-constant-condition': [
'error',
{
checkLoops: false,
},
],
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
'no-empty': ['error', { allowEmptyCatch: true }],
eqeqeq: ['error', 'smart'],
'@typescript-eslint/no-explicit-any': ['error', { fixToUnknown: true, ignoreRestArgs: true }],
'no-console': ['warn'],
},
},
{
files: ['**/*.js'],
...tsEslint.configs.disableTypeChecked,
},
{
files: ['scripts/*.js', '**/*.config.js'],
languageOptions: {
globals: {
...globals.nodeBuiltin,
},
},
},
{
ignores: ['**/dist/', '**/assets/', '**/test-results/', '**/playwright-report/'],
},
);