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 <unicornware@flexdevelopment.llc>
  • Loading branch information
unicornware committed Jul 27, 2023
1 parent 5ff14dd commit fc4c6f8
Show file tree
Hide file tree
Showing 18 changed files with 1,892 additions and 1,102 deletions.
76 changes: 56 additions & 20 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 All @@ -180,7 +180,13 @@ const config = {
}
],
'@typescript-eslint/no-empty-interface': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-explicit-any': [
2,
{
fixToUnknown: true,
ignoreRestArgs: true
}
],
'@typescript-eslint/no-extra-non-null-assertion': 2,
'@typescript-eslint/no-extra-parens': 0,
'@typescript-eslint/no-extra-semi': 0,
Expand Down Expand Up @@ -352,7 +358,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 +376,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 +404,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 +434,7 @@ const config = {
1,
{
definedTags: [
'decorator',
'experimental',
'maximum',
'minimum',
Expand All @@ -434,7 +452,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 +574,10 @@ const config = {
1,
'any',
{
applyToEndTag: true,
count: 1,
dropEndLines: true,
noEndLines: false,
endLines: 0,
startLines: 1,
tags: {}
}
],
Expand All @@ -572,6 +590,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 @@ -661,7 +680,7 @@ const config = {
terms: ['@fixme', '@todo']
}
],
'unicorn/explicit-length-check': 2,
'unicorn/explicit-length-check': 0,
'unicorn/filename-case': [
2,
{
Expand Down Expand Up @@ -774,15 +793,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 @@ -835,6 +847,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 All @@ -858,7 +871,6 @@ const config = {
'promise/valid-params': 0,
'unicorn/consistent-destructuring': 0,
'unicorn/error-message': 0,
'unicorn/explicit-length-check': 0,
'unicorn/no-array-for-each': 0,
'unicorn/no-hex-escape': 0,
'unicorn/no-useless-undefined': 0,
Expand All @@ -878,6 +890,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 +1008,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 +1025,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 +1053,7 @@ const config = {
}
},
{
files: '**/*.yml',
files: '**/*.+(yaml|yml)',
parser: 'yaml-eslint-parser',
plugins: ['yml'],
rules: {
Expand Down Expand Up @@ -1151,20 +1172,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
3 changes: 1 addition & 2 deletions .github/infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ branches:
- context: lint
- context: spelling
- context: typescript (5.0.4)
- context: typescript (5.1.6)
- context: typescript (latest)
- 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
9 changes: 2 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@ jobs:
typescript-version:
- ${{ needs.preflight.outputs.version-typescript }}
- latest
- ~4.9.0
- ~4.8.0
- 5.0.4
steps:
- id: checkout
name: Checkout ${{ env.REF_NAME }}
Expand Down Expand Up @@ -269,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 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
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 fc4c6f8

Please sign in to comment.