Skip to content

Commit

Permalink
chore: update dev and test environments
Browse files Browse the repository at this point in the history
Signed-off-by: Lexus Drumgold <[email protected]>
  • Loading branch information
unicornware committed Jul 29, 2023
1 parent 34edb7d commit 60a025d
Show file tree
Hide file tree
Showing 31 changed files with 2,206 additions and 1,572 deletions.
65 changes: 48 additions & 17 deletions .eslintrc.base.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const config = {
},
plugins: [
'@typescript-eslint',
'import',
'jsdoc',
'node',
'prettier',
Expand Down Expand Up @@ -171,7 +172,6 @@ const config = {
}
],
'@typescript-eslint/no-dupe-class-members': 2,
'@typescript-eslint/no-duplicate-imports': 2,
'@typescript-eslint/no-dynamic-delete': 2,
'@typescript-eslint/no-empty-function': [
2,
Expand Down Expand Up @@ -352,7 +352,11 @@ const config = {
2,
{
allowAny: false,
checkCompoundAssignments: false
allowBoolean: false,
allowNullish: false,
allowNumberAndString: true,
allowRegExp: false,
skipCompoundAssignments: true
}
],
'@typescript-eslint/restrict-template-expressions': [
Expand All @@ -366,7 +370,7 @@ const config = {
}
],
'@typescript-eslint/return-await': [2, 'in-try-catch'],
'@typescript-eslint/sort-type-union-intersection-members': 2,
'@typescript-eslint/sort-type-constituents': 2,
'@typescript-eslint/strict-boolean-expressions': [
2,
{
Expand Down Expand Up @@ -394,6 +398,13 @@ const config = {
'@typescript-eslint/unified-signatures': 2,
'default-param-last': 0,
eqeqeq: 1,
'import/no-duplicates': [
2,
{
considerQueryString: true,
'prefer-inline': true
}
],
'init-declarations': 0,
'jsdoc/check-access': 1,
'jsdoc/check-alignment': 1,
Expand All @@ -417,6 +428,7 @@ const config = {
1,
{
definedTags: [
'decorator',
'experimental',
'maximum',
'minimum',
Expand All @@ -434,7 +446,6 @@ const config = {
'jsdoc/match-description': 0,
'jsdoc/match-name': 0,
'jsdoc/multiline-blocks': 1,
'jsdoc/newline-after-description': [1, 'always'],
'jsdoc/no-bad-blocks': [1, { preventAllMultiAsteriskBlocks: true }],
'jsdoc/no-defaults': 0,
'jsdoc/no-missing-syntax': 0,
Expand Down Expand Up @@ -557,9 +568,10 @@ const config = {
1,
'any',
{
applyToEndTag: true,
count: 1,
dropEndLines: true,
noEndLines: false,
endLines: 0,
startLines: 1,
tags: {}
}
],
Expand All @@ -572,6 +584,7 @@ const config = {
'no-empty-function': 0,
'no-ex-assign': 0,
'no-extra-parens': 0,
'no-extra-semi': 0,
'no-implied-eval': 0,
'no-invalid-this': 0,
'no-loop-func': 0,
Expand Down Expand Up @@ -775,15 +788,8 @@ const config = {
allowArgumentsExplicitlyTypedAsAny: true,
allowDirectConstAssertionInArrowFunctions: true,
allowHigherOrderFunctions: false,
allowTypedFunctionExpressions: true,
allowedNames: [],
shouldTrackReferences: true
}
],
'@typescript-eslint/no-implicit-any-catch': [
2,
{
allowExplicitAny: false
allowTypedFunctionExpressions: false,
allowedNames: []
}
],
'no-undef': 0
Expand Down Expand Up @@ -836,6 +842,7 @@ const config = {
},
plugins: ['chai-expect', 'jest-formatting'],
rules: {
'@typescript-eslint/class-literal-property-style': 0,
'@typescript-eslint/consistent-indexed-object-style': 0,
'@typescript-eslint/no-base-to-string': 0,
'@typescript-eslint/no-empty-function': 0,
Expand Down Expand Up @@ -878,6 +885,12 @@ const config = {
'@typescript-eslint/no-redundant-type-constituents': 0
}
},
{
files: ['**/decorators/*.constraint.ts', '**/*.decorator.ts'],
rules: {
'@typescript-eslint/ban-types': 0
}
},
{
files: ['**/enums/*.ts', '**/interfaces/*.ts', '**/types/*.ts'],
rules: {
Expand Down Expand Up @@ -990,6 +1003,7 @@ const config = {
'@typescript-eslint/naming-convention': 0,
'@typescript-eslint/no-base-to-string': 0,
'@typescript-eslint/no-confusing-void-expression': 0,
'@typescript-eslint/no-duplicate-type-constituents': 0,
'@typescript-eslint/no-floating-promises': 0,
'@typescript-eslint/no-for-in-array': 0,
'@typescript-eslint/no-implied-eval': 0,
Expand All @@ -1006,12 +1020,14 @@ const config = {
'@typescript-eslint/no-unsafe-argument': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/no-unsafe-enum-comparison': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/no-unused-expressions': 0,
'@typescript-eslint/non-nullable-type-assertion-style': 0,
'@typescript-eslint/prefer-includes': 0,
'@typescript-eslint/prefer-nullish-coalescing': 0,
'@typescript-eslint/prefer-optional-chain': 0,
'@typescript-eslint/prefer-readonly': 0,
'@typescript-eslint/prefer-readonly-parameter-types': 0,
'@typescript-eslint/prefer-reduce-type-parameter': 0,
Expand All @@ -1032,7 +1048,7 @@ const config = {
}
},
{
files: '**/*.yml',
files: '**/*.+(yaml|yml)',
parser: 'yaml-eslint-parser',
plugins: ['yml'],
rules: {
Expand Down Expand Up @@ -1151,20 +1167,35 @@ const config = {
'prettier/prettier': [2, {}, { usePrettierrc: true }]
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.cts', '.mts', '.ts', '.tsx']
},
'import/resolver': {
node: true,
typescript: true
},
jsdoc: {
augmentsExtendsReplacesDocs: true,
ignoreInternal: false,
ignorePrivate: false,
implementsReplacesDocs: true,
overrideReplacesDocs: true,
preferredTypes: {
'*': false
'*': false,
'.<>': false,
'Array<>': { replacement: '[]' },
Object: { replacement: 'object' },
'Object<>': { replacement: 'Record<>' },
object: 'object'
},
structuredTags: {
const: {
name: 'namepath-defining',
required: ['name']
},
decorator: {
name: 'none'
},
enum: {
name: 'namepath-defining',
required: ['name', 'type']
Expand Down
7 changes: 2 additions & 5 deletions .github/infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ branches:
- context: test (16)
- context: test (18)
- context: test (19)
- context: test (20)
- context: typescript (5.0.4)
- context: typescript (5.1.6)
- context: typescript (latest)
- context: typescript (~4.7.0)
- context: typescript (~4.8.0)
- context: typescript (~4.9.0)
strict: true
restrictions: null
# https://docs.github.com/rest/deployments/environments#create-or-update-an-environment
Expand Down Expand Up @@ -195,8 +194,6 @@ repository:
is_template: false
private: false
security_and_analysis:
advanced_security:
status: disabled
secret_scanning:
status: enabled
secret_scanning_push_protection:
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,7 @@ jobs:
typescript-version:
- ${{ needs.preflight.outputs.version-typescript }}
- latest
- ~4.9.0
- ~4.8.0
- ~4.7.0
- 5.0.4
steps:
- id: checkout
name: Checkout ${{ env.REF_NAME }}
Expand Down Expand Up @@ -270,14 +268,10 @@ jobs:
if: steps.test-files-check.outputs.files_exists == 'true'
name: Install typescript@${{ matrix.typescript-version }}
run: yarn add -D typescript@${{ matrix.typescript-version }}
- id: set-typescript-version
name: Set env.TYPESCRIPT_VERSION
run: |
echo "TYPESCRIPT_VERSION=$(jq .devDependencies.typescript package.json -r)" >>$GITHUB_ENV
- id: print-typescript-version
if: steps.test-files-check.outputs.files_exists == 'true'
name: Print TypeScript version
run: echo $TYPESCRIPT_VERSION
run: jq .devDependencies.typescript package.json -r
- id: typecheck
if: steps.test-files-check.outputs.files_exists == 'true'
name: Run typecheck
Expand All @@ -291,6 +285,7 @@ jobs:
fail-fast: false
matrix:
node-version:
- 20
- 19
- 18
- 16
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/typescript-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ name: typescript-canary
on:
schedule:
# every day, 3 hours after typescript@next release
# https://github.com/microsoft/TypeScript/blob/v4.9.5/.github/workflows/nightly.yaml
# https://github.com/microsoft/TypeScript/blob/v5.0.4/.github/workflows/nightly.yaml
- cron: 0 10 * * *
workflow_dispatch:
permissions:
Expand Down Expand Up @@ -65,13 +65,9 @@ jobs:
- id: typescript
name: Install typescript@${{ matrix.typescript-version }}
run: yarn add -D typescript@${{ matrix.typescript-version }}
- id: set-typescript-version
name: Set env.TYPESCRIPT_VERSION
run: |
echo "TYPESCRIPT_VERSION=$(jq .devDependencies.typescript package.json -r)" >>$GITHUB_ENV
- id: print-typescript-version
name: Print TypeScript version
run: echo $TYPESCRIPT_VERSION
run: jq .devDependencies.typescript package.json -r
- id: build
name: Build project
run: yarn build
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19
20.5.0
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"arrowParens": "avoid",
"bracketSpacing": true,
"plugins": ["prettier-plugin-sh"],
"proseWrap": "always",
"quoteProps": "as-needed",
"semi": false,
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@
"shellformat.flag": "-ci -fn -i=2 -sr",
"shellformat.useEditorConfig": true,
"terminal.integrated.copyOnSelection": true,
"terminal.integrated.scrollback": 10000,
"todo-tree.filtering.ignoreGitSubmodules": true,
"todo-tree.filtering.includeHiddenFiles": false,
"todo-tree.filtering.useBuiltInExcludes": "file and search excludes",
Expand Down
Loading

0 comments on commit 60a025d

Please sign in to comment.