-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
62 lines (62 loc) · 1.74 KB
/
.eslintrc.cjs
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
module.exports = {
root: true,
env: {
browser: false,
node: true,
es2022: true,
},
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
],
plugins: ['vitest'],
ignorePatterns: ['**/node_modules/*', '**/dist/*'],
overrides: [
{
files: ['*.{js,ts}'],
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json', './packages/*/tsconfig.json', './tests/*/tsconfig.json'],
},
rules: {
'prettier/prettier': 'warn',
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/consistent-indexed-object-style': 'off',
'@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
'@typescript-eslint/consistent-type-definitions': ['warn', 'type'],
'@typescript-eslint/no-unused-vars': [
'warn',
{
vars: 'local',
args: 'none',
caughtErrors: 'none',
ignoreRestSiblings: false,
},
],
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'vitest',
importNames: ['expect'],
message: 'Use the `expect` from the test context instead.',
},
],
},
],
},
};