Skip to content

Commit

Permalink
chore: update project architecture
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 9, 2023
1 parent 8f18fa2 commit 7173959
Show file tree
Hide file tree
Showing 16 changed files with 2,021 additions and 780 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# https://eslint.org/docs/user-guide/configuring/ignoring-code#the-eslintignore-file

# DIRECTORIES & FILES
**/*.patch
**/*.snap
**/*config.*.timestamp*
**/.DS_Store
Expand All @@ -18,6 +19,7 @@ yarn.lock
!**/__fixtures__/**/dist/
!**/__fixtures__/**/node_modules/
!**/typings/**/dist/
!.attw.json
!.codecov.yml
!.commitlintrc.*
!.cspell.json
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
12 changes: 11 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,23 @@ updates:
- conventional-changelog-core
- conventional-changelog-writer
- conventional-recommended-bump
flex-development:
patterns:
- '@flex-development/*'
nest-commander:
patterns:
- commander
- nest-commander*
nestjs:
patterns:
- '@nestjs/*'
typescript-eslint:
patterns:
- '@typescript-eslint/*'
vitest:
patterns:
- '@vitest/*'
- vitest
- vitest*
ignore:
- dependency-name: nest-commander
labels:
Expand Down
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
5 changes: 3 additions & 2 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 All @@ -22,11 +23,11 @@
"Brewfile"
],
"options": {
"functionNextLine": true,
"functionNextLine": false,
"keepComments": true,
"keepPadding": false,
"parser": "sh",
"spaceRedirects": true,
"spaceRedirects": false,
"switchCaseIndent": true,
"variant": 0
}
Expand Down
4 changes: 1 addition & 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 @@ -310,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 @@ -393,7 +391,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
10 changes: 8 additions & 2 deletions build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@ const config: Config = defineBuildConfig({
charset: 'utf8',
entries: [
{ dts: 'only', ignore: ['cli/**'] },
{ dts: false, pattern: ['(interfaces|types)/index.ts'] },
{
dts: false,
pattern: ['*.ts', 'config/*', 'internal/*', 'plugins/*', 'utils/*'],
pattern: [
'!plugins/**/options.ts',
'*.ts',
'config/**',
'internal/**',
'plugins/**',
'utils/**'
],
sourcemap: true
},
{
Expand Down
2 changes: 1 addition & 1 deletion config/changelog.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
} from '@flex-development/tutils'
import { Inject, Module } from '@nestjs/common'
import addStream from 'add-stream'
import { Command, CommanderError } from 'commander'
import type { Command, CommanderError } from 'commander'
import consola from 'consola'
import conventionalChangelog from 'conventional-changelog'
import type { Options } from 'conventional-changelog-core'
Expand Down
Loading

0 comments on commit 7173959

Please sign in to comment.