-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.mjs
More file actions
79 lines (76 loc) · 2.55 KB
/
eslint.config.mjs
File metadata and controls
79 lines (76 loc) · 2.55 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
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import obsidianPlugin from 'eslint-plugin-obsidianmd';
import prettierConfig from 'eslint-config-prettier';
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
...obsidianPlugin.configs.recommended,
prettierConfig,
{
languageOptions: {
parser: tseslint.parser,
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
project: './tsconfig.json',
},
},
rules: {
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/no-base-to-string': 'off',
'no-console': 'error',
'no-debugger': 'error',
'prefer-const': 'error',
'no-var': 'error',
'no-undef': 'off',
'no-control-regex': 'warn',
'no-useless-escape': 'warn',
'no-prototype-builtins': 'warn',
'no-regex-spaces': 'error',
'obsidianmd/commands/no-default-hotkeys': 'warn',
'obsidianmd/vault/iterate': 'warn',
'obsidianmd/prefer-file-manager-trash-file': 'warn',
'obsidianmd/platform': 'warn',
'obsidianmd/regex-lookbehind': 'error',
'obsidianmd/no-sample-code': 'warn',
},
},
{
files: ['**/*.test.ts', '**/*.spec.ts', '**/TestUtils.ts', '**/__tests__/**/*.ts'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
},
},
{
ignores: [
'node_modules/',
'main.js',
'*.js',
'coverage/',
'dist/',
'features/',
'scripts/',
'.obsidian/',
'src/infrastructure/agents/__tests__/**',
'eslint.config.js',
'**/*.d.ts',
],
}
);