Skip to content

Commit 3e0685c

Browse files
committed
chore: update dev and test environments
Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
1 parent e7d5dc0 commit 3e0685c

File tree

16 files changed

+1578
-1135
lines changed

16 files changed

+1578
-1135
lines changed

.eslintrc.base.cjs

Lines changed: 57 additions & 21 deletions
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,
@@ -180,7 +180,13 @@ const config = {
180180
}
181181
],
182182
'@typescript-eslint/no-empty-interface': 0,
183-
'@typescript-eslint/no-explicit-any': 0,
183+
'@typescript-eslint/no-explicit-any': [
184+
2,
185+
{
186+
fixToUnknown: true,
187+
ignoreRestArgs: true
188+
}
189+
],
184190
'@typescript-eslint/no-extra-non-null-assertion': 2,
185191
'@typescript-eslint/no-extra-parens': 0,
186192
'@typescript-eslint/no-extra-semi': 0,
@@ -352,7 +358,11 @@ const config = {
352358
2,
353359
{
354360
allowAny: false,
355-
checkCompoundAssignments: false
361+
allowBoolean: false,
362+
allowNullish: false,
363+
allowNumberAndString: true,
364+
allowRegExp: false,
365+
skipCompoundAssignments: true
356366
}
357367
],
358368
'@typescript-eslint/restrict-template-expressions': [
@@ -366,7 +376,7 @@ const config = {
366376
}
367377
],
368378
'@typescript-eslint/return-await': [2, 'in-try-catch'],
369-
'@typescript-eslint/sort-type-union-intersection-members': 2,
379+
'@typescript-eslint/sort-type-constituents': 2,
370380
'@typescript-eslint/strict-boolean-expressions': [
371381
2,
372382
{
@@ -394,6 +404,13 @@ const config = {
394404
'@typescript-eslint/unified-signatures': 2,
395405
'default-param-last': 0,
396406
eqeqeq: 1,
407+
'import/no-duplicates': [
408+
2,
409+
{
410+
considerQueryString: true,
411+
'prefer-inline': true
412+
}
413+
],
397414
'init-declarations': 0,
398415
'jsdoc/check-access': 1,
399416
'jsdoc/check-alignment': 1,
@@ -417,6 +434,7 @@ const config = {
417434
1,
418435
{
419436
definedTags: [
437+
'decorator',
420438
'experimental',
421439
'maximum',
422440
'minimum',
@@ -434,7 +452,6 @@ const config = {
434452
'jsdoc/match-description': 0,
435453
'jsdoc/match-name': 0,
436454
'jsdoc/multiline-blocks': 1,
437-
'jsdoc/newline-after-description': [1, 'always'],
438455
'jsdoc/no-bad-blocks': [1, { preventAllMultiAsteriskBlocks: true }],
439456
'jsdoc/no-defaults': 0,
440457
'jsdoc/no-missing-syntax': 0,
@@ -557,9 +574,10 @@ const config = {
557574
1,
558575
'any',
559576
{
577+
applyToEndTag: true,
560578
count: 1,
561-
dropEndLines: true,
562-
noEndLines: false,
579+
endLines: 0,
580+
startLines: 1,
563581
tags: {}
564582
}
565583
],
@@ -572,6 +590,7 @@ const config = {
572590
'no-empty-function': 0,
573591
'no-ex-assign': 0,
574592
'no-extra-parens': 0,
593+
'no-extra-semi': 0,
575594
'no-implied-eval': 0,
576595
'no-invalid-this': 0,
577596
'no-loop-func': 0,
@@ -653,15 +672,15 @@ const config = {
653672
'unicorn/error-message': 2,
654673
'unicorn/escape-case': 2,
655674
'unicorn/expiring-todo-comments': [
656-
2,
675+
0,
657676
{
658677
allowWarningComments: true,
659678
ignore: [],
660679
ignoreDatesOnPullRequests: true,
661680
terms: ['@fixme', '@todo']
662681
}
663682
],
664-
'unicorn/explicit-length-check': 2,
683+
'unicorn/explicit-length-check': 0,
665684
'unicorn/filename-case': [
666685
2,
667686
{
@@ -774,15 +793,8 @@ const config = {
774793
allowArgumentsExplicitlyTypedAsAny: true,
775794
allowDirectConstAssertionInArrowFunctions: true,
776795
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
796+
allowTypedFunctionExpressions: false,
797+
allowedNames: []
786798
}
787799
],
788800
'no-undef': 0
@@ -835,6 +847,7 @@ const config = {
835847
},
836848
plugins: ['chai-expect', 'jest-formatting'],
837849
rules: {
850+
'@typescript-eslint/class-literal-property-style': 0,
838851
'@typescript-eslint/consistent-indexed-object-style': 0,
839852
'@typescript-eslint/no-base-to-string': 0,
840853
'@typescript-eslint/no-empty-function': 0,
@@ -858,7 +871,6 @@ const config = {
858871
'promise/valid-params': 0,
859872
'unicorn/consistent-destructuring': 0,
860873
'unicorn/error-message': 0,
861-
'unicorn/explicit-length-check': 0,
862874
'unicorn/no-array-for-each': 0,
863875
'unicorn/no-hex-escape': 0,
864876
'unicorn/no-useless-undefined': 0,
@@ -878,6 +890,12 @@ const config = {
878890
'@typescript-eslint/no-redundant-type-constituents': 0
879891
}
880892
},
893+
{
894+
files: ['**/decorators/*.constraint.ts', '**/*.decorator.ts'],
895+
rules: {
896+
'@typescript-eslint/ban-types': 0
897+
}
898+
},
881899
{
882900
files: ['**/enums/*.ts', '**/interfaces/*.ts', '**/types/*.ts'],
883901
rules: {
@@ -990,6 +1008,7 @@ const config = {
9901008
'@typescript-eslint/naming-convention': 0,
9911009
'@typescript-eslint/no-base-to-string': 0,
9921010
'@typescript-eslint/no-confusing-void-expression': 0,
1011+
'@typescript-eslint/no-duplicate-type-constituents': 0,
9931012
'@typescript-eslint/no-floating-promises': 0,
9941013
'@typescript-eslint/no-for-in-array': 0,
9951014
'@typescript-eslint/no-implied-eval': 0,
@@ -1006,12 +1025,14 @@ const config = {
10061025
'@typescript-eslint/no-unsafe-argument': 0,
10071026
'@typescript-eslint/no-unsafe-assignment': 0,
10081027
'@typescript-eslint/no-unsafe-call': 0,
1028+
'@typescript-eslint/no-unsafe-enum-comparison': 0,
10091029
'@typescript-eslint/no-unsafe-member-access': 0,
10101030
'@typescript-eslint/no-unsafe-return': 0,
10111031
'@typescript-eslint/no-unused-expressions': 0,
10121032
'@typescript-eslint/non-nullable-type-assertion-style': 0,
10131033
'@typescript-eslint/prefer-includes': 0,
10141034
'@typescript-eslint/prefer-nullish-coalescing': 0,
1035+
'@typescript-eslint/prefer-optional-chain': 0,
10151036
'@typescript-eslint/prefer-readonly': 0,
10161037
'@typescript-eslint/prefer-readonly-parameter-types': 0,
10171038
'@typescript-eslint/prefer-reduce-type-parameter': 0,
@@ -1032,7 +1053,7 @@ const config = {
10321053
}
10331054
},
10341055
{
1035-
files: '**/*.yml',
1056+
files: '**/*.+(yaml|yml)',
10361057
parser: 'yaml-eslint-parser',
10371058
plugins: ['yml'],
10381059
rules: {
@@ -1151,20 +1172,35 @@ const config = {
11511172
'prettier/prettier': [2, {}, { usePrettierrc: true }]
11521173
},
11531174
settings: {
1175+
'import/parsers': {
1176+
'@typescript-eslint/parser': ['.cts', '.mts', '.ts', '.tsx']
1177+
},
1178+
'import/resolver': {
1179+
node: true,
1180+
typescript: true
1181+
},
11541182
jsdoc: {
11551183
augmentsExtendsReplacesDocs: true,
11561184
ignoreInternal: false,
11571185
ignorePrivate: false,
11581186
implementsReplacesDocs: true,
11591187
overrideReplacesDocs: true,
11601188
preferredTypes: {
1161-
'*': false
1189+
'*': false,
1190+
'.<>': false,
1191+
'Array<>': { replacement: '[]' },
1192+
Object: { replacement: 'object' },
1193+
'Object<>': { replacement: 'Record<>' },
1194+
object: 'object'
11621195
},
11631196
structuredTags: {
11641197
const: {
11651198
name: 'namepath-defining',
11661199
required: ['name']
11671200
},
1201+
decorator: {
1202+
name: 'none'
1203+
},
11681204
enum: {
11691205
name: 'namepath-defining',
11701206
required: ['name', 'type']

.github/infrastructure.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ branches:
3131
- context: lint
3232
- context: spelling
3333
- context: typescript (5.0.4)
34+
- context: typescript (5.1.6)
3435
- context: typescript (latest)
35-
- context: typescript (~4.7.0)
36-
- context: typescript (~4.8.0)
37-
- context: typescript (~4.9.0)
3836
strict: true
3937
restrictions: null
4038
# https://docs.github.com/rest/deployments/environments#create-or-update-an-environment

.github/workflows/ci.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,7 @@ jobs:
236236
typescript-version:
237237
- ${{ needs.preflight.outputs.version-typescript }}
238238
- latest
239-
- ~4.9.0
240-
- ~4.8.0
241-
- ~4.7.0
239+
- 5.0.4
242240
steps:
243241
- id: checkout
244242
name: Checkout ${{ env.REF_NAME }}
@@ -270,14 +268,10 @@ jobs:
270268
if: steps.test-files-check.outputs.files_exists == 'true'
271269
name: Install typescript@${{ matrix.typescript-version }}
272270
run: yarn add -D typescript@${{ matrix.typescript-version }}
273-
- id: set-typescript-version
274-
name: Set env.TYPESCRIPT_VERSION
275-
run: |
276-
echo "TYPESCRIPT_VERSION=$(jq .devDependencies.typescript package.json -r)" >>$GITHUB_ENV
277271
- id: print-typescript-version
278272
if: steps.test-files-check.outputs.files_exists == 'true'
279273
name: Print TypeScript version
280-
run: echo $TYPESCRIPT_VERSION
274+
run: jq .devDependencies.typescript package.json -r
281275
- id: typecheck
282276
if: steps.test-files-check.outputs.files_exists == 'true'
283277
name: Run typecheck

.github/workflows/typescript-canary.yml

Lines changed: 2 additions & 6 deletions
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19
1+
20

.prettierrc.json

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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",

0 commit comments

Comments
 (0)