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 Aug 7, 2023
1 parent 043911c commit c35764f
Show file tree
Hide file tree
Showing 35 changed files with 2,224 additions and 994 deletions.
8 changes: 6 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
---
codecov:
notify:
after_n_builds: 3
after_n_builds: 4
wait_for_ci: true
require_ci_to_pass: true

comment:
after_n_builds: 3
after_n_builds: 4
behavior: default
layout: header,diff,flags,components,tree,footer
require_base: false
Expand Down Expand Up @@ -80,6 +80,10 @@ coverage:
threshold: 0%

flags:
node20:
carryforward: false
paths:
- src/
node19:
carryforward: false
paths:
Expand Down
71 changes: 50 additions & 21 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 @@ -246,7 +246,7 @@ const config = {
allowedNames: ['self']
}
],
'@typescript-eslint/no-throw-literal': 2,
'@typescript-eslint/no-throw-literal': 0,
'@typescript-eslint/no-type-alias': 0,
'@typescript-eslint/no-unnecessary-boolean-literal-compare': [
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 @@ -661,7 +674,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 +787,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 +841,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 +865,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 +884,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,14 +1002,14 @@ 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,
'@typescript-eslint/no-meaningless-void-operator': 0,
'@typescript-eslint/no-misused-promises': 0,
'@typescript-eslint/no-mixed-enums': 0,
'@typescript-eslint/no-redundant-type-constituents': 0,
'@typescript-eslint/no-throw-literal': 0,
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 0,
'@typescript-eslint/no-unnecessary-condition': 0,
'@typescript-eslint/no-unnecessary-qualifier': 0,
Expand All @@ -1006,12 +1018,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 +1046,7 @@ const config = {
}
},
{
files: '**/*.yml',
files: '**/*.+(yaml|yml)',
parser: 'yaml-eslint-parser',
plugins: ['yml'],
rules: {
Expand Down Expand Up @@ -1151,20 +1165,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
6 changes: 3 additions & 3 deletions .github/infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ branches:
- context: test (16)
- context: test (18)
- context: test (19)
- context: typescript (5.1.0-dev.20230301)
- 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)
Expand Down Expand Up @@ -187,8 +189,6 @@ repository:
is_template: false
private: false
security_and_analysis:
advanced_security:
status: disabled
secret_scanning:
status: enabled
secret_scanning_push_protection:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ jobs:
typescript-version:
- ${{ needs.preflight.outputs.version-typescript }}
- latest
- 5.0.4
- ~4.9.0
- ~4.8.0
- ~4.7.0
Expand Down Expand Up @@ -291,6 +292,7 @@ jobs:
fail-fast: false
matrix:
node-version:
- 20
- 19
- 18
- 16
Expand Down
2 changes: 1 addition & 1 deletion .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
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 .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# DIRECTORIES & FILES
**/*.hbs
**/*.md
**/*.patch
**/*.snap
**/*config.*.timestamp*
**/.temp/
Expand Down
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
5 changes: 2 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@
],
"overrideConfigFile": ".eslintrc.cjs"
},
"eslint.packageManager": "yarn",
"eslint.validate": [
"graphql",
"javascript",
Expand Down Expand Up @@ -256,6 +255,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 Expand Up @@ -309,7 +309,6 @@
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.tsserver.enableTracing": true,
"typescript.tsserver.log": "verbose",
"typescript.tsserver.trace": "verbose",
"typescript.updateImportsOnFileMove.enabled": "always",
"typescript.validate.enable": true,
"versionlens.npm.dependencyProperties": [
Expand Down Expand Up @@ -399,7 +398,7 @@
"xml.format.closingBracketNewLine": true,
"xml.format.maxLineWidth": 100,
"xml.format.spaceBeforeEmptyCloseTag": false,
"xml.format.splitAttributes": true,
"xml.format.splitAttributes": "splitNewLine",
"xml.format.splitAttributesIndentSize": 0,
"yaml.schemas": {
"https://json.schemastore.org/github-issue-config": ".github/ISSUE_TEMPLATE/config.yml",
Expand Down
6 changes: 4 additions & 2 deletions __tests__/reporters/notifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ class Notifier implements Reporter {

message = dedent`
${passes} tests passed in ${
time > 1000 ? `${(time / 1000).toFixed(2)}ms` : `${Math.round(time)}ms`
}
time > 1000
? `${(time / 1000).toFixed(2)}ms`
: `${Math.round(time)}ms`
}
`

title = '\u2705 Passed'
Expand Down
13 changes: 13 additions & 0 deletions __tests__/setup/chai.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @file Test Setup - chai
* @module tests/setup/chai
* @see https://chaijs.com
*/

import { JestExtend as extend } from '@vitest/expect'
import { chai } from 'vitest'

/**
* initialize chai plugins.
*/
extend(chai, chai.util)
1 change: 1 addition & 0 deletions __tests__/setup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* @module tests/setup
*/

import './chai'
import './faker'
import './matchers'
import './serializers'
Loading

0 comments on commit c35764f

Please sign in to comment.