Skip to content

Commit fd9fa82

Browse files
committed
chore: update dev and test environments
Signed-off-by: Lexus Drumgold <[email protected]>
1 parent 33aa4b5 commit fd9fa82

21 files changed

+2107
-1462
lines changed

.codecov.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
---
55
codecov:
66
notify:
7-
after_n_builds: 3
7+
after_n_builds: 4
88
wait_for_ci: true
99
require_ci_to_pass: true
1010

1111
comment:
12-
after_n_builds: 3
12+
after_n_builds: 4
1313
behavior: default
1414
layout: header,diff,flags,tree,footer
1515
require_base: false
@@ -65,6 +65,10 @@ coverage:
6565
threshold: 0%
6666

6767
flags:
68+
node20:
69+
carryforward: false
70+
paths:
71+
- src/
6872
node19:
6973
carryforward: false
7074
paths:

.eslintrc.base.cjs

+51-20
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const config = {
5353
},
5454
plugins: [
5555
'@typescript-eslint',
56+
'import',
5657
'jsdoc',
5758
'node',
5859
'prettier',
@@ -171,7 +172,6 @@ const config = {
171172
}
172173
],
173174
'@typescript-eslint/no-dupe-class-members': 2,
174-
'@typescript-eslint/no-duplicate-imports': 2,
175175
'@typescript-eslint/no-dynamic-delete': 2,
176176
'@typescript-eslint/no-empty-function': [
177177
2,
@@ -246,7 +246,7 @@ const config = {
246246
allowedNames: ['self']
247247
}
248248
],
249-
'@typescript-eslint/no-throw-literal': 2,
249+
'@typescript-eslint/no-throw-literal': 0,
250250
'@typescript-eslint/no-type-alias': 0,
251251
'@typescript-eslint/no-unnecessary-boolean-literal-compare': [
252252
2,
@@ -352,7 +352,11 @@ const config = {
352352
2,
353353
{
354354
allowAny: false,
355-
checkCompoundAssignments: false
355+
allowBoolean: false,
356+
allowNullish: false,
357+
allowNumberAndString: true,
358+
allowRegExp: false,
359+
skipCompoundAssignments: true
356360
}
357361
],
358362
'@typescript-eslint/restrict-template-expressions': [
@@ -366,7 +370,7 @@ const config = {
366370
}
367371
],
368372
'@typescript-eslint/return-await': [2, 'in-try-catch'],
369-
'@typescript-eslint/sort-type-union-intersection-members': 2,
373+
'@typescript-eslint/sort-type-constituents': 2,
370374
'@typescript-eslint/strict-boolean-expressions': [
371375
2,
372376
{
@@ -394,6 +398,13 @@ const config = {
394398
'@typescript-eslint/unified-signatures': 2,
395399
'default-param-last': 0,
396400
eqeqeq: 1,
401+
'import/no-duplicates': [
402+
2,
403+
{
404+
considerQueryString: true,
405+
'prefer-inline': true
406+
}
407+
],
397408
'init-declarations': 0,
398409
'jsdoc/check-access': 1,
399410
'jsdoc/check-alignment': 1,
@@ -417,6 +428,7 @@ const config = {
417428
1,
418429
{
419430
definedTags: [
431+
'decorator',
420432
'experimental',
421433
'maximum',
422434
'minimum',
@@ -434,7 +446,6 @@ const config = {
434446
'jsdoc/match-description': 0,
435447
'jsdoc/match-name': 0,
436448
'jsdoc/multiline-blocks': 1,
437-
'jsdoc/newline-after-description': [1, 'always'],
438449
'jsdoc/no-bad-blocks': [1, { preventAllMultiAsteriskBlocks: true }],
439450
'jsdoc/no-defaults': 0,
440451
'jsdoc/no-missing-syntax': 0,
@@ -557,9 +568,10 @@ const config = {
557568
1,
558569
'any',
559570
{
571+
applyToEndTag: true,
560572
count: 1,
561-
dropEndLines: true,
562-
noEndLines: false,
573+
endLines: 0,
574+
startLines: 1,
563575
tags: {}
564576
}
565577
],
@@ -572,6 +584,7 @@ const config = {
572584
'no-empty-function': 0,
573585
'no-ex-assign': 0,
574586
'no-extra-parens': 0,
587+
'no-extra-semi': 0,
575588
'no-implied-eval': 0,
576589
'no-invalid-this': 0,
577590
'no-loop-func': 0,
@@ -581,6 +594,7 @@ const config = {
581594
'no-return-await': 0,
582595
'no-shadow': 0,
583596
'no-sparse-arrays': 0,
597+
'no-throw-literal': 0,
584598
'no-unused-expressions': 0,
585599
'no-unused-vars': 0,
586600
'no-use-before-define': 0,
@@ -661,7 +675,7 @@ const config = {
661675
terms: ['@fixme', '@todo']
662676
}
663677
],
664-
'unicorn/explicit-length-check': 2,
678+
'unicorn/explicit-length-check': 0,
665679
'unicorn/filename-case': [
666680
2,
667681
{
@@ -774,15 +788,8 @@ const config = {
774788
allowArgumentsExplicitlyTypedAsAny: true,
775789
allowDirectConstAssertionInArrowFunctions: true,
776790
allowHigherOrderFunctions: false,
777-
allowTypedFunctionExpressions: true,
778-
allowedNames: [],
779-
shouldTrackReferences: true
780-
}
781-
],
782-
'@typescript-eslint/no-implicit-any-catch': [
783-
2,
784-
{
785-
allowExplicitAny: false
791+
allowTypedFunctionExpressions: false,
792+
allowedNames: []
786793
}
787794
],
788795
'no-undef': 0
@@ -835,6 +842,7 @@ const config = {
835842
},
836843
plugins: ['chai-expect', 'jest-formatting'],
837844
rules: {
845+
'@typescript-eslint/class-literal-property-style': 0,
838846
'@typescript-eslint/consistent-indexed-object-style': 0,
839847
'@typescript-eslint/no-base-to-string': 0,
840848
'@typescript-eslint/no-empty-function': 0,
@@ -858,7 +866,6 @@ const config = {
858866
'promise/valid-params': 0,
859867
'unicorn/consistent-destructuring': 0,
860868
'unicorn/error-message': 0,
861-
'unicorn/explicit-length-check': 0,
862869
'unicorn/no-array-for-each': 0,
863870
'unicorn/no-hex-escape': 0,
864871
'unicorn/no-useless-undefined': 0,
@@ -878,6 +885,12 @@ const config = {
878885
'@typescript-eslint/no-redundant-type-constituents': 0
879886
}
880887
},
888+
{
889+
files: ['**/decorators/*.constraint.ts', '**/*.decorator.ts'],
890+
rules: {
891+
'@typescript-eslint/ban-types': 0
892+
}
893+
},
881894
{
882895
files: ['**/enums/*.ts', '**/interfaces/*.ts', '**/types/*.ts'],
883896
rules: {
@@ -990,6 +1003,7 @@ const config = {
9901003
'@typescript-eslint/naming-convention': 0,
9911004
'@typescript-eslint/no-base-to-string': 0,
9921005
'@typescript-eslint/no-confusing-void-expression': 0,
1006+
'@typescript-eslint/no-duplicate-type-constituents': 0,
9931007
'@typescript-eslint/no-floating-promises': 0,
9941008
'@typescript-eslint/no-for-in-array': 0,
9951009
'@typescript-eslint/no-implied-eval': 0,
@@ -1006,12 +1020,14 @@ const config = {
10061020
'@typescript-eslint/no-unsafe-argument': 0,
10071021
'@typescript-eslint/no-unsafe-assignment': 0,
10081022
'@typescript-eslint/no-unsafe-call': 0,
1023+
'@typescript-eslint/no-unsafe-enum-comparison': 0,
10091024
'@typescript-eslint/no-unsafe-member-access': 0,
10101025
'@typescript-eslint/no-unsafe-return': 0,
10111026
'@typescript-eslint/no-unused-expressions': 0,
10121027
'@typescript-eslint/non-nullable-type-assertion-style': 0,
10131028
'@typescript-eslint/prefer-includes': 0,
10141029
'@typescript-eslint/prefer-nullish-coalescing': 0,
1030+
'@typescript-eslint/prefer-optional-chain': 0,
10151031
'@typescript-eslint/prefer-readonly': 0,
10161032
'@typescript-eslint/prefer-readonly-parameter-types': 0,
10171033
'@typescript-eslint/prefer-reduce-type-parameter': 0,
@@ -1032,7 +1048,7 @@ const config = {
10321048
}
10331049
},
10341050
{
1035-
files: '**/*.yml',
1051+
files: '**/*.+(yaml|yml)',
10361052
parser: 'yaml-eslint-parser',
10371053
plugins: ['yml'],
10381054
rules: {
@@ -1151,20 +1167,35 @@ const config = {
11511167
'prettier/prettier': [2, {}, { usePrettierrc: true }]
11521168
},
11531169
settings: {
1170+
'import/parsers': {
1171+
'@typescript-eslint/parser': ['.cts', '.mts', '.ts', '.tsx']
1172+
},
1173+
'import/resolver': {
1174+
node: true,
1175+
typescript: true
1176+
},
11541177
jsdoc: {
11551178
augmentsExtendsReplacesDocs: true,
11561179
ignoreInternal: false,
11571180
ignorePrivate: false,
11581181
implementsReplacesDocs: true,
11591182
overrideReplacesDocs: true,
11601183
preferredTypes: {
1161-
'*': false
1184+
'*': false,
1185+
'.<>': false,
1186+
'Array<>': { replacement: '[]' },
1187+
Object: { replacement: 'object' },
1188+
'Object<>': { replacement: 'Record<>' },
1189+
object: 'object'
11621190
},
11631191
structuredTags: {
11641192
const: {
11651193
name: 'namepath-defining',
11661194
required: ['name']
11671195
},
1196+
decorator: {
1197+
name: 'none'
1198+
},
11681199
enum: {
11691200
name: 'namepath-defining',
11701201
required: ['name', 'type']

.github/infrastructure.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ branches:
3939
- context: test (16)
4040
- context: test (18)
4141
- context: test (19)
42+
- context: test (20)
4243
- context: typescript (5.0.4)
44+
- context: typescript (5.1.6)
4345
- context: typescript (latest)
44-
- context: typescript (~4.8.0)
45-
- context: typescript (~4.9.0)
4646
strict: true
4747
restrictions: null
4848
# https://docs.github.com/rest/deployments/environments#create-or-update-an-environment
@@ -179,8 +179,6 @@ repository:
179179
is_template: false
180180
private: false
181181
security_and_analysis:
182-
advanced_security:
183-
status: disabled
184182
secret_scanning:
185183
status: enabled
186184
secret_scanning_push_protection:

.github/workflows/ci.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,7 @@ jobs:
236236
typescript-version:
237237
- ${{ needs.preflight.outputs.version-typescript }}
238238
- latest
239-
- ~4.9.0
240-
- ~4.8.0
239+
- 5.0.4
241240
steps:
242241
- id: checkout
243242
name: Checkout ${{ env.REF_NAME }}
@@ -269,14 +268,10 @@ jobs:
269268
if: steps.test-files-check.outputs.files_exists == 'true'
270269
name: Install typescript@${{ matrix.typescript-version }}
271270
run: yarn add -D typescript@${{ matrix.typescript-version }}
272-
- id: set-typescript-version
273-
name: Set env.TYPESCRIPT_VERSION
274-
run: |
275-
echo "TYPESCRIPT_VERSION=$(jq .devDependencies.typescript package.json -r)" >>$GITHUB_ENV
276271
- id: print-typescript-version
277272
if: steps.test-files-check.outputs.files_exists == 'true'
278273
name: Print TypeScript version
279-
run: echo $TYPESCRIPT_VERSION
274+
run: jq .devDependencies.typescript package.json -r
280275
- id: typecheck
281276
if: steps.test-files-check.outputs.files_exists == 'true'
282277
name: Run typecheck
@@ -290,6 +285,7 @@ jobs:
290285
fail-fast: false
291286
matrix:
292287
node-version:
288+
- 20
293289
- 19
294290
- 18
295291
- 16

.github/workflows/typescript-canary.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ name: typescript-canary
2121
on:
2222
schedule:
2323
# every day, 3 hours after typescript@next release
24-
# https://github.com/microsoft/TypeScript/blob/v4.9.5/.github/workflows/nightly.yaml
24+
# https://github.com/microsoft/TypeScript/blob/v5.0.4/.github/workflows/nightly.yaml
2525
- cron: 0 10 * * *
2626
workflow_dispatch:
2727
permissions:
@@ -65,13 +65,9 @@ jobs:
6565
- id: typescript
6666
name: Install typescript@${{ matrix.typescript-version }}
6767
run: yarn add -D typescript@${{ matrix.typescript-version }}
68-
- id: set-typescript-version
69-
name: Set env.TYPESCRIPT_VERSION
70-
run: |
71-
echo "TYPESCRIPT_VERSION=$(jq .devDependencies.typescript package.json -r)" >>$GITHUB_ENV
7268
- id: print-typescript-version
7369
name: Print TypeScript version
74-
run: echo $TYPESCRIPT_VERSION
70+
run: jq .devDependencies.typescript package.json -r
7571
- id: build
7672
name: Build project
7773
run: yarn build

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19
1+
20.5.0

.prettierrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"arrowParens": "avoid",
33
"bracketSpacing": true,
4+
"plugins": ["prettier-plugin-sh"],
45
"proseWrap": "always",
56
"quoteProps": "as-needed",
67
"semi": false,

.vscode/settings.json

+1
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@
256256
"shellformat.flag": "-ci -fn -i=2 -sr",
257257
"shellformat.useEditorConfig": true,
258258
"terminal.integrated.copyOnSelection": true,
259+
"terminal.integrated.scrollback": 10000,
259260
"todo-tree.filtering.ignoreGitSubmodules": true,
260261
"todo-tree.filtering.includeHiddenFiles": false,
261262
"todo-tree.filtering.useBuiltInExcludes": "file and search excludes",

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Suppose we have the following module:
6666

6767
```typescript
6868
import { DECORATOR_REGEX } from '@flex-development/decorator-regex'
69-
import { omit } from 'radash'
69+
import { omit } from '@flex-development/tutils'
7070
import { dedent } from 'ts-dedent'
7171

7272
const code: string = dedent`

0 commit comments

Comments
 (0)