diff --git a/.attw.json b/.attw.json index a4bd686a..b9d2af96 100644 --- a/.attw.json +++ b/.attw.json @@ -2,6 +2,6 @@ "color": true, "emoji": true, "format": "ascii", - "ignoreRules": ["cjs-resolves-to-esm"], + "ignoreRules": ["cjs-resolves-to-esm", "internal-resolution-error"], "summary": true } diff --git a/.codecov.yml b/.codecov.yml index 6d32c89f..f99a45aa 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -4,12 +4,12 @@ --- codecov: notify: - after_n_builds: 4 + after_n_builds: 1 wait_for_ci: true require_ci_to_pass: true comment: - after_n_builds: 4 + after_n_builds: 1 behavior: default layout: header,diff,flags,components,tree,footer require_base: false @@ -27,23 +27,19 @@ component_management: - component_id: cli name: cli paths: - - src/cli/**/*.ts - - component_id: config - name: config - paths: - - src/config/*.ts + - src/cli/**/*.mts - component_id: internal name: internal paths: - - src/internal/*.ts + - src/internal/*.mts - component_id: plugins name: plugins paths: - - src/plugins/**/*.ts + - src/plugins/*.mts - component_id: utils name: utils paths: - - src/utils/*.ts + - src/utils/*.mts coverage: precision: 2 @@ -92,19 +88,7 @@ coverage: threshold: 0% flags: - node20: - carryforward: false - paths: - - src/ - node19: - carryforward: false - paths: - - src/ - node18: - carryforward: false - paths: - - src/ - node16: + node23: carryforward: false paths: - src/ @@ -113,16 +97,19 @@ github_checks: annotations: true ignore: - - '**/__mocks__/**' - - '**/__tests__/**' - - '**/index.ts' + - '**/*.d.mts' + - '**/__mocks__/' + - '**/__tests__/' + - '**/index.mts' - '**/interfaces/' - '**/types/' - - src/plugins/**/options.ts + - '!src/index.mts' + - src/internal/*.browser.mts profiling: critical_files_paths: - - src/cli/**/*.ts - - src/config/*.ts - - src/internal/create-context.ts - - src/make.ts + - src/cli/**/*.mts + - src/make.mts + - src/plugins/*.mts + - src/utils/load-build-config.mts + - src/utils/runnable-task.mts diff --git a/.commitlintrc.cts b/.commitlintrc.ts similarity index 77% rename from .commitlintrc.cts rename to .commitlintrc.ts index d515ed66..7aca4c86 100644 --- a/.commitlintrc.cts +++ b/.commitlintrc.ts @@ -18,11 +18,12 @@ import { scopes } from '@flex-development/commitlint-config' const config: UserConfig = { extends: ['@flex-development'], rules: { - 'scope-enum': [ - Severity.Error, - 'always', - scopes(['bundle', 'options', 'transpile']) - ] + 'scope-enum': [Severity.Error, 'always', scopes([ + 'bundle', + 'chore', + 'options', + 'transpile' + ])] } } diff --git a/.cspell.json b/.cspell.json index 32d4d0c6..1237839a 100644 --- a/.cspell.json +++ b/.cspell.json @@ -13,8 +13,9 @@ "failFast": false, "flagWords": [], "ignorePaths": [ - "**/*.log", + "**/*.patch", "**/*.snap", + "**/*.wasm", "**/.*ignore", "**/.gitconfig", "**/CHANGELOG.md", @@ -26,15 +27,10 @@ ".husky/_/", ".vscode/settings.json", ".yarn/", - "dist/", "patches/", "yarn.lock" ], - "ignoreRegExpList": [ - "/@flex-development\\/.*/", - "/from\\s+(['\"]).*\\1/", - "import\\(.*\\)" - ], + "ignoreRegExpList": [], "ignoreWords": [], "language": "en-US", "patterns": [], diff --git a/.dictionary.txt b/.dictionary.txt index 61712686..51ee9755 100644 --- a/.dictionary.txt +++ b/.dictionary.txt @@ -1,48 +1,33 @@ -ardatan -atoi attw -bdougie -booleanish cefc codecov -commitish commitlintrc dedupe -defu -dequal dessant +devlop dists +docast dohm dprint -emojify esbuild -evanw fbca +finalised ggshield gpgsign -groupby hmarr -iife -infile -iterare -keyid +jchen +kaisugi ksort -larsgw lcov -lintstagedrc -memfs mkbuild -mlly -nestjs -nocheck -npmrc nvmrc -onrequest -pathe pkgs -preid +reexporter +remarkrc +rollup +sarif shfmt -swcrc +smob toodles tribonacci tscu diff --git a/.dprint.jsonc b/.dprint.jsonc index 9e81f898..c0a3b18b 100644 --- a/.dprint.jsonc +++ b/.dprint.jsonc @@ -1,37 +1,33 @@ { "$schema": "https://dprint.dev/schemas/v0.json", "excludes": [ - "!**/__fixtures__/**/dist/", - "!**/__fixtures__/**/node_modules/", - "!**/typings/**/dist/", + "!*.scratch.*", + "!scratch.*", "**/*.patch", "**/*.snap", - "**/*config.*.timestamp*", - "**/.temp/", - "**/.vercel/", - "**/__tests__/report.json", - "**/coverage/", - "**/dist/", - "**/node_modules", - "**/tsconfig*temp.json", + "**/CHANGELOG.md", + "**/LICENSE.md", + "**/RELEASE_NOTES.md", ".git/", ".husky/_/", ".yarn/", - "CHANGELOG.md", - "LICENSE.md", - "RELEASE_NOTES.md", "yarn.lock" ], "exec": { "commands": [ { - "command": "node ./dprint/prettier.mjs {{file_path}}", - "exts": ["json5", "yaml", "yml"], + "command": "node --experimental-strip-types --experimental-transform-types ./dprint/prettier.mts {{file_path}}", + "exts": ["css", "html", "json5", "scss", "yaml", "yml"], "stdin": true }, { - "command": "node ./dprint/shfmt.mjs {{file_path}}", - "exts": ["sh", "txt", "zsh"], + "command": "node --experimental-strip-types --experimental-transform-types ./dprint/remark.mts {{file_path}}", + "exts": ["md", "mdx"], + "stdin": true + }, + { + "command": "node --experimental-strip-types --experimental-transform-types ./dprint/shfmt.mts {{file_path}}", + "exts": ["sh", "zsh"], "fileNames": [ ".editorconfig", ".env", @@ -42,7 +38,6 @@ ".gitattributes", ".gitconfig", ".gitignore", - ".markdownlintignore", ".npmrc", ".nvmrc", "Brewfile", @@ -52,35 +47,24 @@ ], "stdin": true } - ] + ], + "cwd": "${configDir}" }, - "incremental": true, "indentWidth": 2, "json": { "associations": ["**/*.{jsonc,json}"], "array.preferSingleLine": false, "commentLine.forceSpaceAfterSlashes": true, "ignoreNodeCommentText": "dprint-ignore", - "object.preferSingleLine": false + "object.preferSingleLine": false, + "trailingCommas": "never" }, "lineWidth": 80, - "markdown": { - "associations": ["**/*.{md,mdx}"], - "emphasisKind": "asterisks", - "ignoreDirective": "dprint-ignore", - "ignoreEndDirective": "dprint-ignore-end", - "ignoreFileDirective": "dprint-ignore-file", - "ignoreStartDirective": "dprint-ignore-start", - "lineWidth": 120, - "strongKind": "asterisks", - "textWrap": "maintain" - }, "newLineKind": "lf", "plugins": [ - "https://plugins.dprint.dev/typescript-0.87.1.wasm", - "https://plugins.dprint.dev/json-0.17.4.wasm", - "https://plugins.dprint.dev/markdown-0.16.0.wasm", - "https://plugins.dprint.dev/exec-0.4.3.json@42343548b8022c99b1d750be6b894fe6b6c7ee25f72ae9f9082226dd2e515072" + "https://plugins.dprint.dev/typescript-0.91.6.wasm", + "https://plugins.dprint.dev/json-0.19.3.wasm", + "https://plugins.dprint.dev/exec-0.5.0.json@8d9972eee71fa1590e04873540421f3eda7674d0f1aae3d7c788615e7b7413d0" ], "typescript": { "arrowFunction.useParentheses": "preferNone", @@ -88,13 +72,13 @@ "binaryExpression.operatorPosition": "sameLine", "binaryExpression.spaceSurroundingBitwiseAndArithmeticOperator": true, "bracePosition": "sameLine", - "commentLine.forceSpaceAfterSlashes": true, + "commentLine.forceSpaceAfterSlashes": false, "constructSignature.spaceAfterNewKeyword": true, "constructor.spaceBeforeParentheses": false, "constructorType.spaceAfterNewKeyword": true, "doWhileStatement.spaceAfterWhileKeyword": true, "enumDeclaration.memberSpacing": "maintain", - "exportDeclaration.forceMultiLine": false, + "exportDeclaration.forceMultiLine": "never", "exportDeclaration.forceSingleLine": false, "exportDeclaration.sortNamedExports": "maintain", "exportDeclaration.spaceSurroundingNamedExports": true, @@ -109,15 +93,15 @@ "ifStatement.spaceAfterIfKeyword": true, "ignoreFileCommentText": "dprint-ignore-file", "ignoreNodeCommentText": "dprint-ignore", - "importDeclaration.forceMultiLine": false, + "importDeclaration.forceMultiLine": "never", "importDeclaration.forceSingleLine": false, "importDeclaration.sortNamedImports": "maintain", "importDeclaration.spaceSurroundingNamedImports": true, "jsx.bracketPosition": "nextLine", "jsx.forceNewLinesSurroundingContent": false, - "jsx.multiLineParens": "always", + "jsx.multiLineParens": "prefer", "jsx.quoteStyle": "preferSingle", - "jsxExpressionContainer.spaceSurroundingExpression": true, + "jsxExpressionContainer.spaceSurroundingExpression": false, "jsxSelfClosingElement.spaceBeforeSlash": true, "memberExpression.linePerExpression": false, "method.spaceBeforeParentheses": false, diff --git a/.editorconfig b/.editorconfig index d931b04e..c7bacd95 100644 --- a/.editorconfig +++ b/.editorconfig @@ -22,12 +22,8 @@ spaces_around_operators = true tab_width = 2 trim_trailing_whitespace = true -# handlebars -[*.hbs] -max_line_length = 100 - # markdown -[*.md] +[{*.md,*.mdx}] max_line_length = 120 # shellscript @@ -45,10 +41,6 @@ switch_case_indent = true [*.snap] max_line_length = 130 -# xml -[*.xml] -max_line_length = 100 - # yaml [{*.yaml,*.yml}] max_line_length = 100 diff --git a/.env.vars b/.env.vars new file mode 100644 index 00000000..cb4e28c1 --- /dev/null +++ b/.env.vars @@ -0,0 +1,3 @@ +# repository variables + +GH_PROJECT_NUMBER=12 diff --git a/.env.zsh b/.env.zsh index 019440a5..5ff969e5 100644 --- a/.env.zsh +++ b/.env.zsh @@ -8,3 +8,4 @@ [ -f $PWD/.env.repo ] && source $PWD/.env.repo HOMEBREW_BREWFILE=./Brewfile NODE_NO_WARNINGS=1 +NODE_OPTIONS='--experimental-strip-types --experimental-transform-types' diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 7f0839ac..00000000 --- a/.eslintignore +++ /dev/null @@ -1,31 +0,0 @@ -# ESLINT IGNORE -# https://eslint.org/docs/user-guide/configuring/ignoring-code#the-eslintignore-file - -# DIRECTORIES & FILES -**/*.patch -**/*.snap -**/*config.*.timestamp* -**/.DS_Store -**/__tests__/report.json -**/coverage/ -**/.temp/ -**/dist/ -**/node_modules/ -**/tsconfig*temp.json -yarn.lock - -# NEGATED PATTERNS -!**/.eslintrc* -!**/__fixtures__/**/dist/ -!**/__fixtures__/**/node_modules/ -!**/typings/**/dist/ -!.attw.json -!.codecov.yml -!.commitlintrc.* -!.cspell.json -!.dprint.* -!.github/ -!.lintstagedrc.json -!.markdownlint.jsonc -!.vscode/ -!.yarnrc.yml diff --git a/.eslintrc.base.cjs b/.eslintrc.base.cjs deleted file mode 100644 index 811b0465..00000000 --- a/.eslintrc.base.cjs +++ /dev/null @@ -1,1289 +0,0 @@ -/** - * @file ESLint Configuration - Base - * @module config/eslint/base - * @see https://eslint.org/docs/user-guide/configuring - */ - -/** - * @type {typeof import('node:fs')} - * @const fs - */ -const fs = require('node:fs') - -/** - * @type {typeof import('./tsconfig.json')} - * @const tsconfig - Tsconfig object - */ -const tsconfig = require('./tsconfig.json') - -/** - * @type {boolean} - * @const jsx - JSX check - */ -const jsx = Boolean(tsconfig.compilerOptions.jsx) - -/** - * @type {import('eslint').Linter.Config} - * @const config - ESLint configuration object - */ -const config = { - env: { - [require('./tsconfig.build.json').compilerOptions.target]: true, - node: true - }, - extends: [], - overrides: [ - { - extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], - files: '**/*.+(cjs|cts|js|jsx|mjs|mts|ts|tsx)', - globals: { - BufferEncoding: 'readonly', - Chai: 'readonly', - Console: 'readonly', - JSX: jsx ? 'readonly' : false, - NodeJS: 'readonly' - }, - parser: '@typescript-eslint/parser', - parserOptions: { - extraFileExtensions: [], - project: ['./tsconfig.json', './tsconfig.cjs.json'], - sourceType: require('./package.json').type, - tsconfigRootDir: process.cwd(), - warnOnUnsupportedTypeScriptVersion: true - }, - plugins: [ - '@typescript-eslint', - 'import', - 'jsdoc', - 'node', - 'promise', - 'unicorn' - ], - rules: { - '@typescript-eslint/adjacent-overload-signatures': 2, - '@typescript-eslint/array-type': [ - 2, - { - default: 'array', - readonly: 'array' - } - ], - '@typescript-eslint/await-thenable': 2, - '@typescript-eslint/ban-ts-comment': [ - 2, - { - minimumDescriptionLength: 3, - 'ts-expect-error': 'allow-with-description', - 'ts-ignore': 'allow-with-description', - 'ts-nocheck': 'allow-with-description' - } - ], - '@typescript-eslint/ban-tslint-comment': 2, - '@typescript-eslint/ban-types': [ - 2, - { - extendDefaults: true, - types: {} - } - ], - '@typescript-eslint/camelcase': 0, - '@typescript-eslint/class-literal-property-style': [2, 'getters'], - '@typescript-eslint/consistent-indexed-object-style': [2, 'record'], - '@typescript-eslint/consistent-type-assertions': [ - 2, - { - assertionStyle: 'as', - objectLiteralTypeAssertions: 'allow' - } - ], - '@typescript-eslint/consistent-type-definitions': 0, - '@typescript-eslint/consistent-type-exports': [ - 2, - { - fixMixedExportsWithInlineTypeSpecifier: true - } - ], - '@typescript-eslint/consistent-type-imports': 0, - '@typescript-eslint/default-param-last': 2, - '@typescript-eslint/dot-notation': [ - 2, - { - allowIndexSignaturePropertyAccess: false, - allowKeywords: true, - allowPattern: undefined, - allowPrivateClassPropertyAccess: false, - allowProtectedClassPropertyAccess: false - } - ], - '@typescript-eslint/explicit-function-return-type': 0, - '@typescript-eslint/explicit-member-accessibility': [ - 2, - { - accessibility: 'explicit', - overrides: { - constructors: 'no-public' - } - } - ], - '@typescript-eslint/init-declarations': 0, - '@typescript-eslint/lines-between-class-members': [ - 2, - 'always', - { - exceptAfterOverload: true, - exceptAfterSingleLine: false - } - ], - '@typescript-eslint/member-ordering': [ - 2, - { - default: { - memberTypes: [ - 'static-field', - 'instance-field', - 'constructor', - 'signature', - 'static-get', - 'static-set', - 'static-method', - 'instance-get', - 'instance-set', - 'instance-method' - ], - order: 'alphabetically' - } - } - ], - '@typescript-eslint/method-signature-style': [2, 'method'], - '@typescript-eslint/no-array-constructor': 2, - '@typescript-eslint/no-base-to-string': [ - 2, - { - ignoredTypeNames: ['Error', 'RegExp', 'URL', 'URLSearchParams'] - } - ], - '@typescript-eslint/no-confusing-non-null-assertion': 0, - '@typescript-eslint/no-confusing-void-expression': [ - 2, - { - ignoreArrowShorthand: true, - ignoreVoidOperator: true - } - ], - '@typescript-eslint/no-dupe-class-members': 2, - '@typescript-eslint/no-dynamic-delete': 2, - '@typescript-eslint/no-empty-function': [ - 2, - { - allow: ['constructors', 'decoratedFunctions'] - } - ], - '@typescript-eslint/no-empty-interface': 0, - '@typescript-eslint/no-explicit-any': 0, - '@typescript-eslint/no-extra-non-null-assertion': 2, - '@typescript-eslint/no-extra-parens': 0, - '@typescript-eslint/no-extra-semi': 0, - '@typescript-eslint/no-extraneous-class': [ - 2, - { - allowConstructorOnly: false, - allowEmpty: true, - allowStaticOnly: true, - allowWithDecorator: true - } - ], - '@typescript-eslint/no-floating-promises': [ - 2, - { - ignoreIIFE: false, - ignoreVoid: true - } - ], - '@typescript-eslint/no-for-in-array': 2, - '@typescript-eslint/no-implied-eval': 2, - '@typescript-eslint/no-inferrable-types': 0, - '@typescript-eslint/no-invalid-this': [2, { capIsConstructor: true }], - '@typescript-eslint/no-invalid-void-type': [ - 2, - { - allowAsThisParameter: true, - allowInGenericTypeArguments: true - } - ], - '@typescript-eslint/no-loop-func': 2, - '@typescript-eslint/no-loss-of-precision': 2, - '@typescript-eslint/no-magic-numbers': 0, - '@typescript-eslint/no-meaningless-void-operator': 0, - '@typescript-eslint/no-misused-new': 2, - '@typescript-eslint/no-misused-promises': [ - 2, - { - checksConditionals: true, - checksVoidReturn: true - } - ], - '@typescript-eslint/no-namespace': 0, - '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 2, - '@typescript-eslint/no-non-null-asserted-optional-chain': 0, - '@typescript-eslint/no-non-null-assertion': 0, - '@typescript-eslint/no-parameter-properties': 0, - '@typescript-eslint/no-redeclare': [ - 2, - { - builtinGlobals: true, - ignoreDeclarationMerge: true - } - ], - '@typescript-eslint/no-redundant-type-constituents': 2, - '@typescript-eslint/no-require-imports': 2, - '@typescript-eslint/no-restricted-imports': 0, - '@typescript-eslint/no-shadow': 0, - '@typescript-eslint/no-this-alias': [ - 2, - { - allowDestructuring: false, - allowedNames: ['self'] - } - ], - '@typescript-eslint/no-throw-literal': 0, - '@typescript-eslint/no-type-alias': 0, - '@typescript-eslint/no-unnecessary-boolean-literal-compare': [ - 2, - { - allowComparingNullableBooleansToFalse: true, - allowComparingNullableBooleansToTrue: true - } - ], - '@typescript-eslint/no-unnecessary-condition': [ - 2, - { - allowConstantLoopConditions: true, - allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false - } - ], - '@typescript-eslint/no-unnecessary-qualifier': 2, - '@typescript-eslint/no-unnecessary-type-arguments': 2, - '@typescript-eslint/no-unnecessary-type-assertion': [ - 2, - { - typesToIgnore: [] - } - ], - '@typescript-eslint/no-unnecessary-type-constraint': 2, - '@typescript-eslint/no-unsafe-argument': 2, - '@typescript-eslint/no-unsafe-assignment': 0, - '@typescript-eslint/no-unsafe-call': 2, - '@typescript-eslint/no-unsafe-member-access': 2, - '@typescript-eslint/no-unsafe-return': 2, - '@typescript-eslint/no-unused-expressions': [ - 2, - { - allowShortCircuit: true, - allowTaggedTemplates: true, - allowTernary: true, - enforceForJSX: true - } - ], - '@typescript-eslint/no-unused-vars': [ - 2, - { - args: 'after-used', - caughtErrors: 'all', - ignoreRestSiblings: false, - vars: 'all' - } - ], - '@typescript-eslint/no-use-before-define': [ - 2, - { - classes: true, - enums: true, - functions: true, - ignoreTypeReferences: true, - typedefs: true, - variables: true - } - ], - '@typescript-eslint/no-useless-constructor': 2, - '@typescript-eslint/no-useless-empty-export': 2, - '@typescript-eslint/no-var-requires': 2, - '@typescript-eslint/non-nullable-type-assertion-style': 2, - '@typescript-eslint/padding-line-between-statements': 0, - '@typescript-eslint/prefer-as-const': 2, - '@typescript-eslint/prefer-enum-initializers': 0, - '@typescript-eslint/prefer-for-of': 2, - '@typescript-eslint/prefer-function-type': 2, - '@typescript-eslint/prefer-includes': 0, - '@typescript-eslint/prefer-literal-enum-member': [ - 2, - { - allowBitwiseExpressions: true - } - ], - '@typescript-eslint/prefer-namespace-keyword': 2, - '@typescript-eslint/prefer-nullish-coalescing': [ - 2, - { - ignoreConditionalTests: true, - ignoreMixedLogicalExpressions: true, - ignorePrimitives: { string: true } - } - ], - '@typescript-eslint/prefer-optional-chain': 2, - '@typescript-eslint/prefer-readonly': 2, - '@typescript-eslint/prefer-readonly-parameter-types': 0, - '@typescript-eslint/prefer-reduce-type-parameter': 2, - '@typescript-eslint/prefer-regexp-exec': 2, - '@typescript-eslint/prefer-return-this-type': 0, - '@typescript-eslint/prefer-string-starts-ends-with': 2, - '@typescript-eslint/prefer-ts-expect-error': 2, - '@typescript-eslint/promise-function-async': 2, - '@typescript-eslint/quotes': [ - 2, - 'single', - { - allowTemplateLiterals: true, - avoidEscape: true - } - ], - '@typescript-eslint/require-array-sort-compare': 2, - '@typescript-eslint/require-await': 2, - '@typescript-eslint/restrict-plus-operands': [ - 2, - { - allowAny: false, - allowBoolean: false, - allowNullish: false, - allowNumberAndString: true, - allowRegExp: false, - skipCompoundAssignments: true - } - ], - '@typescript-eslint/restrict-template-expressions': [ - 2, - { - allowAny: false, - allowBoolean: true, - allowNullish: true, - allowNumber: true, - allowRegExp: true - } - ], - '@typescript-eslint/return-await': [2, 'in-try-catch'], - '@typescript-eslint/sort-type-constituents': 2, - '@typescript-eslint/strict-boolean-expressions': [ - 2, - { - allowAny: false, - allowNullableBoolean: true, - allowNullableNumber: true, - allowNullableObject: true, - allowNullableString: true, - allowNumber: true, - allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false, - allowString: true - } - ], - '@typescript-eslint/switch-exhaustiveness-check': 2, - '@typescript-eslint/triple-slash-reference': [ - 2, - { - lib: 'never', - path: 'never', - types: 'prefer-import' - } - ], - '@typescript-eslint/typedef': 0, - '@typescript-eslint/unbound-method': [2, { ignoreStatic: true }], - '@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, - 'jsdoc/check-examples': 0, - // https://github.com/gajus/eslint-plugin-jsdoc/issues/541 - 'jsdoc/check-indentation': 0, - 'jsdoc/check-line-alignment': 1, - 'jsdoc/check-param-names': [ - 1, - { - allowExtraTrailingParamDocs: false, - checkDestructured: true, - checkRestProperty: true, - disableExtraPropertyReporting: true, - enableFixer: true - } - ], - 'jsdoc/check-property-names': [1, { enableFixer: true }], - 'jsdoc/check-syntax': 1, - 'jsdoc/check-tag-names': [ - 1, - { - definedTags: [ - 'decorator', - 'experimental', - 'maximum', - 'minimum', - 'next', - 'packageManager', - 'visibleName' - ], - jsxTags: false - } - ], - 'jsdoc/check-types': [1, { unifyParentAndChildTypeChecks: true }], - 'jsdoc/check-values': 1, - 'jsdoc/empty-tags': 1, - 'jsdoc/implements-on-classes': 1, - 'jsdoc/match-description': 0, - 'jsdoc/match-name': 0, - 'jsdoc/multiline-blocks': 1, - 'jsdoc/no-bad-blocks': [1, { preventAllMultiAsteriskBlocks: true }], - 'jsdoc/no-defaults': 0, - 'jsdoc/no-missing-syntax': 0, - 'jsdoc/no-multi-asterisks': [ - 1, - { - allowWhitespace: true, - preventAtEnd: true, - preventAtMiddleLines: true - } - ], - 'jsdoc/no-restricted-syntax': 0, - 'jsdoc/no-types': 0, - 'jsdoc/no-undefined-types': [1, { definedTypes: ['never', 'unknown'] }], - 'jsdoc/require-asterisk-prefix': [1, 'always'], - 'jsdoc/require-description': [ - 1, - { - checkConstructors: true, - checkGetters: true, - checkSetters: true, - descriptionStyle: 'body' - } - ], - 'jsdoc/require-description-complete-sentence': 0, - 'jsdoc/require-example': 0, - 'jsdoc/require-file-overview': [ - 1, - { - tags: { - file: { - initialCommentsOnly: true, - mustExist: true, - preventDuplicates: true - }, - module: { - initialCommentsOnly: true, - mustExist: true, - preventDuplicates: true - } - } - } - ], - 'jsdoc/require-hyphen-before-param-description': 1, - 'jsdoc/require-jsdoc': [ - 1, - { - checkConstructors: true, - checkGetters: true, - checkSetters: true, - enableFixer: true, - exemptEmptyConstructors: true, - exemptEmptyFunctions: false - } - ], - 'jsdoc/require-param': [ - 1, - { - autoIncrementBase: 0, - checkConstructors: true, - checkDestructured: true, - checkDestructuredRoots: true, - checkGetters: true, - checkRestProperty: true, - checkSetters: true, - enableFixer: true, - enableRestElementFixer: true, - enableRootFixer: true, - exemptedBy: ['inheritdoc', 'this'], - unnamedRootBase: ['param'], - useDefaultObjectProperties: true - } - ], - 'jsdoc/require-param-description': 1, - 'jsdoc/require-param-name': 1, - 'jsdoc/require-param-type': 1, - 'jsdoc/require-property': 1, - 'jsdoc/require-property-description': 1, - 'jsdoc/require-property-name': 1, - 'jsdoc/require-property-type': 1, - 'jsdoc/require-returns': [ - 1, - { - checkConstructors: false, - checkGetters: true, - forceRequireReturn: true, - forceReturnsWithAsync: true - } - ], - 'jsdoc/require-returns-check': [ - 1, - { - exemptAsync: false, - exemptGenerators: true, - reportMissingReturnForUndefinedTypes: true - } - ], - 'jsdoc/require-returns-description': 1, - 'jsdoc/require-returns-type': 1, - 'jsdoc/require-throws': 1, - 'jsdoc/require-yields': [ - 1, - { - forceRequireNext: true, - forceRequireYields: true, - next: true, - nextWithGeneratorTag: true, - withGeneratorTag: true - } - ], - 'jsdoc/require-yields-check': [ - 1, - { - checkGeneratorsOnly: true, - next: true - } - ], - 'jsdoc/sort-tags': 0, - 'jsdoc/tag-lines': [ - 1, - 'any', - { - applyToEndTag: true, - count: 1, - endLines: 0, - startLines: 1, - tags: {} - } - ], - 'jsdoc/valid-types': [1, { allowEmptyNamepaths: true }], - 'lines-between-class-members': 0, - 'no-array-constructor': 0, - 'no-case-declarations': 0, - 'no-duplicate-imports': 0, - 'no-empty': [2, { allowEmptyCatch: true }], - '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, - 'no-loss-of-precision': 0, - 'no-magic-numbers': 0, - 'no-restricted-imports': 0, - 'no-return-await': 0, - 'no-shadow': 0, - 'no-sparse-arrays': 0, - 'no-throw-literal': 0, - 'no-unused-expressions': 0, - 'no-unused-vars': 0, - 'no-use-before-define': 0, - 'no-useless-constructor': 0, - 'no-warning-comments': 0, - 'node/callback-return': [2, ['callback', 'cb', 'done', 'next']], - 'node/exports-style': [2, 'module.exports', { allowBatchAssign: true }], - 'node/file-extension-in-import': 0, - 'node/global-require': 0, - 'node/handle-callback-err': [2, '^(err|error)$'], - 'node/no-callback-literal': 2, - 'node/no-deprecated-api': 2, - 'node/no-exports-assign': 2, - 'node/no-extraneous-import': 0, - 'node/no-extraneous-require': 0, - 'node/no-missing-import': 0, - 'node/no-new-require': 2, - 'node/no-path-concat': 2, - 'node/no-process-env': 0, - 'node/no-process-exit': 0, - 'node/no-unpublished-bin': 0, - 'node/no-unpublished-import': 0, - 'node/no-unpublished-require': 0, - 'node/no-unsupported-features/es-builtins': 2, - 'node/no-unsupported-features/es-syntax': 0, - 'node/no-unsupported-features/node-builtins': 2, - 'node/prefer-global/buffer': 2, - 'node/prefer-global/console': 2, - 'node/prefer-global/process': 2, - 'node/prefer-global/text-decoder': 2, - 'node/prefer-global/text-encoder': 2, - 'node/prefer-global/url': 2, - 'node/prefer-global/url-search-params': 2, - 'node/prefer-promises/dns': 2, - 'node/prefer-promises/fs': 2, - 'node/process-exit-as-throw': 2, - 'node/shebang': 0, - 'padding-line-between-statements': 0, - 'prefer-arrow-callback': 0, - 'promise/always-return': 2, - 'promise/avoid-new': 0, - 'promise/catch-or-return': [2, { allowFinally: true, allowThen: true }], - 'promise/no-callback-in-promise': 2, - 'promise/no-native': 0, - 'promise/no-nesting': 2, - 'promise/no-new-statics': 2, - 'promise/no-promise-in-callback': 2, - 'promise/no-return-in-finally': 2, - 'promise/no-return-wrap': [2, { allowReject: false }], - 'promise/param-names': 2, - 'promise/prefer-await-to-callbacks': 1, - 'promise/prefer-await-to-then': 2, - 'promise/valid-params': 2, - quotes: 0, - 'require-await': 0, - 'sort-keys': [ - 2, - 'asc', - { - caseSensitive: true, - minKeys: 2, - natural: true - } - ], - 'unicorn/better-regex': [2, { sortCharacterClasses: true }], - 'unicorn/catch-error-name': [2, { name: 'e' }], - 'unicorn/consistent-destructuring': 2, - 'unicorn/custom-error-definition': 2, - 'unicorn/empty-brace-spaces': 2, - 'unicorn/error-message': 2, - 'unicorn/escape-case': 2, - 'unicorn/expiring-todo-comments': [ - 2, - { - allowWarningComments: true, - ignore: [], - ignoreDatesOnPullRequests: true, - terms: ['@fixme', '@todo'] - } - ], - 'unicorn/explicit-length-check': 0, - 'unicorn/filename-case': [ - 2, - { - cases: { kebabCase: true }, - ignore: [] - } - ], - 'unicorn/import-index': 2, - 'unicorn/import-style': [ - 2, - { - styles: { - shelljs: { default: true } - } - } - ], - 'unicorn/new-for-builtins': 2, - 'unicorn/no-abusive-eslint-disable': 2, - 'unicorn/no-array-callback-reference': 0, - 'unicorn/no-array-for-each': 2, - 'unicorn/no-array-method-this-argument': 2, - 'unicorn/no-array-push-push': 0, - 'unicorn/no-array-reduce': 0, - 'unicorn/no-await-expression-member': 0, - 'unicorn/no-console-spaces': 2, - 'unicorn/no-empty-file': 2, - 'unicorn/no-for-loop': 0, - 'unicorn/no-hex-escape': 2, - 'unicorn/no-instanceof-array': 2, - 'unicorn/no-keyword-prefix': [ - 2, - { - checkProperties: false, - disallowedPrefixes: ['class', 'new'], - onlyCamelCase: true - } - ], - 'unicorn/no-lonely-if': 0, - 'unicorn/no-nested-ternary': 0, - 'unicorn/no-new-array': 2, - 'unicorn/no-new-buffer': 2, - 'unicorn/no-null': 0, - 'unicorn/no-object-as-default-parameter': 2, - 'unicorn/no-process-exit': 2, - 'unicorn/no-static-only-class': 0, - 'unicorn/no-thenable': 2, - 'unicorn/no-this-assignment': 2, - 'unicorn/no-unreadable-array-destructuring': 0, - 'unicorn/no-unsafe-regex': 0, - 'unicorn/no-unused-properties': 2, - 'unicorn/no-useless-fallback-in-spread': 2, - 'unicorn/no-useless-length-check': 2, - 'unicorn/no-useless-promise-resolve-reject': 2, - 'unicorn/no-useless-spread': 2, - 'unicorn/no-useless-undefined': 2, - 'unicorn/no-zero-fractions': 2, - 'unicorn/number-literal-case': 0, - // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2003 - 'unicorn/numeric-separators-style': 0, - 'unicorn/prefer-add-event-listener': 2, - 'unicorn/prefer-array-find': 2, - 'unicorn/prefer-array-flat': [2, { functions: [] }], - 'unicorn/prefer-array-flat-map': 2, - 'unicorn/prefer-array-index-of': 2, - 'unicorn/prefer-array-some': 2, - 'unicorn/prefer-at': 0, - 'unicorn/prefer-code-point': 2, - 'unicorn/prefer-date-now': 2, - 'unicorn/prefer-default-parameters': 2, - 'unicorn/prefer-export-from': [2, { ignoreUsedVariables: true }], - 'unicorn/prefer-includes': 2, - 'unicorn/prefer-json-parse-buffer': 0, - 'unicorn/prefer-math-trunc': 2, - 'unicorn/prefer-module': 2, - 'unicorn/prefer-negative-index': 2, - 'unicorn/prefer-node-protocol': 2, - 'unicorn/prefer-number-properties': 2, - 'unicorn/prefer-object-from-entries': [2, { functions: [] }], - 'unicorn/prefer-optional-catch-binding': 2, - 'unicorn/prefer-prototype-methods': 2, - 'unicorn/prefer-reflect-apply': 2, - 'unicorn/prefer-regexp-test': 0, - 'unicorn/prefer-set-has': 2, - 'unicorn/prefer-spread': 2, - 'unicorn/prefer-string-replace-all': 0, - 'unicorn/prefer-string-slice': 2, - 'unicorn/prefer-string-starts-ends-with': 2, - 'unicorn/prefer-string-trim-start-end': 2, - 'unicorn/prefer-switch': 2, - 'unicorn/prefer-ternary': 2, - 'unicorn/prefer-top-level-await': 0, - 'unicorn/prefer-type-error': 2, - 'unicorn/prevent-abbreviations': 0, - 'unicorn/relative-url-style': [2, 'never'], - 'unicorn/require-array-join-separator': 2, - 'unicorn/require-number-to-fixed-digits-argument': 2, - 'unicorn/string-content': [2, { patterns: {} }], - 'unicorn/template-indent': [2, { indent: 2 }], - 'unicorn/text-encoding-identifier-case': 2, - 'unicorn/throw-new-error': 2 - } - }, - { - files: '**/*.+(cts|mts|ts)', - rules: { - '@typescript-eslint/explicit-module-boundary-types': [ - 2, - { - allowArgumentsExplicitlyTypedAsAny: true, - allowDirectConstAssertionInArrowFunctions: true, - allowHigherOrderFunctions: false, - allowTypedFunctionExpressions: false, - allowedNames: [] - } - ], - 'no-undef': 0 - } - }, - { - files: '**/*.d.+(cts|mts|ts)', - rules: { - '@typescript-eslint/ban-types': 0, - '@typescript-eslint/triple-slash-reference': 0, - 'jsdoc/no-undefined-types': 0, - 'jsdoc/require-file-overview': 0, - 'no-var': 0, - 'unicorn/filename-case': 0, - 'unicorn/no-keyword-prefix': 0 - } - }, - { - files: '**/*.+(cjs|cts)', - rules: { - '@typescript-eslint/no-require-imports': 0, - '@typescript-eslint/no-var-requires': 0, - 'unicorn/prefer-module': 0 - } - }, - { - files: '**/__mocks__/**/*.ts', - rules: { - '@typescript-eslint/no-unused-vars': 0, - '@typescript-eslint/require-await': 0 - } - }, - { - files: '**/__tests__/*.+(spec|spec-d).ts', - globals: { - afterAll: true, - afterEach: true, - assert: true, - beforeAll: true, - beforeEach: true, - chai: true, - describe: true, - expect: true, - faker: fs.existsSync('node_modules/@faker-js/faker'), - it: true, - pf: fs.existsSync('node_modules/pretty-format'), - suite: true, - test: true, - vi: true, - vitest: true - }, - 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, - '@typescript-eslint/no-invalid-void-type': 0, - '@typescript-eslint/no-unused-expressions': 0, - '@typescript-eslint/prefer-as-const': 0, - '@typescript-eslint/prefer-ts-expect-error': 0, - '@typescript-eslint/require-await': 0, - '@typescript-eslint/restrict-template-expressions': 0, - '@typescript-eslint/unbound-method': 0, - 'chai-expect/missing-assertion': 2, - 'chai-expect/no-inner-compare': 2, - 'chai-expect/no-inner-literal': 2, - 'chai-expect/terminating-properties': [2, { properties: [] }], - 'jest-formatting/padding-around-after-all-blocks': 1, - 'jest-formatting/padding-around-after-each-blocks': 1, - 'jest-formatting/padding-around-before-all-blocks': 1, - 'jest-formatting/padding-around-before-each-blocks': 1, - 'jest-formatting/padding-around-describe-blocks': 1, - 'jest-formatting/padding-around-expect-groups': 1, - 'jest-formatting/padding-around-test-blocks': 1, - 'promise/prefer-await-to-callbacks': 0, - 'promise/valid-params': 0, - 'unicorn/consistent-destructuring': 0, - 'unicorn/error-message': 0, - 'unicorn/no-array-for-each': 0, - 'unicorn/no-hex-escape': 0, - 'unicorn/no-useless-undefined': 0, - 'unicorn/prefer-at': 0, - 'unicorn/prefer-dom-node-append': 0, - 'unicorn/string-content': 0 - } - }, - { - files: '**/__tests__/*.spec-d.ts', - globals: { - assertType: true, - expectTypeOf: true - }, - rules: { - '@typescript-eslint/ban-types': 0, - '@typescript-eslint/no-redundant-type-constituents': 0 - } - }, - { - files: ['**/decorators/*.constraint.ts', '**/*.decorator.ts'], - rules: { - '@typescript-eslint/ban-types': 0, - '@typescript-eslint/no-invalid-void-type': 0 - } - }, - { - files: ['**/enums/*.ts', '**/interfaces/*.ts', '**/types/*.ts'], - rules: { - 'jsdoc/check-indentation': 0, - 'unicorn/no-keyword-prefix': 0 - } - }, - { - files: '**/*.+(cjs|js|mjs)', - rules: { - '@typescript-eslint/explicit-member-accessibility': 0 - } - }, - { - files: '**/*.+(json|json5|jsonc)', - parser: 'jsonc-eslint-parser', - plugins: ['jsonc'], - rules: { - 'jsonc/no-bigint-literals': 2, - 'jsonc/no-binary-expression': 2, - 'jsonc/no-binary-numeric-literals': 2, - 'jsonc/no-escape-sequence-in-identifier': 2, - 'jsonc/no-hexadecimal-numeric-literals': 2, - 'jsonc/no-infinity': 2, - 'jsonc/no-multi-str': 2, - 'jsonc/no-nan': 2, - 'jsonc/no-number-props': 2, - 'jsonc/no-numeric-separators': 2, - 'jsonc/no-octal': 0, - 'jsonc/no-octal-escape': 2, - 'jsonc/no-octal-numeric-literals': 2, - 'jsonc/no-parenthesized': 2, - 'jsonc/no-plus-sign': 2, - 'jsonc/no-regexp-literals': 2, - 'jsonc/no-sparse-arrays': 2, - 'jsonc/no-template-literals': 2, - 'jsonc/no-undefined-value': 2, - 'jsonc/no-unicode-codepoint-escapes': 2, - 'jsonc/no-useless-escape': 2, - 'jsonc/sort-array-values': [ - 2, - { - order: { caseSensitive: true, type: 'asc' }, - pathPattern: '^$' - } - ], - 'jsonc/sort-keys': [ - 2, - { - order: { caseSensitive: true, type: 'asc' }, - pathPattern: '^$' - } - ], - 'jsonc/valid-json-number': 2, - 'jsonc/vue-custom-block/no-parsing-error': 2 - } - }, - { - files: ['**/*.+(json5|jsonc)', 'tsconfig*.json'], - rules: { - 'jsonc/no-comments': 0 - } - }, - { - files: ['**/package.json'], - rules: { - 'jsonc/sort-keys': [ - 2, - { - order: [ - 'name', - 'description', - 'version', - 'keywords', - 'license', - 'homepage', - 'repository', - 'bugs', - 'author', - 'contributors', - 'publishConfig', - 'type', - 'files', - 'exports', - 'main', - 'module', - 'types', - 'scripts', - 'dependencies', - 'devDependencies', - 'optionalDependencies', - 'peerDependencies', - 'resolutions', - 'engines', - 'packageManager', - 'readme' - ], - pathPattern: '^$' - } - ] - } - }, - { - files: '**/*.md', - parser: 'eslint-plugin-markdownlint/parser', - plugins: ['markdown', 'markdownlint'], - processor: 'markdown/markdown' - }, - { - files: '**/*.md/*.+(cjs|cts|js|jsx|mjs|mts|ts|tsx)', - parserOptions: { project: false }, - rules: { - '@typescript-eslint/await-thenable': 0, - '@typescript-eslint/consistent-type-exports': 0, - '@typescript-eslint/dot-notation': 0, - '@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, - '@typescript-eslint/no-unnecessary-type-arguments': 0, - '@typescript-eslint/no-unnecessary-type-assertion': 0, - '@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, - '@typescript-eslint/prefer-regexp-exec': 0, - '@typescript-eslint/prefer-return-this-type': 0, - '@typescript-eslint/prefer-string-starts-ends-with': 0, - '@typescript-eslint/promise-function-async': 0, - '@typescript-eslint/require-array-sort-compare': 0, - '@typescript-eslint/require-await': 0, - '@typescript-eslint/restrict-plus-operands': 0, - '@typescript-eslint/restrict-template-expressions': 0, - '@typescript-eslint/return-await': 0, - '@typescript-eslint/strict-boolean-expressions': 0, - '@typescript-eslint/switch-exhaustiveness-check': 0, - '@typescript-eslint/unbound-method': 0, - 'jsdoc/require-file-overview': 0, - 'unicorn/filename-case': 0 - } - }, - { - files: '**/*.+(yaml|yml)', - parser: 'yaml-eslint-parser', - plugins: ['yml'], - rules: { - 'spaced-comment': 0, - 'yml/block-mapping': 2, - 'yml/block-mapping-question-indicator-newline': [2, 'never'], - 'yml/block-sequence': 2, - 'yml/block-sequence-hyphen-indicator-newline': [2, 'never'], - 'yml/flow-mapping-curly-newline': 2, - 'yml/flow-mapping-curly-spacing': [ - 2, - 'always', - { - arraysInObjects: false, - objectsInObjects: false - } - ], - 'yml/flow-sequence-bracket-newline': 2, - 'yml/flow-sequence-bracket-spacing': 2, - 'yml/indent': [2, 2], - 'yml/key-name-casing': [ - 2, - { - SCREAMING_SNAKE_CASE: true, - camelCase: false, - 'kebab-case': true, - snake_case: true - } - ], - 'yml/key-spacing': 2, - 'yml/no-empty-document': 0, - 'yml/no-empty-key': 2, - 'yml/no-empty-mapping-value': 0, - 'yml/no-empty-sequence-entry': 2, - 'yml/no-irregular-whitespace': 2, - 'yml/no-multiple-empty-lines': [2, { max: 2, maxBOF: 0, maxEOF: 1 }], - 'yml/no-tab-indent': 2, - 'yml/plain-scalar': [2, 'always'], - 'yml/quotes': [2, { avoidEscape: true, prefer: 'single' }], - 'yml/require-string-key': 2, - 'yml/sort-keys': [ - 2, - { - order: { caseSensitive: true, type: 'asc' }, - pathPattern: '^$' - } - ], - 'yml/sort-sequence-values': [ - 2, - { - order: { caseSensitive: true, type: 'asc' }, - pathPattern: '^$' - } - ], - 'yml/spaced-comment': 2 - } - }, - { - files: '.eslintrc.*', - rules: { - '@typescript-eslint/no-unsafe-member-access': 0, - 'unicorn/string-content': 0 - } - }, - { - files: '.github/ISSUE_TEMPLATE/*.yml', - rules: { - 'yml/sort-keys': [ - 2, - { - order: [ - 'name', - 'description', - 'title', - 'assignees', - 'labels', - 'body' - ], - pathPattern: '^$' - } - ] - } - }, - { - files: '.github/ISSUE_TEMPLATE/config.yml', - rules: { - 'yml/sort-keys': [ - 2, - { - order: { caseSensitive: true, type: 'asc' }, - pathPattern: '^$' - } - ] - } - }, - { - files: [ - '.github/dependabot.yml', - '.github/workflows/*.yml', - 'action.yml', - 'docker*.yml' - ], - rules: { - 'yml/sort-keys': 0 - } - }, - { - files: ['.github/workflows/*.yml', '.yarnrc.yml', 'docker*.yml'], - rules: { - 'yml/key-name-casing': 0 - } - }, - { - files: ['.vscode/launch.json'], - rules: { - 'jsonc/sort-keys': 0 - } - } - ], - plugins: [], - reportUnusedDisableDirectives: true, - rules: {}, - 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, - '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'] - }, - experimental: { - name: 'none' - }, - extends: { - name: 'namepath-defining', - required: ['type'] - }, - implements: { - name: 'namepath-defining', - required: ['type'] - }, - maximum: { - name: 'text', - required: ['name'] - }, - member: { - name: 'namepath-defining', - required: ['name', 'type'] - }, - minimum: { - name: 'text', - required: ['name'] - }, - next: { - name: 'namepath-defining', - required: ['type'] - }, - packageManager: { - name: 'text', - required: ['name'] - }, - param: { - name: 'namepath-defining', - required: ['name', 'type'] - }, - return: { - name: 'namepath-defining', - required: ['type'] - }, - throws: { - name: 'namepath-defining', - required: ['type'] - }, - type: { - name: 'namepath-defining', - required: ['type'] - }, - var: { - name: 'namepath-defining', - required: ['name'] - }, - visibleName: { - required: ['name'] - }, - yield: { - name: 'namepath-defining', - required: ['type'] - } - }, - tagNamePreference: { - augments: 'extends', - constant: 'const', - fileoverview: 'file', - member: 'member', - returns: 'return', - var: 'var', - yields: 'yield' - } - } - } -} - -module.exports = config diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index ed40d050..00000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @file ESLint Configuration - Root - * @module config/eslint - * @see https://eslint.org/docs/user-guide/configuring - */ - -/** - * @type {import('eslint').Linter.Config} - * @const config - ESLint configuration object - */ -const config = { - extends: ['./.eslintrc.base.cjs'], - overrides: [ - ...require('./.eslintrc.base.cjs').overrides, - { - files: ['src/cli/app.module.ts'], - rules: { - 'unicorn/no-process-exit': 0 - } - } - ], - root: true -} - -module.exports = config diff --git a/.gitattributes b/.gitattributes index ac4b1285..3393ce02 100644 --- a/.gitattributes +++ b/.gitattributes @@ -21,9 +21,9 @@ *.cjs text eol=lf *.cts text eol=lf *.gql text eol=lf -*.hbs text eol=lf +*.html text eol=lf diff=html *.js text eol=lf -*.json text eol=lf +*.json text eol=lf linguist-language=JSON-with-Comments *.json5 text eol=lf *.jsonc text eol=lf *.jsx text eol=lf diff --git a/.github/.gitconfig b/.github/.gitconfig index bd74537b..2e50bbc9 100644 --- a/.github/.gitconfig +++ b/.github/.gitconfig @@ -25,7 +25,7 @@ chb = "!f() { git checkout -b \"$@\" && git pou \"$@\"; }; f" chp = "!f() { git checkout $@ && git pull; }; f" # commit with message -cm = "!f() { git commit -s -m \"$@\"; }; f" +cm = "!f() { git commit -S -s -m \"$@\"; }; f" # tell git to start tracking branch and push to origin pou = "!f() { git push origin --no-verify -u $@; }; f" @@ -62,7 +62,7 @@ fpnv = "!f() { git pnv --force ; }; f" pnv = "!f() { git push --no-verify $@; }; f" [branch] -autosetuprebase = always +autoSetupRebase = always [checkout] defaultRemote = origin @@ -85,6 +85,12 @@ tool = vscode [difftool "vscode"] cmd = code-insiders --wait --diff $LOCAL $REMOTE +[filter "lfs"] +clean = git-lfs clean -- %f +smudge = git-lfs smudge -- %f +process = git-lfs filter-process +required = true + [gitflow "prefix"] feature = feat/ hotfix = hotfix/ @@ -97,6 +103,10 @@ program = gpg2 [init] defaultBranch = main +[log] +date = iso8601-strict +decorate = short + [merge] tool = vscode @@ -111,6 +121,8 @@ autoStash = true [tag] forceSignAnnotated = true +gpgsign = true +sort = -creatordate [url "git@github.com:"] insteadOf = gh: diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml index c21cc46c..0be64223 100644 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -2,8 +2,8 @@ name: Feature description: Suggest new feature or improvement title: 👀
1024,I&&(e.dump&&XC===e.dump.charCodeAt(0)?v+="?":v+="? "),v+=e.dump,I&&(v+=yT(e,t)),Xg(e,t+1,w,!0,I)&&(e.dump&&XC===e.dump.charCodeAt(0)?v+=":":v+=": ",v+=e.dump,a+=v));e.tag=n,e.dump=a||"{}"}function PK(e,t,r){var o,a,n,u,A,p;for(a=r?e.explicitTypes:e.implicitTypes,n=0,u=a.length;n tag resolver accepts not "'+p+'" style');e.dump=o}return!0}return!1}function Xg(e,t,r,o,a,n){e.tag=null,e.dump=r,PK(e,r,!1)||PK(e,r,!0);var u=xK.call(e.dump);o&&(o=e.flowLevel<0||e.flowLevel>t);var A=u==="[object Object]"||u==="[object Array]",p,h;if(A&&(p=e.duplicates.indexOf(r),h=p!==-1),(e.tag!==null&&e.tag!=="?"||h||e.indent!==2&&t>0)&&(a=!1),h&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(A&&h&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),u==="[object Object]")o&&Object.keys(e.dump).length!==0?(M6e(e,t,e.dump,a),h&&(e.dump="&ref_"+p+e.dump)):(O6e(e,t,e.dump),h&&(e.dump="&ref_"+p+" "+e.dump));else if(u==="[object Array]"){var w=e.noArrayIndent&&t>0?t-1:t;o&&e.dump.length!==0?(L6e(e,w,e.dump,a),h&&(e.dump="&ref_"+p+e.dump)):(N6e(e,w,e.dump),h&&(e.dump="&ref_"+p+" "+e.dump))}else if(u==="[object String]")e.tag!=="?"&&F6e(e,e.dump,t,n);else{if(e.skipInvalid)return!1;throw new $C("unacceptable kind of an object to dump "+u)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function U6e(e,t){var r=[],o=[],a,n;for(ET(e,r,o),a=0,n=o.length;a {var n,u;if(Object.getPrototypeOf(o).toString()==="[object Set]")if(typeof a?.coercions<"u"){if(typeof a?.coercion>"u")return fr(a,"Unbound coercion result");let A=[...o],p=[...o];if(!r(p,Object.assign(Object.assign({},a),{coercion:void 0})))return!1;let h=()=>p.some((w,I)=>w!==A[I])?new Set(p):o;return a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",nI(a.coercion,o,h)]),!0}else{let A=!0;for(let p of o)if(A=e(p,Object.assign({},a))&&A,!A&&a?.errors==null)break;return A}if(typeof a?.coercions<"u"){if(typeof a?.coercion>"u")return fr(a,"Unbound coercion result");let A={value:o};return r(o,Object.assign(Object.assign({},a),{coercion:Ku(A,"value")}))?(a.coercions.push([(u=a.p)!==null&&u!==void 0?u:".",nI(a.coercion,o,()=>new Set(A.value))]),!0):!1}return fr(a,`Expected a set (got ${Hn(o)})`)}})}function lje(e,t){let r=nS(iS([e,t])),o=sS(t,{keys:e});return _r({test:(a,n)=>{var u,A,p;if(Object.getPrototypeOf(a).toString()==="[object Map]")if(typeof n?.coercions<"u"){if(typeof n?.coercion>"u")return fr(n,"Unbound coercion result");let h=[...a],w=[...a];if(!r(w,Object.assign(Object.assign({},n),{coercion:void 0})))return!1;let I=()=>w.some((v,b)=>v[0]!==h[b][0]||v[1]!==h[b][1])?new Map(w):a;return n.coercions.push([(u=n.p)!==null&&u!==void 0?u:".",nI(n.coercion,a,I)]),!0}else{let h=!0;for(let[w,I]of a)if(h=e(w,Object.assign({},n))&&h,!h&&n?.errors==null||(h=t(I,Object.assign(Object.assign({},n),{p:Gp(n,w)}))&&h,!h&&n?.errors==null))break;return h}if(typeof n?.coercions<"u"){if(typeof n?.coercion>"u")return fr(n,"Unbound coercion result");let h={value:a};return Array.isArray(a)?r(a,Object.assign(Object.assign({},n),{coercion:void 0}))?(n.coercions.push([(A=n.p)!==null&&A!==void 0?A:".",nI(n.coercion,a,()=>new Map(h.value))]),!0):!1:o(a,Object.assign(Object.assign({},n),{coercion:Ku(h,"value")}))?(n.coercions.push([(p=n.p)!==null&&p!==void 0?p:".",nI(n.coercion,a,()=>new Map(Object.entries(h.value)))]),!0):!1}return fr(n,`Expected a map (got ${Hn(a)})`)}})}function iS(e,{delimiter:t}={}){let r=pJ(e.length);return _r({test:(o,a)=>{var n;if(typeof o=="string"&&typeof t<"u"&&typeof a?.coercions<"u"){if(typeof a?.coercion>"u")return fr(a,"Unbound coercion result");o=o.split(t),a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",a.coercion.bind(null,o)])}if(!Array.isArray(o))return fr(a,`Expected a tuple (got ${Hn(o)})`);let u=r(o,Object.assign({},a));for(let A=0,p=o.length;A {var n;if(Array.isArray(o)&&typeof a?.coercions<"u")return typeof a?.coercion>"u"?fr(a,"Unbound coercion result"):r(o,Object.assign(Object.assign({},a),{coercion:void 0}))?(o=Object.fromEntries(o),a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",a.coercion.bind(null,o)]),!0):!1;if(typeof o!="object"||o===null)return fr(a,`Expected an object (got ${Hn(o)})`);let u=Object.keys(o),A=!0;for(let p=0,h=u.length;p `:`[${b}]`)}o.push(...this.arity.leading.map(u=>`<${u}>`)),this.arity.extra===el?o.push("..."):o.push(...this.arity.extra.map(u=>`[${u}]`)),o.push(...this.arity.trailing.map(u=>`<${u}>`))}return{usage:o.join(" "),options:a}}compile(){if(typeof this.context>"u")throw new Error("Assertion failed: No context attached");let t=dJ(),r=ln.InitialNode,o=this.usage().usage,a=this.options.filter(A=>A.required).map(A=>A.nameSet);r=Oc(t,$a()),Vo(t,ln.InitialNode,_n.StartOfInput,r,["setCandidateState",{candidateUsage:o,requiredOptions:a}]);let n=this.arity.proxy?"always":"isNotOptionLike",u=this.paths.length>0?this.paths:[[]];for(let A of u){let p=r;if(A.length>0){let v=Oc(t,$a());wy(t,p,v),this.registerOptions(t,v),p=v}for(let v=0;v {var KVe=Jp(),JVe=_l(),VVe=KVe(JVe,"DataView");yte.exports=VVe});var Cte=_((sRt,wte)=>{var zVe=Jp(),XVe=_l(),ZVe=zVe(XVe,"Promise");wte.exports=ZVe});var Bte=_((oRt,Ite)=>{var $Ve=Jp(),eze=_l(),tze=$Ve(eze,"Set");Ite.exports=tze});var Dte=_((aRt,vte)=>{var rze=Jp(),nze=_l(),ize=rze(nze,"WeakMap");vte.exports=ize});var HI=_((lRt,Fte)=>{var zN=Ete(),XN=MS(),ZN=Cte(),$N=Bte(),eL=Dte(),kte=pd(),Hy=_N(),Ste="[object Map]",sze="[object Object]",Pte="[object Promise]",xte="[object Set]",bte="[object WeakMap]",Qte="[object DataView]",oze=Hy(zN),aze=Hy(XN),lze=Hy(ZN),cze=Hy($N),uze=Hy(eL),hd=kte;(zN&&hd(new zN(new ArrayBuffer(1)))!=Qte||XN&&hd(new XN)!=Ste||ZN&&hd(ZN.resolve())!=Pte||$N&&hd(new $N)!=xte||eL&&hd(new eL)!=bte)&&(hd=function(e){var t=kte(e),r=t==sze?e.constructor:void 0,o=r?Hy(r):"";if(o)switch(o){case oze:return Qte;case aze:return Ste;case lze:return Pte;case cze:return xte;case uze:return bte}return t});Fte.exports=hd});var _te=_((cRt,Ute)=>{var tL=_S(),Aze=HN(),fze=xee(),pze=mte(),Rte=HI(),Tte=Hl(),Nte=LI(),hze=KS(),gze=1,Lte="[object Arguments]",Ote="[object Array]",zS="[object Object]",dze=Object.prototype,Mte=dze.hasOwnProperty;function mze(e,t,r,o,a,n){var u=Tte(e),A=Tte(t),p=u?Ote:Rte(e),h=A?Ote:Rte(t);p=p==Lte?zS:p,h=h==Lte?zS:h;var w=p==zS,I=h==zS,v=p==h;if(v&&Nte(e)){if(!Nte(t))return!1;u=!0,w=!1}if(v&&!w)return n||(n=new tL),u||hze(e)?Aze(e,t,r,o,a,n):fze(e,t,p,r,o,a,n);if(!(r&gze)){var b=w&&Mte.call(e,"__wrapped__"),E=I&&Mte.call(t,"__wrapped__");if(b||E){var R=b?e.value():e,N=E?t.value():t;return n||(n=new tL),a(R,N,r,o,n)}}return v?(n||(n=new tL),pze(e,t,r,o,a,n)):!1}Ute.exports=mze});var Gte=_((uRt,qte)=>{var yze=_te(),Hte=Xu();function jte(e,t,r,o,a){return e===t?!0:e==null||t==null||!Hte(e)&&!Hte(t)?e!==e&&t!==t:yze(e,t,r,o,jte,a)}qte.exports=jte});var Wte=_((ARt,Yte)=>{var Eze=Gte();function wze(e,t){return Eze(e,t)}Yte.exports=wze});var rL=_((fRt,Kte)=>{var Cze=Jp(),Ize=function(){try{var e=Cze(Object,"defineProperty");return e({},"",{}),e}catch{}}();Kte.exports=Ize});var XS=_((pRt,Vte)=>{var Jte=rL();function Bze(e,t,r){t=="__proto__"&&Jte?Jte(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}Vte.exports=Bze});var nL=_((hRt,zte)=>{var vze=XS(),Dze=Ty();function Sze(e,t,r){(r!==void 0&&!Dze(e[t],r)||r===void 0&&!(t in e))&&vze(e,t,r)}zte.exports=Sze});var Zte=_((gRt,Xte)=>{function Pze(e){return function(t,r,o){for(var a=-1,n=Object(t),u=o(t),A=u.length;A--;){var p=u[e?A:++a];if(r(n[p],p,n)===!1)break}return t}}Xte.exports=Pze});var ere=_((dRt,$te)=>{var xze=Zte(),bze=xze();$te.exports=bze});var iL=_((jI,jy)=>{var Qze=_l(),ire=typeof jI=="object"&&jI&&!jI.nodeType&&jI,tre=ire&&typeof jy=="object"&&jy&&!jy.nodeType&&jy,kze=tre&&tre.exports===ire,rre=kze?Qze.Buffer:void 0,nre=rre?rre.allocUnsafe:void 0;function Fze(e,t){if(t)return e.slice();var r=e.length,o=nre?nre(r):new e.constructor(r);return e.copy(o),o}jy.exports=Fze});var ZS=_((mRt,ore)=>{var sre=jN();function Rze(e){var t=new e.constructor(e.byteLength);return new sre(t).set(new sre(e)),t}ore.exports=Rze});var sL=_((yRt,are)=>{var Tze=ZS();function Nze(e,t){var r=t?Tze(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}are.exports=Nze});var $S=_((ERt,lre)=>{function Lze(e,t){var r=-1,o=e.length;for(t||(t=Array(o));++r >/2":{type_args:!1,type_result:!1,fn:function(C,P,y){return C>>P}},"/\\/2":{type_args:!1,type_result:!1,fn:function(C,P,y){return C&P}},"\\//2":{type_args:!1,type_result:!1,fn:function(C,P,y){return C|P}},"xor/2":{type_args:!1,type_result:!1,fn:function(C,P,y){return C^P}},"rem/2":{type_args:!1,type_result:!1,fn:function(C,P,y){return P?C%P:x.error.evaluation("zero_division",y.__call_indicator)}},"mod/2":{type_args:!1,type_result:!1,fn:function(C,P,y){return P?C-parseInt(C/P)*P:x.error.evaluation("zero_division",y.__call_indicator)}},"max/2":{type_args:null,type_result:null,fn:function(C,P,y){return Math.max(C,P)}},"min/2":{type_args:null,type_result:null,fn:function(C,P,y){return Math.min(C,P)}}}},directive:{"dynamic/1":function(C,P){var y=P.args[0];if(x.type.is_variable(y))C.throw_error(x.error.instantiation(P.indicator));else if(!x.type.is_compound(y)||y.indicator!=="//2")C.throw_error(x.error.type("predicate_indicator",y,P.indicator));else if(x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1]))C.throw_error(x.error.instantiation(P.indicator));else if(!x.type.is_atom(y.args[0]))C.throw_error(x.error.type("atom",y.args[0],P.indicator));else if(!x.type.is_integer(y.args[1]))C.throw_error(x.error.type("integer",y.args[1],P.indicator));else{var F=P.args[0].args[0].id+"/"+P.args[0].args[1].value;C.session.public_predicates[F]=!0,C.session.rules[F]||(C.session.rules[F]=[])}},"multifile/1":function(C,P){var y=P.args[0];x.type.is_variable(y)?C.throw_error(x.error.instantiation(P.indicator)):!x.type.is_compound(y)||y.indicator!=="//2"?C.throw_error(x.error.type("predicate_indicator",y,P.indicator)):x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1])?C.throw_error(x.error.instantiation(P.indicator)):x.type.is_atom(y.args[0])?x.type.is_integer(y.args[1])?C.session.multifile_predicates[P.args[0].args[0].id+"/"+P.args[0].args[1].value]=!0:C.throw_error(x.error.type("integer",y.args[1],P.indicator)):C.throw_error(x.error.type("atom",y.args[0],P.indicator))},"set_prolog_flag/2":function(C,P){var y=P.args[0],F=P.args[1];x.type.is_variable(y)||x.type.is_variable(F)?C.throw_error(x.error.instantiation(P.indicator)):x.type.is_atom(y)?x.type.is_flag(y)?x.type.is_value_flag(y,F)?x.type.is_modifiable_flag(y)?C.session.flag[y.id]=F:C.throw_error(x.error.permission("modify","flag",y)):C.throw_error(x.error.domain("flag_value",new H("+",[y,F]),P.indicator)):C.throw_error(x.error.domain("prolog_flag",y,P.indicator)):C.throw_error(x.error.type("atom",y,P.indicator))},"use_module/1":function(C,P){var y=P.args[0];if(x.type.is_variable(y))C.throw_error(x.error.instantiation(P.indicator));else if(!x.type.is_term(y))C.throw_error(x.error.type("term",y,P.indicator));else if(x.type.is_module(y)){var F=y.args[0].id;t(C.session.modules,F)===-1&&C.session.modules.push(F)}},"char_conversion/2":function(C,P){var y=P.args[0],F=P.args[1];x.type.is_variable(y)||x.type.is_variable(F)?C.throw_error(x.error.instantiation(P.indicator)):x.type.is_character(y)?x.type.is_character(F)?y.id===F.id?delete C.session.__char_conversion[y.id]:C.session.__char_conversion[y.id]=F.id:C.throw_error(x.error.type("character",F,P.indicator)):C.throw_error(x.error.type("character",y,P.indicator))},"op/3":function(C,P){var y=P.args[0],F=P.args[1],z=P.args[2];if(x.type.is_variable(y)||x.type.is_variable(F)||x.type.is_variable(z))C.throw_error(x.error.instantiation(P.indicator));else if(!x.type.is_integer(y))C.throw_error(x.error.type("integer",y,P.indicator));else if(!x.type.is_atom(F))C.throw_error(x.error.type("atom",F,P.indicator));else if(!x.type.is_atom(z))C.throw_error(x.error.type("atom",z,P.indicator));else if(y.value<0||y.value>1200)C.throw_error(x.error.domain("operator_priority",y,P.indicator));else if(z.id===",")C.throw_error(x.error.permission("modify","operator",z,P.indicator));else if(z.id==="|"&&(y.value<1001||F.id.length!==3))C.throw_error(x.error.permission("modify","operator",z,P.indicator));else if(["fy","fx","yf","xf","xfx","yfx","xfy"].indexOf(F.id)===-1)C.throw_error(x.error.domain("operator_specifier",F,P.indicator));else{var X={prefix:null,infix:null,postfix:null};for(var Z in C.session.__operators)if(!!C.session.__operators.hasOwnProperty(Z)){var ie=C.session.__operators[Z][z.id];ie&&(t(ie,"fx")!==-1&&(X.prefix={priority:Z,type:"fx"}),t(ie,"fy")!==-1&&(X.prefix={priority:Z,type:"fy"}),t(ie,"xf")!==-1&&(X.postfix={priority:Z,type:"xf"}),t(ie,"yf")!==-1&&(X.postfix={priority:Z,type:"yf"}),t(ie,"xfx")!==-1&&(X.infix={priority:Z,type:"xfx"}),t(ie,"xfy")!==-1&&(X.infix={priority:Z,type:"xfy"}),t(ie,"yfx")!==-1&&(X.infix={priority:Z,type:"yfx"}))}var Pe;switch(F.id){case"fy":case"fx":Pe="prefix";break;case"yf":case"xf":Pe="postfix";break;default:Pe="infix";break}if(((X.prefix&&Pe==="prefix"||X.postfix&&Pe==="postfix"||X.infix&&Pe==="infix")&&X[Pe].type!==F.id||X.infix&&Pe==="postfix"||X.postfix&&Pe==="infix")&&y.value!==0)C.throw_error(x.error.permission("create","operator",z,P.indicator));else return X[Pe]&&(we(C.session.__operators[X[Pe].priority][z.id],F.id),C.session.__operators[X[Pe].priority][z.id].length===0&&delete C.session.__operators[X[Pe].priority][z.id]),y.value>0&&(C.session.__operators[y.value]||(C.session.__operators[y.value.toString()]={}),C.session.__operators[y.value][z.id]||(C.session.__operators[y.value][z.id]=[]),C.session.__operators[y.value][z.id].push(F.id)),!0}}},predicate:{"op/3":function(C,P,y){x.directive["op/3"](C,y)&&C.success(P)},"current_op/3":function(C,P,y){var F=y.args[0],z=y.args[1],X=y.args[2],Z=[];for(var ie in C.session.__operators)for(var Pe in C.session.__operators[ie])for(var Le=0;Le