-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
74 lines (71 loc) · 1.56 KB
/
eslint.config.mjs
File metadata and controls
74 lines (71 loc) · 1.56 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
/**
* @file eslint
* @module config/eslint
* @see https://eslint.org/docs/user-guide/configuring
*/
import fldv from '@flex-development/eslint-config'
/**
* The eslint configuration.
*
* @type {import('eslint').Linter.Config[]}
* @const config
*/
const config = [
...fldv.configs.node,
{
files: ['**/*.+(cjs|cts|js|jsx|mjs|mts|ts|tsx)'],
languageOptions: {
parserOptions: {
projectService: true
}
},
rules: {
'@typescript-eslint/promise-function-async': [
2,
{
allowedPromiseNames: ['Thenable']
}
],
eqeqeq: [2, 'smart']
}
},
{
files: [
'src/lib/__tests__/is-catchable.spec.mts',
'src/lib/__tests__/is-finalizable.spec.mts',
'src/lib/__tests__/is-promise.spec.mts',
'src/lib/__tests__/is-promise-like.spec.mts',
'src/lib/__tests__/is-thenable.spec.mts',
'src/lib/__tests__/when.spec.mts'
],
rules: {
'unicorn/no-thenable': 0
}
},
{
files: [
'src/lib/when.mts',
'src/testing/lib/__tests__/create-thenable.functional.spec.mts'
],
rules: {
'promise/prefer-await-to-then': 0
}
},
{
files: ['src/testing/lib/create-thenable.mts'],
rules: {
'@typescript-eslint/only-throw-error': 0,
'@typescript-eslint/promise-function-async': 0,
'promise/prefer-await-to-then': 0,
'unicorn/catch-error-name': 0,
'unicorn/no-thenable': 0
}
},
{
files: ['src/types/chain.mts'],
rules: {
'jsdoc/valid-types': 0
}
}
]
export default config