@naturalcycles/dev-lib 20.34.1 → 20.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -57,7 +57,7 @@ if (oxlintConfigPath) {
57
57
  '--type-check',
58
58
  '--fix',
59
59
  '--fix-suggestions',
60
- // '--fix-dangerously', // disabled, too unsafe
60
+ '--fix-dangerously',
61
61
  '--max-warnings=0',
62
62
  ]
63
63
  .filter(Boolean)
@@ -104,9 +104,15 @@
104
104
  "typescript/no-non-null-asserted-nullish-coalescing": 2,
105
105
  "typescript/no-require-imports": 2,
106
106
  "typescript/no-var-requires": 2,
107
+ "typescript/no-unnecessary-template-expression": 2,
108
+ "typescript/no-unnecessary-type-arguments": 0, // not good in the end
109
+ "typescript/no-unnecessary-type-constraint": 2,
110
+ // "typescript/no-unsafe-argument": 2, // looks good, but too strict for now
111
+ // "typescript/no-dynamic-delete": 2,
107
112
  "typescript/prefer-optional-chain": 0, // buggy
108
113
  "typescript/non-nullable-type-assertion-style": 2,
109
114
  "typescript/prefer-literal-enum-member": 2,
115
+ "typescript/prefer-reduce-type-parameter": 2,
110
116
  "typescript/promise-function-async": [
111
117
  2,
112
118
  {
@@ -118,12 +124,25 @@
118
124
  ],
119
125
  "typescript/prefer-for-of": 2,
120
126
  "typescript/no-confusing-non-null-assertion": 2,
127
+ "typescript/ban-ts-comment": [
128
+ 2,
129
+ {
130
+ "ts-expect-error": "allow-with-description",
131
+ "ts-ignore": true
132
+ }
133
+ ],
121
134
  "typescript/ban-tslint-comment": 2,
122
135
  "typescript/prefer-function-type": 2,
123
136
  "typescript/prefer-namespace-keyword": 2,
124
137
  "typescript/consistent-generic-constructors": [2, "constructor"],
125
138
  "typescript/consistent-type-definitions": [2, "interface"],
126
139
  "typescript/consistent-type-imports": 2,
140
+ "typescript/consistent-type-assertions": [
141
+ 2,
142
+ {
143
+ "assertionStyle": "as"
144
+ }
145
+ ],
127
146
  "typescript/no-inferrable-types": [
128
147
  2,
129
148
  {
@@ -140,12 +159,30 @@
140
159
  "typescript/return-await": [2, "error-handling-correctness-only"],
141
160
  "typescript/only-throw-error": 2,
142
161
  "typescript/no-unsafe-function-type": 2,
143
- "typescript/no-misused-promises": 0,
162
+ "typescript/no-misused-promises": [
163
+ 2,
164
+ {
165
+ "checksVoidReturn": {
166
+ // "variables": false,
167
+ // "inheritedMethods": false,
168
+ // "returns": false
169
+ "arguments": false,
170
+ "properties": false
171
+ }
172
+ }
173
+ ],
144
174
  "typescript/no-mixed-enums": 2,
145
175
  "typescript/no-unnecessary-type-assertion": 2,
146
176
  "typescript/no-unnecessary-boolean-literal-compare": 2,
147
177
  "typescript/no-base-to-string": 2,
148
- "typescript/unbound-method": 0,
178
+ // disabled, as it fails on legit unit test patterns
179
+ "typescript/unbound-method": [
180
+ 0,
181
+ {
182
+ "ignoreStatic": true
183
+ }
184
+ ],
185
+ "typescript/switch-exhaustiveness-check": 2,
149
186
  "typescript/require-array-sort-compare": 0, // not good
150
187
  "typescript/restrict-template-expressions": 0, // not good
151
188
  "typescript/no-redundant-type-constituents": 0, // `'a' | string` is still useful for DX
@@ -209,7 +209,7 @@ export function runOxlint(fix = true) {
209
209
  '--type-check',
210
210
  fix && '--fix',
211
211
  fix && '--fix-suggestions',
212
- // fix && '--fix-dangerously', // decided to disable, too unsafe
212
+ fix && '--fix-dangerously',
213
213
  ].filter(_isTruthy),
214
214
  shell: false,
215
215
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
3
  "type": "module",
4
- "version": "20.34.1",
4
+ "version": "20.35.0",
5
5
  "dependencies": {
6
6
  "prompts": "^2",
7
7
  "@naturalcycles/js-lib": "^15",