-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.mjs
48 lines (47 loc) · 1.46 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
import pluginJs from '@eslint/js';
// import eslintImportX from 'eslint-plugin-import-x';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default [
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
// { plugins: { 'import-x': eslintImportX } },
{
ignores: ['node_modules/', 'dist/', '.astro/', '**/env.d.ts'],
},
{
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/consistent-type-imports': [
'error',
{
prefer: 'type-imports',
fixStyle: 'separate-type-imports',
},
],
// 'import-x/consistent-type-specifier-style': 'error',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_+$',
},
],
'no-undef': 'warn',
},
},
{
// cypress uses a global API based on undefined variables
files: [
'**/*.spec.{ts,js}',
'**/*test.{ts,js}',
'**/{cypress,_copiedFromCore,__tests__}/**',
'**/test-utils/**',
],
rules: {
'no-undef': 'off',
},
},
];