-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.yaml
157 lines (146 loc) · 4.1 KB
/
.eslintrc.yaml
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
root: true
extends:
- 'eslint:recommended'
- 'plugin:@typescript-eslint/recommended'
- plugin:node/recommended
- plugin:github/recommended
- plugin:promise/recommended
- plugin:regexp/recommended
#- plugin:array-func/recommended
- plugin:optimize-regex/recommended
- plugin:import/recommended
- plugin:unicorn/recommended
#- plugin:security/recommended
- plugin:sonarjs/recommended
- plugin:ava/recommended
- xo
- prettier
plugins:
- '@typescript-eslint'
- node
- escompat
- github
- promise
- regexp
#- array-func
- optimize-regex
- no-constructor-bind
- import
- unicorn
- security
- no-secrets
- sonarjs
- ava
- notice
settings:
import/resolver:
node: true
typescript: true
import/external-module-folders: [.yarn, node_modules]
parser: '@typescript-eslint/parser'
parserOptions:
ecmaVersion: 2020
project: './**/tsconfig*.json'
overrides:
- files: '*.schema.{c,m,}ts'
rules:
sonarjs/no-duplicate-string: off
- files: '*.{c,m,}ts'
extends:
- plugin:github/typescript
- plugin:import/typescript
- xo-typescript
- prettier
parserOptions:
ecmaVersion: 2020
project: './**/tsconfig*.json'
rules:
'@typescript-eslint/naming-convention':
[
error,
{ selector: default, format: [camelCase] },
{ selector: import, modifiers: [default], format: null },
{ selector: objectLiteralProperty, format: null },
{ selector: enumMember, format: [PascalCase] },
{ selector: typeProperty, format: null },
{
selector: variableLike,
format: [camelCase, UPPER_CASE],
leadingUnderscore: allow,
},
{ selector: variable, modifiers: [destructured], format: null },
{
selector: parameter,
format: [camelCase],
leadingUnderscore: allow,
},
{
selector: memberLike,
modifiers: [private],
format: [camelCase],
leadingUnderscore: require,
},
{ selector: typeLike, format: [PascalCase] },
{ selector: parameter, modifiers: [destructured], format: null },
]
'@typescript-eslint/restrict-template-expressions': off
'@typescript-eslint/no-shadow': warn
'@typescript-eslint/no-unused-vars':
[
warn,
{
args: after-used,
ignoreRestSiblings: true,
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
},
]
'@typescript-eslint/consistent-type-definitions': [warn, interface]
'@typescript-eslint/switch-exhaustiveness-check': off
rules:
notice/notice:
- error
- template: |
/**
* @license
* Copyright <%= YEAR %> Open Ag Data Alliance
*
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
onNonMatchingHeader: append
nonMatchingTolerance: 0.7
sonarjs/no-duplicate-string: [warn, { threshold: 5 }]
sonarjs/cognitive-complexity: warn
eslint-comments/no-unused-disable: off
node/no-unpublished-import: off
spaced-comment: [error, always, markers: [/, //]]
filenames/match-regex: off
unicorn/filename-case: off
i18n-text/no-en: off
eslint-comments/no-use: off
no-secrets/no-secrets: [error, { tolerance: 5 }]
no-empty-label: off
no-warning-comments: 0
node/no-missing-import: off
import/no-unresolved: off
import/extensions: off
unicorn/prefer-spread: off
unicorn/prevent-abbreviations:
- warn
- replacements:
db: false
req: false
res: false
err: false
doc: false
ref: false
no-constructor-bind/no-constructor-bind: error
no-constructor-bind/no-constructor-state: error
sort-imports: [warn, { allowSeparatedGroups: true }]
ava/no-ignored-test-files: off
ava/no-import-test-files: off
ava/no-skip-test: warn
ava/no-skip-assert: warn
'@typescript-eslint/switch-exhaustiveness-check': 0