diff --git a/.oxlintrc.json b/.oxlintrc.json deleted file mode 100644 index df6550d..0000000 --- a/.oxlintrc.json +++ /dev/null @@ -1,751 +0,0 @@ -{ - "$schema": "./node_modules/oxlint/configuration_schema.json", - "categories": { - "correctness": "off" - }, - "env": { - "browser": true, - "builtin": true, - "es2026": true, - "node": true - }, - "ignorePatterns": ["dist/**/*"], - "jsPlugins": ["eslint-plugin-functional", "eslint-plugin-sonarjs", "eslint-plugin-perfectionist"], - "options": { - "typeAware": true - }, - "overrides": [ - { - "env": { - "astro": true - }, - "files": ["**/*.astro"], - "jsPlugins": ["eslint-plugin-astro"], - "rules": { - "astro/jsx-a11y/alt-text": "error", - "astro/jsx-a11y/anchor-ambiguous-text": "error", - "astro/jsx-a11y/anchor-has-content": "error", - "astro/jsx-a11y/anchor-is-valid": "error", - "astro/jsx-a11y/aria-activedescendant-has-tabindex": "error", - "astro/jsx-a11y/aria-props": "error", - "astro/jsx-a11y/aria-proptypes": "error", - "astro/jsx-a11y/aria-role": "error", - "astro/missing-client-only-directive-value": "error", - "astro/no-conflict-set-directives": "error", - "astro/no-deprecated-astro-canonicalurl": "error", - "astro/no-deprecated-astro-fetchcontent": "error", - "astro/no-deprecated-astro-resolve": "error", - "astro/no-deprecated-getentrybyslug": "error", - "astro/no-exports-from-components": "error", - "astro/no-set-html-directive": "error", - "astro/no-set-text-directive": "error", - "astro/no-unused-css-selector": "error", - "astro/no-unused-define-vars-in-style": "error", - "astro/prefer-class-list-directive": "error", - "astro/prefer-object-class-list": "error", - "astro/prefer-split-class-list": [ - "error", - { - "splitLiteral": false - } - ], - "astro/sort-attributes": [ - "error", - { - "ignoreCase": false, - "order": "asc", - "type": "alphabetical" - } - ], - "astro/valid-compile": "error" - } - } - ], - "plugins": ["typescript", "unicorn", "jsdoc"], - "rules": { - "@typescript-eslint/adjacent-overload-signatures": "error", - "@typescript-eslint/array-type": [ - "error", - { - "default": "generic", - "readonly": "generic" - } - ], - "@typescript-eslint/await-thenable": "error", - "@typescript-eslint/ban-ts-comment": [ - "error", - { - "minimumDescriptionLength": 10 - } - ], - "@typescript-eslint/ban-tslint-comment": "error", - "@typescript-eslint/class-literal-property-style": "error", - "@typescript-eslint/consistent-generic-constructors": "error", - "@typescript-eslint/consistent-indexed-object-style": "error", - "@typescript-eslint/consistent-type-assertions": "error", - "@typescript-eslint/consistent-type-definitions": ["error", "type"], - "@typescript-eslint/dot-notation": "error", - "@typescript-eslint/no-array-delete": "error", - "@typescript-eslint/no-base-to-string": "error", - "@typescript-eslint/no-confusing-non-null-assertion": "error", - "@typescript-eslint/no-confusing-void-expression": "error", - "@typescript-eslint/no-deprecated": "error", - "@typescript-eslint/no-duplicate-enum-values": "error", - "@typescript-eslint/no-duplicate-type-constituents": "error", - "@typescript-eslint/no-dynamic-delete": "error", - "@typescript-eslint/no-empty-object-type": "error", - "@typescript-eslint/no-explicit-any": "error", - "@typescript-eslint/no-extra-non-null-assertion": "error", - "@typescript-eslint/no-extraneous-class": "error", - "@typescript-eslint/no-floating-promises": "error", - "@typescript-eslint/no-for-in-array": "error", - "@typescript-eslint/no-implied-eval": "error", - "@typescript-eslint/no-inferrable-types": "error", - "@typescript-eslint/no-invalid-void-type": "error", - "@typescript-eslint/no-meaningless-void-operator": "error", - "@typescript-eslint/no-misused-new": "error", - "@typescript-eslint/no-misused-promises": "error", - "@typescript-eslint/no-misused-spread": "error", - "@typescript-eslint/no-mixed-enums": "error", - "@typescript-eslint/no-namespace": "error", - "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error", - "@typescript-eslint/no-non-null-asserted-optional-chain": "error", - "@typescript-eslint/no-non-null-assertion": "error", - "@typescript-eslint/no-redundant-type-constituents": "error", - "@typescript-eslint/no-require-imports": "error", - "@typescript-eslint/no-this-alias": "error", - "@typescript-eslint/no-unnecessary-condition": "error", - "@typescript-eslint/no-unnecessary-template-expression": "error", - "@typescript-eslint/no-unnecessary-type-arguments": "error", - "@typescript-eslint/no-unnecessary-type-assertion": "error", - "@typescript-eslint/no-unnecessary-type-constraint": "error", - "@typescript-eslint/no-unnecessary-type-conversion": "error", - "@typescript-eslint/no-unsafe-argument": "error", - "@typescript-eslint/no-unsafe-assignment": "error", - "@typescript-eslint/no-unsafe-call": "error", - "@typescript-eslint/no-unsafe-declaration-merging": "error", - "@typescript-eslint/no-unsafe-enum-comparison": "error", - "@typescript-eslint/no-unsafe-function-type": "error", - "@typescript-eslint/no-unsafe-member-access": "error", - "@typescript-eslint/no-unsafe-return": "error", - "@typescript-eslint/no-unsafe-unary-minus": "error", - "@typescript-eslint/no-useless-default-assignment": "error", - "@typescript-eslint/no-wrapper-object-types": "error", - "@typescript-eslint/non-nullable-type-assertion-style": "error", - "@typescript-eslint/prefer-as-const": "error", - "@typescript-eslint/prefer-find": "error", - "@typescript-eslint/prefer-for-of": "error", - "@typescript-eslint/prefer-function-type": "error", - "@typescript-eslint/prefer-includes": "error", - "@typescript-eslint/prefer-literal-enum-member": "error", - "@typescript-eslint/prefer-namespace-keyword": "error", - "@typescript-eslint/prefer-nullish-coalescing": "error", - "@typescript-eslint/prefer-optional-chain": "error", - "@typescript-eslint/prefer-promise-reject-errors": "error", - "@typescript-eslint/prefer-readonly": "error", - "@typescript-eslint/prefer-reduce-type-parameter": "error", - "@typescript-eslint/prefer-regexp-exec": "error", - "@typescript-eslint/prefer-return-this-type": "error", - "@typescript-eslint/prefer-string-starts-ends-with": "error", - "@typescript-eslint/related-getter-setter-pairs": "error", - "@typescript-eslint/require-await": "error", - "@typescript-eslint/restrict-plus-operands": [ - "error", - { - "allowAny": false, - "allowBoolean": false, - "allowNullish": false, - "allowNumberAndString": false, - "allowRegExp": false - } - ], - "@typescript-eslint/restrict-template-expressions": [ - "error", - { - "allowAny": false, - "allowBoolean": false, - "allowNever": false, - "allowNullish": false, - "allowNumber": false, - "allowRegExp": false - } - ], - "@typescript-eslint/return-await": ["error", "error-handling-correctness-only"], - "@typescript-eslint/switch-exhaustiveness-check": "error", - "@typescript-eslint/triple-slash-reference": "error", - "@typescript-eslint/unbound-method": "error", - "@typescript-eslint/unified-signatures": "error", - "@typescript-eslint/use-unknown-in-catch-callback-variable": "error", - "array-callback-return": [ - "error", - { - "allowVoid": true, - "checkForEach": true - } - ], - "for-direction": "error", - "functional/immutable-data": "error", - "functional/no-let": "error", - "functional/no-throw-statements": "error", - "functional/no-try-statements": "error", - "functional/prefer-property-signatures": "error", - "functional/readonly-type": ["error", "generic"], - "jsdoc/check-access": "warn", - "jsdoc/check-property-names": "warn", - "jsdoc/check-tag-names": [ - "warn", - { - "definedTags": ["link"] - } - ], - "jsdoc/empty-tags": "warn", - "jsdoc/implements-on-classes": "warn", - "jsdoc/no-defaults": "warn", - "jsdoc/require-param": "warn", - "jsdoc/require-param-description": "warn", - "jsdoc/require-param-name": "warn", - "jsdoc/require-property": "warn", - "jsdoc/require-property-description": "warn", - "jsdoc/require-property-name": "warn", - "jsdoc/require-returns": "warn", - "jsdoc/require-returns-description": "warn", - "jsdoc/require-yields": "warn", - "max-params": [ - "error", - { - "max": 3 - } - ], - "no-array-constructor": "error", - "no-async-promise-executor": "error", - "no-case-declarations": "error", - "no-compare-neg-zero": "error", - "no-cond-assign": "error", - "no-constant-binary-expression": "error", - "no-constant-condition": "error", - "no-control-regex": "error", - "no-debugger": "error", - "no-delete-var": "error", - "no-dupe-else-if": "error", - "no-duplicate-case": "error", - "no-empty": "error", - "no-empty-character-class": "error", - "no-empty-function": "error", - "no-empty-pattern": "error", - "no-empty-static-block": "error", - "no-ex-assign": "error", - "no-extra-boolean-cast": "error", - "no-fallthrough": "error", - "no-global-assign": "error", - "no-invalid-regexp": "error", - "no-irregular-whitespace": "error", - "no-loss-of-precision": "error", - "no-misleading-character-class": "error", - "no-nonoctal-decimal-escape": "error", - "no-param-reassign": "error", - "no-prototype-builtins": "error", - "no-regex-spaces": "error", - "no-self-assign": "error", - "no-shadow-restricted-names": "error", - "no-sparse-arrays": "error", - "no-unassigned-vars": "error", - "no-unexpected-multiline": "error", - "no-unneeded-ternary": [ - "error", - { - "defaultAssignment": false - } - ], - "no-unsafe-finally": "error", - "no-unsafe-optional-chaining": "error", - "no-unused-expressions": "error", - "no-unused-labels": "error", - "no-unused-private-class-members": "error", - "no-unused-vars": "error", - "no-useless-backreference": "error", - "no-useless-catch": "error", - "no-useless-constructor": "error", - "no-useless-escape": "error", - "no-var": "error", - "perfectionist/sort-array-includes": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-classes": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-decorators": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-enums": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-export-attributes": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-exports": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-heritage-clauses": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-import-attributes": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-interfaces": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-intersection-types": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-jsx-props": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-maps": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-modules": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-named-exports": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-named-imports": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-object-types": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-objects": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-sets": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-switch-case": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-union-types": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "perfectionist/sort-variable-declarations": [ - "error", - { - "order": "asc", - "type": "natural" - } - ], - "prefer-const": "error", - "prefer-rest-params": "error", - "prefer-spread": "error", - "preserve-caught-error": "error", - "require-yield": "error", - "sonarjs/anchor-precedence": "error", - "sonarjs/argument-type": "error", - "sonarjs/arguments-order": "error", - "sonarjs/arguments-usage": "error", - "sonarjs/array-callback-without-return": "error", - "sonarjs/assertions-in-tests": "error", - "sonarjs/aws-apigateway-public-api": "error", - "sonarjs/aws-ec2-rds-dms-public": "error", - "sonarjs/aws-ec2-unencrypted-ebs-volume": "error", - "sonarjs/aws-efs-unencrypted": "error", - "sonarjs/aws-iam-all-privileges": "error", - "sonarjs/aws-iam-privilege-escalation": "error", - "sonarjs/aws-iam-public-access": "error", - "sonarjs/aws-opensearchservice-domain": "error", - "sonarjs/aws-rds-unencrypted-databases": "error", - "sonarjs/aws-restricted-ip-admin-access": "error", - "sonarjs/aws-s3-bucket-granted-access": "error", - "sonarjs/aws-s3-bucket-insecure-http": "error", - "sonarjs/aws-s3-bucket-public-access": "error", - "sonarjs/aws-s3-bucket-versioning": "error", - "sonarjs/aws-sagemaker-unencrypted-notebook": "error", - "sonarjs/aws-sns-unencrypted-topics": "error", - "sonarjs/aws-sqs-unencrypted-queue": "error", - "sonarjs/bitwise-operators": "error", - "sonarjs/block-scoped-var": "error", - "sonarjs/call-argument-line": "error", - "sonarjs/chai-determinate-assertion": "error", - "sonarjs/class-name": "error", - "sonarjs/code-eval": "error", - "sonarjs/cognitive-complexity": "error", - "sonarjs/comma-or-logical-or-case": "error", - "sonarjs/concise-regex": "error", - "sonarjs/confidential-information-logging": "error", - "sonarjs/constructor-for-side-effects": "error", - "sonarjs/content-length": "error", - "sonarjs/content-security-policy": "error", - "sonarjs/cookie-no-httponly": "error", - "sonarjs/cors": "error", - "sonarjs/csrf": "error", - "sonarjs/deprecation": "error", - "sonarjs/different-types-comparison": "error", - "sonarjs/disabled-auto-escaping": "error", - "sonarjs/disabled-resource-integrity": "error", - "sonarjs/disabled-timeout": "error", - "sonarjs/duplicates-in-character-class": "error", - "sonarjs/dynamically-constructed-templates": "error", - "sonarjs/empty-string-repetition": "error", - "sonarjs/encryption-secure-mode": "error", - "sonarjs/existing-groups": "error", - "sonarjs/file-permissions": "error", - "sonarjs/file-uploads": "error", - "sonarjs/fixme-tag": "error", - "sonarjs/for-loop-increment-sign": "error", - "sonarjs/frame-ancestors": "error", - "sonarjs/function-inside-loop": "error", - "sonarjs/function-return-type": "error", - "sonarjs/future-reserved-words": "error", - "sonarjs/generator-without-yield": "error", - "sonarjs/hardcoded-secret-signatures": "error", - "sonarjs/hashing": "error", - "sonarjs/hidden-files": "error", - "sonarjs/in-operator-type-error": "error", - "sonarjs/inconsistent-function-call": "error", - "sonarjs/index-of-compare-to-positive-number": "error", - "sonarjs/insecure-cookie": "error", - "sonarjs/insecure-jwt-token": "error", - "sonarjs/inverted-assertion-arguments": "error", - "sonarjs/jsx-no-leaked-render": "error", - "sonarjs/label-position": "error", - "sonarjs/link-with-target-blank": "error", - "sonarjs/max-switch-cases": "error", - "sonarjs/misplaced-loop-counter": "error", - "sonarjs/new-operator-misuse": "error", - "sonarjs/no-all-duplicated-branches": "error", - "sonarjs/no-alphabetical-sort": "error", - "sonarjs/no-angular-bypass-sanitization": "error", - "sonarjs/no-array-delete": "error", - "sonarjs/no-associative-arrays": "error", - "sonarjs/no-async-constructor": "error", - "sonarjs/no-case-label-in-switch": "error", - "sonarjs/no-clear-text-protocols": "error", - "sonarjs/no-code-after-done": "error", - "sonarjs/no-collapsible-if": "error", - "sonarjs/no-collection-size-mischeck": "error", - "sonarjs/no-commented-code": "error", - "sonarjs/no-control-regex": "error", - "sonarjs/no-dead-store": "error", - "sonarjs/no-delete-var": "error", - "sonarjs/no-duplicate-in-composite": "error", - "sonarjs/no-duplicate-string": "error", - "sonarjs/no-duplicated-branches": "error", - "sonarjs/no-element-overwrite": "error", - "sonarjs/no-empty-after-reluctant": "error", - "sonarjs/no-empty-alternatives": "error", - "sonarjs/no-empty-character-class": "error", - "sonarjs/no-empty-collection": "error", - "sonarjs/no-empty-group": "error", - "sonarjs/no-empty-test-file": "error", - "sonarjs/no-equals-in-for-termination": "error", - "sonarjs/no-exclusive-tests": "error", - "sonarjs/no-extra-arguments": "error", - "sonarjs/no-fallthrough": "error", - "sonarjs/no-global-this": "error", - "sonarjs/no-globals-shadowing": "error", - "sonarjs/no-gratuitous-expressions": "error", - "sonarjs/no-hardcoded-ip": "error", - "sonarjs/no-hardcoded-passwords": "error", - "sonarjs/no-hardcoded-secrets": "error", - "sonarjs/no-hook-setter-in-body": "error", - "sonarjs/no-identical-conditions": "error", - "sonarjs/no-identical-expressions": "error", - "sonarjs/no-identical-functions": "error", - "sonarjs/no-ignored-exceptions": "error", - "sonarjs/no-ignored-return": "error", - "sonarjs/no-implicit-global": "error", - "sonarjs/no-in-misuse": "error", - "sonarjs/no-incomplete-assertions": "error", - "sonarjs/no-inconsistent-returns": "error", - "sonarjs/no-internal-api-use": "error", - "sonarjs/no-intrusive-permissions": "error", - "sonarjs/no-invalid-regexp": "error", - "sonarjs/no-invariant-returns": "error", - "sonarjs/no-inverted-boolean-check": "error", - "sonarjs/no-ip-forward": "error", - "sonarjs/no-labels": "error", - "sonarjs/no-literal-call": "error", - "sonarjs/no-mime-sniff": "error", - "sonarjs/no-misleading-array-reverse": "error", - "sonarjs/no-misleading-character-class": "error", - "sonarjs/no-mixed-content": "error", - "sonarjs/no-nested-assignment": "error", - "sonarjs/no-nested-conditional": "error", - "sonarjs/no-nested-functions": "error", - "sonarjs/no-nested-switch": "error", - "sonarjs/no-nested-template-literals": "error", - "sonarjs/no-os-command-from-path": "error", - "sonarjs/no-parameter-reassignment": "error", - "sonarjs/no-primitive-wrappers": "error", - "sonarjs/no-redundant-assignments": "error", - "sonarjs/no-redundant-boolean": "error", - "sonarjs/no-redundant-jump": "error", - "sonarjs/no-redundant-optional": "error", - "sonarjs/no-referrer-policy": "error", - "sonarjs/no-regex-spaces": "error", - "sonarjs/no-same-argument-assert": "error", - "sonarjs/no-same-line-conditional": "error", - "sonarjs/no-selector-parameter": "error", - "sonarjs/no-session-cookies-on-static-assets": "error", - "sonarjs/no-skipped-tests": "error", - "sonarjs/no-small-switch": "error", - "sonarjs/no-table-as-layout": "error", - "sonarjs/no-try-promise": "error", - "sonarjs/no-undefined-argument": "error", - "sonarjs/no-unenclosed-multiline-block": "error", - "sonarjs/no-uniq-key": "error", - "sonarjs/no-unsafe-unzip": "error", - "sonarjs/no-unthrown-error": "error", - "sonarjs/no-unused-collection": "error", - "sonarjs/no-unused-vars": "error", - "sonarjs/no-use-of-empty-return-value": "error", - "sonarjs/no-useless-catch": "error", - "sonarjs/no-useless-increment": "error", - "sonarjs/no-useless-intersection": "error", - "sonarjs/no-useless-react-setstate": "error", - "sonarjs/no-weak-cipher": "error", - "sonarjs/no-weak-keys": "error", - "sonarjs/non-existent-operator": "error", - "sonarjs/null-dereference": "error", - "sonarjs/object-alt-content": "error", - "sonarjs/os-command": "error", - "sonarjs/post-message": "error", - "sonarjs/prefer-default-last": "error", - "sonarjs/prefer-immediate-return": "error", - "sonarjs/prefer-promise-shorthand": "error", - "sonarjs/prefer-read-only-props": "error", - "sonarjs/prefer-regexp-exec": "error", - "sonarjs/prefer-single-boolean-return": "error", - "sonarjs/prefer-type-guard": "error", - "sonarjs/prefer-while": "error", - "sonarjs/production-debug": "error", - "sonarjs/pseudo-random": "error", - "sonarjs/public-static-readonly": "error", - "sonarjs/publicly-writable-directories": "error", - "sonarjs/reduce-initial-value": "error", - "sonarjs/redundant-type-aliases": "error", - "sonarjs/regex-complexity": "error", - "sonarjs/review-blockchain-mnemonic": "error", - "sonarjs/session-regeneration": "error", - "sonarjs/single-char-in-character-classes": "error", - "sonarjs/single-character-alternation": "error", - "sonarjs/slow-regex": "error", - "sonarjs/sql-queries": "error", - "sonarjs/stable-tests": "error", - "sonarjs/stateful-regex": "error", - "sonarjs/strict-transport-security": "error", - "sonarjs/table-header": "error", - "sonarjs/table-header-reference": "error", - "sonarjs/test-check-exception": "error", - "sonarjs/todo-tag": "error", - "sonarjs/unused-import": "error", - "sonarjs/unused-named-groups": "error", - "sonarjs/unverified-certificate": "error", - "sonarjs/unverified-hostname": "error", - "sonarjs/updated-const-var": "error", - "sonarjs/updated-loop-counter": "error", - "sonarjs/use-type-alias": "error", - "sonarjs/void-use": "error", - "sonarjs/weak-ssl": "error", - "sonarjs/x-powered-by": "error", - "sonarjs/xml-parser-xxe": "error", - "unicorn/catch-error-name": "error", - "unicorn/consistent-date-clone": "error", - "unicorn/consistent-empty-array-spread": "error", - "unicorn/consistent-existence-index-check": "error", - "unicorn/custom-error-definition": "error", - "unicorn/error-message": "error", - "unicorn/escape-case": "error", - "unicorn/explicit-length-check": [ - "error", - { - "non-zero": "not-equal" - } - ], - "unicorn/new-for-builtins": "error", - "unicorn/no-abusive-eslint-disable": "error", - "unicorn/no-accessor-recursion": "error", - "unicorn/no-anonymous-default-export": "error", - "unicorn/no-array-method-this-argument": "error", - "unicorn/no-array-reverse": "error", - "unicorn/no-array-sort": "error", - "unicorn/no-await-in-promise-methods": "error", - "unicorn/no-console-spaces": "error", - "unicorn/no-document-cookie": "error", - "unicorn/no-empty-file": "error", - "unicorn/no-hex-escape": "error", - "unicorn/no-instanceof-builtins": "error", - "unicorn/no-invalid-fetch-options": "error", - "unicorn/no-invalid-remove-event-listener": "error", - "unicorn/no-lonely-if": "error", - "unicorn/no-magic-array-flat-depth": "error", - "unicorn/no-negated-condition": "error", - "unicorn/no-negation-in-equality-check": "error", - "unicorn/no-nested-ternary": "error", - "unicorn/no-new-array": "error", - "unicorn/no-new-buffer": "error", - "unicorn/no-null": "error", - "unicorn/no-object-as-default-parameter": "error", - "unicorn/no-process-exit": "error", - "unicorn/no-single-promise-in-promise-methods": "error", - "unicorn/no-static-only-class": "error", - "unicorn/no-thenable": "error", - "unicorn/no-this-assignment": "error", - "unicorn/no-typeof-undefined": "error", - "unicorn/no-unnecessary-array-flat-depth": "error", - "unicorn/no-unnecessary-array-splice-count": "error", - "unicorn/no-unnecessary-await": "error", - "unicorn/no-unnecessary-slice-end": "error", - "unicorn/no-unreadable-array-destructuring": "error", - "unicorn/no-unreadable-iife": "error", - "unicorn/no-useless-collection-argument": "error", - "unicorn/no-useless-error-capture-stack-trace": "error", - "unicorn/no-useless-fallback-in-spread": "error", - "unicorn/no-useless-length-check": "error", - "unicorn/no-useless-promise-resolve-reject": "error", - "unicorn/no-useless-spread": "error", - "unicorn/no-useless-switch-case": "error", - "unicorn/no-useless-undefined": "error", - "unicorn/no-zero-fractions": "error", - "unicorn/number-literal-case": "error", - "unicorn/numeric-separators-style": "error", - "unicorn/prefer-add-event-listener": "error", - "unicorn/prefer-array-find": "error", - "unicorn/prefer-array-flat": "error", - "unicorn/prefer-array-flat-map": "error", - "unicorn/prefer-array-index-of": "error", - "unicorn/prefer-array-some": "error", - "unicorn/prefer-at": "error", - "unicorn/prefer-bigint-literals": "error", - "unicorn/prefer-blob-reading-methods": "error", - "unicorn/prefer-class-fields": "error", - "unicorn/prefer-classlist-toggle": "error", - "unicorn/prefer-code-point": "error", - "unicorn/prefer-date-now": "error", - "unicorn/prefer-default-parameters": "error", - "unicorn/prefer-dom-node-append": "error", - "unicorn/prefer-dom-node-remove": "error", - "unicorn/prefer-dom-node-text-content": "error", - "unicorn/prefer-event-target": "error", - "unicorn/prefer-global-this": "error", - "unicorn/prefer-includes": "error", - "unicorn/prefer-keyboard-event-key": "error", - "unicorn/prefer-logical-operator-over-ternary": "error", - "unicorn/prefer-math-min-max": "error", - "unicorn/prefer-math-trunc": "error", - "unicorn/prefer-modern-dom-apis": "error", - "unicorn/prefer-modern-math-apis": "error", - "unicorn/prefer-module": "error", - "unicorn/prefer-native-coercion-functions": "error", - "unicorn/prefer-negative-index": "error", - "unicorn/prefer-node-protocol": "error", - "unicorn/prefer-number-properties": "error", - "unicorn/prefer-object-from-entries": "error", - "unicorn/prefer-optional-catch-binding": "error", - "unicorn/prefer-prototype-methods": "error", - "unicorn/prefer-reflect-apply": "error", - "unicorn/prefer-regexp-test": "error", - "unicorn/prefer-response-static-json": "error", - "unicorn/prefer-set-has": "error", - "unicorn/prefer-set-size": "error", - "unicorn/prefer-string-raw": "error", - "unicorn/prefer-string-replace-all": "error", - "unicorn/prefer-string-slice": "error", - "unicorn/prefer-string-starts-ends-with": "error", - "unicorn/prefer-string-trim-start-end": "error", - "unicorn/prefer-structured-clone": "error", - "unicorn/prefer-ternary": "error", - "unicorn/prefer-top-level-await": "error", - "unicorn/prefer-type-error": "error", - "unicorn/relative-url-style": "error", - "unicorn/require-array-join-separator": "error", - "unicorn/require-module-attributes": "error", - "unicorn/require-module-specifiers": "error", - "unicorn/require-number-to-fixed-digits-argument": "error", - "unicorn/text-encoding-identifier-case": "error", - "unicorn/throw-new-error": "error", - "use-isnan": "error", - "valid-typeof": "error", - "yoda": ["error", "never"] - } -} diff --git a/.zed/settings.json b/.zed/settings.json new file mode 100644 index 0000000..5b2186a --- /dev/null +++ b/.zed/settings.json @@ -0,0 +1,15 @@ +{ + "lsp": { + "oxlint": { + "initialization_options": { + "settings": { + "configPath": "cfg/oxlint.config.ts", + "run": "onType", + "disableNestedConfig": false, + "fixKind": "safe_fix", + "unusedDisableDirectives": "deny" + } + } + } + } +} diff --git a/bun.lock b/bun.lock index a10b341..1509432 100644 --- a/bun.lock +++ b/bun.lock @@ -5,37 +5,33 @@ "": { "name": "@gcch/configuration-oxlint", "dependencies": { + "eslint-plugin-astro": "^1.6.0", + "eslint-plugin-functional": "^9.0.4", + "eslint-plugin-jsx-a11y": "^6.10.2", + "eslint-plugin-perfectionist": "^5.8.0", "globals": "^17.4.0", - "oxlint": "^1.58.0", - "oxlint-tsgolint": "^0.19.0", + "oxlint": "^1.59.0", + "oxlint-tsgolint": "^0.20.0", }, "devDependencies": { "@arethetypeswrong/core": "^0.18.2", "@gcch/configuration-eslint": "git+https://git.gcch.fr/gcch/configuration-eslint#c0620280e6", "@gcch/configuration-prettier": "git+https://git.gcch.fr/gcch/configuration-prettier#91d4573bff", "@types/bun": "^1.3.11", - "@types/node": "^25.5.0", - "eslint-plugin-functional": "^9.0.4", - "eslint-plugin-jsx-a11y": "^6.10.2", - "eslint-plugin-perfectionist": "^5.7.0", - "eslint-plugin-sonarjs": "^4.0.2", - "knip": "^6.1.1", + "@types/node": "^25.5.2", + "knip": "^6.3.0", "prettier": "^3.8.1", "publint": "^0.3.18", "tsdown": "^0.21.7", "typescript": "^6.0.2", }, - "optionalDependencies": { - "eslint-plugin-astro": "^1.6.0", - }, "peerDependencies": { "eslint-plugin-astro": "^1.6.0", "eslint-plugin-functional": "^9.0.4", "eslint-plugin-jsx-a11y": "^6.10.2", - "eslint-plugin-perfectionist": "^5.7.0", - "eslint-plugin-sonarjs": "^4.0.2", - "oxlint": "^1.58.0", - "oxlint-tsgolint": "^0.19.0", + "eslint-plugin-perfectionist": "^5.8.0", + "oxlint": "^1.59.0", + "oxlint-tsgolint": "^0.20.0", "typescript": "^6.0.2", }, }, @@ -62,13 +58,13 @@ "@braidai/lang": ["@braidai/lang@1.1.2", "", {}, "sha512-qBcknbBufNHlui137Hft8xauQMTZDKdophmLFv05r2eNmdIv/MlPuP4TdUknHG68UdWLgVZwgxVe735HzJNIwA=="], - "@emnapi/core": ["@emnapi/core@1.9.1", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.0", "tslib": "^2.4.0" } }, "sha512-mukuNALVsoix/w1BJwFzwXBN/dHeejQtuVzcDsfOEsdpCumXb/E9j8w11h5S54tT1xhifGfbbSm/ICrObRb3KA=="], + "@emnapi/core": ["@emnapi/core@1.9.2", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" } }, "sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA=="], - "@emnapi/runtime": ["@emnapi/runtime@1.9.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-VYi5+ZVLhpgK4hQ0TAjiQiZ6ol0oe4mBx7mVv7IflsiEp0OWoVsp/+f9Vc1hOhE0TtkORVrI1GvzyreqpgWtkA=="], + "@emnapi/runtime": ["@emnapi/runtime@1.9.2", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-3U4+MIWHImeyu1wnmVygh5WlgfYDtyf0k8AbLhMFxOipihf6nrWC4syIm/SwEeec0mNSafiiNnMJwbza/Is6Lw=="], - "@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.0", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-N10dEJNSsUx41Z6pZsXU8FjPjpBEplgH24sfkmITrBED1/U2Esum9F3lfLrMjKHHjmi557zQn7kR9R+XWXu5Rg=="], + "@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w=="], - "@es-joy/jsdoccomment": ["@es-joy/jsdoccomment@0.84.0", "", { "dependencies": { "@types/estree": "^1.0.8", "@typescript-eslint/types": "^8.54.0", "comment-parser": "1.4.5", "esquery": "^1.7.0", "jsdoc-type-pratt-parser": "~7.1.1" } }, "sha512-0xew1CxOam0gV5OMjh2KjFQZsKL2bByX1+q4j3E73MpYIdyUxcZb/xQct9ccUb+ve5KGUYbCUxyPnYB7RbuP+w=="], + "@es-joy/jsdoccomment": ["@es-joy/jsdoccomment@0.86.0", "", { "dependencies": { "@types/estree": "^1.0.8", "@typescript-eslint/types": "^8.58.0", "comment-parser": "1.4.6", "esquery": "^1.7.0", "jsdoc-type-pratt-parser": "~7.2.0" } }, "sha512-ukZmRQ81WiTpDWO6D/cTBM7XbrNtutHKvAVnZN/8pldAwLoJArGOvkNyxPTBGsPjsoaQBJxlH+tE2TNA/92Qgw=="], "@es-joy/resolve.exports": ["@es-joy/resolve.exports@1.2.0", "", {}, "sha512-Q9hjxWI5xBM+qW2enxfe8wDKdFWMfd0Z29k5ZJnuBqD/CasY5Zryj09aCA6owbGATWz+39p5uIdaHXpopOcG8g=="], @@ -76,17 +72,17 @@ "@eslint-community/regexpp": ["@eslint-community/regexpp@4.12.2", "", {}, "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew=="], - "@eslint/config-array": ["@eslint/config-array@0.23.3", "", { "dependencies": { "@eslint/object-schema": "^3.0.3", "debug": "^4.3.1", "minimatch": "^10.2.4" } }, "sha512-j+eEWmB6YYLwcNOdlwQ6L2OsptI/LO6lNBuLIqe5R7RetD658HLoF+Mn7LzYmAWWNNzdC6cqP+L6r8ujeYXWLw=="], + "@eslint/config-array": ["@eslint/config-array@0.23.4", "", { "dependencies": { "@eslint/object-schema": "^3.0.4", "debug": "^4.3.1", "minimatch": "^10.2.4" } }, "sha512-lf19F24LSMfF8weXvW5QEtnLqW70u7kgit5e9PSx0MsHAFclGd1T9ynvWEMDT1w5J4Qt54tomGeAhdoAku1Xow=="], - "@eslint/config-helpers": ["@eslint/config-helpers@0.5.3", "", { "dependencies": { "@eslint/core": "^1.1.1" } }, "sha512-lzGN0onllOZCGroKJmRwY6QcEHxbjBw1gwB8SgRSqK8YbbtEXMvKynsXc3553ckIEBxsbMBU7oOZXKIPGZNeZw=="], + "@eslint/config-helpers": ["@eslint/config-helpers@0.5.4", "", { "dependencies": { "@eslint/core": "^1.2.0" } }, "sha512-jJhqiY3wPMlWWO3370M86CPJ7pt8GmEwSLglMfQhjXal07RCvhmU0as4IuUEW5SJeunfItiEetHmSxCCe9lDBg=="], - "@eslint/core": ["@eslint/core@1.1.1", "", { "dependencies": { "@types/json-schema": "^7.0.15" } }, "sha512-QUPblTtE51/7/Zhfv8BDwO0qkkzQL7P/aWWbqcf4xWLEYn1oKjdO0gglQBB4GAsu7u6wjijbCmzsUTy6mnk6oQ=="], + "@eslint/core": ["@eslint/core@1.2.0", "", { "dependencies": { "@types/json-schema": "^7.0.15" } }, "sha512-8FTGbNzTvmSlc4cZBaShkC6YvFMG0riksYWRFKXztqVdXaQbcZLXlFbSpC05s70sGEsXAw0qwhx69JiW7hQS7A=="], "@eslint/js": ["@eslint/js@10.0.1", "", { "peerDependencies": { "eslint": "^10.0.0" }, "optionalPeers": ["eslint"] }, "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA=="], - "@eslint/object-schema": ["@eslint/object-schema@3.0.3", "", {}, "sha512-iM869Pugn9Nsxbh/YHRqYiqd23AmIbxJOcpUMOuWCVNdoQJ5ZtwL6h3t0bcZzJUlC3Dq9jCFCESBZnX0GTv7iQ=="], + "@eslint/object-schema": ["@eslint/object-schema@3.0.4", "", {}, "sha512-55lO/7+Yp0ISKRP0PsPtNTeNGapXaO085aELZmWCVc5SH3jfrqpuU6YgOdIxMS99ZHkQN1cXKE+cdIqwww9ptw=="], - "@eslint/plugin-kit": ["@eslint/plugin-kit@0.6.1", "", { "dependencies": { "@eslint/core": "^1.1.1", "levn": "^0.4.1" } }, "sha512-iH1B076HoAshH1mLpHMgwdGeTs0CYwL0SPMkGuSebZrwBp16v415e9NZXg2jtrqPVQjf6IANe2Vtlr5KswtcZQ=="], + "@eslint/plugin-kit": ["@eslint/plugin-kit@0.7.0", "", { "dependencies": { "@eslint/core": "^1.2.0", "levn": "^0.4.1" } }, "sha512-ejvBr8MQCbVsWNZnCwDXjUKq40MDmHalq7cJ6e9s/qzTUFIIo/afzt1Vui9T97FM/V/pN4YsFVoed5NIa96RDg=="], "@gcch/configuration-eslint": ["@gcch/configuration-eslint@git+https://git.gcch.fr/gcch/configuration-eslint#c0620280e62a390efea7a350f3eb6a9fd3ba1d4e", { "dependencies": { "@eslint/js": "^10.0.1", "astro-eslint-parser": "^1.4.0", "eslint": "^10.1.0", "eslint-plugin-functional": "^9.0.4", "eslint-plugin-jsdoc": "^62.8.1", "eslint-plugin-perfectionist": "^5.7.0", "eslint-plugin-sonarjs": "^4.0.2", "eslint-plugin-unicorn": "^64.0.0", "globals": "^17.4.0", "typescript-eslint": "^8.57.2" }, "optionalDependencies": { "eslint-plugin-astro": "^1.6.0", "eslint-plugin-jsx-a11y": "^6.10.2" }, "peerDependencies": { "eslint": "^10.1.0", "typescript": "^6.0.2" } }, "c0620280e62a390efea7a350f3eb6a9fd3ba1d4e"], @@ -200,55 +196,55 @@ "@oxc-resolver/binding-win32-x64-msvc": ["@oxc-resolver/binding-win32-x64-msvc@11.19.1", "", { "os": "win32", "cpu": "x64" }, "sha512-6hIU3RQu45B+VNTY4Ru8ppFwjVS/S5qwYyGhBotmjxfEKk41I2DlGtRfGJndZ5+6lneE2pwloqunlOyZuX/XAw=="], - "@oxlint-tsgolint/darwin-arm64": ["@oxlint-tsgolint/darwin-arm64@0.19.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-FVOIp5Njte8Z6PpINz7sL5blqSro0pAL8VAHYQ+K5Xm4cOrPQ6DGIhH14oXnbRjzn8Kl69qjz8TPteyn8EqwsQ=="], + "@oxlint-tsgolint/darwin-arm64": ["@oxlint-tsgolint/darwin-arm64@0.20.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-KKQcIHZHMxqpHUA1VXIbOG6chNCFkUWbQy6M+AFVtPKkA/3xAeJkJ3njoV66bfzwPHRcWQO+kcj5XqtbkjakoA=="], - "@oxlint-tsgolint/darwin-x64": ["@oxlint-tsgolint/darwin-x64@0.19.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-GakDTDACePvqOFq3N4oQCl8SyMMa7VBnqV0gDcXPuK50jdWCUqlxM9tgRJarjyIVvmDEJRGYOen+4uBtVwg4Aw=="], + "@oxlint-tsgolint/darwin-x64": ["@oxlint-tsgolint/darwin-x64@0.20.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-7HeVMuclGfG+NLZi2ybY0T4fMI7/XxO/208rJk+zEIloKkVnlh11Wd241JMGwgNFXn+MLJbOqOfojDb2Dt4L1g=="], - "@oxlint-tsgolint/linux-arm64": ["@oxlint-tsgolint/linux-arm64@0.19.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-Ya0R7somo+KDhhkPtENJ9Q28Fost+aqA3MPe86pEqgmukHFc/KO65PgShOSbIFjZNptELEQvsWL8gDxYZWhH3w=="], + "@oxlint-tsgolint/linux-arm64": ["@oxlint-tsgolint/linux-arm64@0.20.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-zxhUwz+WSxE6oWlZLK2z2ps9yC6ebmgoYmjAl0Oa48+GqkZ56NVgo+wb8DURNv6xrggzHStQxqQxe3mK51HZag=="], - "@oxlint-tsgolint/linux-x64": ["@oxlint-tsgolint/linux-x64@0.19.0", "", { "os": "linux", "cpu": "x64" }, "sha512-yFH378jWc1k/oJmpk+TKpWbKvFieJJvsOHxVMSNFc+ukqs44ZSHVt4HFfAhXAt/bzVK2f7EIDTGp8Hm1OjoJ6Q=="], + "@oxlint-tsgolint/linux-x64": ["@oxlint-tsgolint/linux-x64@0.20.0", "", { "os": "linux", "cpu": "x64" }, "sha512-/1l6FnahC9im8PK+Ekkx/V3yetO/PzZnJegE2FXcv/iXEhbeVxP/ouiTYcUQu9shT1FWJCSNti1VJHH+21Y1dg=="], - "@oxlint-tsgolint/win32-arm64": ["@oxlint-tsgolint/win32-arm64@0.19.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-R6NyAtha7OWxh7NGBeFxqDTGAVl1Xj4xLa8Qj39PKbIDqBeVW8BIb+1nEnRp+Mo/VpRoeoFAcqlBsuMcUMd26Q=="], + "@oxlint-tsgolint/win32-arm64": ["@oxlint-tsgolint/win32-arm64@0.20.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-oPZ5Yz8sVdo7P/5q+i3IKeix31eFZ55JAPa1+RGPoe9PoaYVsdMvR6Jvib6YtrqoJnFPlg3fjEjlEPL8VBKYJA=="], - "@oxlint-tsgolint/win32-x64": ["@oxlint-tsgolint/win32-x64@0.19.0", "", { "os": "win32", "cpu": "x64" }, "sha512-2ePvxcbS5tPOmrQvxR8Kc+IqzdTtlrGeMDv+jjTYfkTFPmh2rF9yxVchi/4WM6js3gt2UauQeMV/tfnZNemENQ=="], + "@oxlint-tsgolint/win32-x64": ["@oxlint-tsgolint/win32-x64@0.20.0", "", { "os": "win32", "cpu": "x64" }, "sha512-4stx8RHj3SP9vQyRF/yZbz5igtPvYMEUR8CUoha4BVNZihi39DpCR8qkU7lpjB5Ga1DRMo2pHaA4bdTOMaY4mw=="], - "@oxlint/binding-android-arm-eabi": ["@oxlint/binding-android-arm-eabi@1.58.0", "", { "os": "android", "cpu": "arm" }, "sha512-1T7UN3SsWWxpWyWGn1cT3ASNJOo+pI3eUkmEl7HgtowapcV8kslYpFQcYn431VuxghXakPNlbjRwhqmR37PFOg=="], + "@oxlint/binding-android-arm-eabi": ["@oxlint/binding-android-arm-eabi@1.59.0", "", { "os": "android", "cpu": "arm" }, "sha512-etYDw/UaEv936AQUd/CRMBVd+e+XuuU6wC+VzOv1STvsTyZenLChepLWqLtnyTTp4YMlM22ypzogDDwqYxv5cg=="], - "@oxlint/binding-android-arm64": ["@oxlint/binding-android-arm64@1.58.0", "", { "os": "android", "cpu": "arm64" }, "sha512-GryzujxuiRv2YFF7bRy8mKcxlbuAN+euVUtGJt9KKbLT8JBUIosamVhcthLh+VEr6KE6cjeVMAQxKAzJcoN7dg=="], + "@oxlint/binding-android-arm64": ["@oxlint/binding-android-arm64@1.59.0", "", { "os": "android", "cpu": "arm64" }, "sha512-TgLc7XVLKH2a4h8j3vn1MDjfK33i9MY60f/bKhRGWyVzbk5LCZ4X01VZG7iHrMmi5vYbAp8//Ponigx03CLsdw=="], - "@oxlint/binding-darwin-arm64": ["@oxlint/binding-darwin-arm64@1.58.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-7/bRSJIwl4GxeZL9rPZ11anNTyUO9epZrfEJH/ZMla3+/gbQ6xZixh9nOhsZ0QwsTW7/5J2A/fHbD1udC5DQQA=="], + "@oxlint/binding-darwin-arm64": ["@oxlint/binding-darwin-arm64@1.59.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-DXyFPf5ZKldMLloRHx/B9fsxsiTQomaw7cmEW3YIJko2HgCh+GUhp9gGYwHrqlLJPsEe3dYj9JebjX92D3j3AA=="], - "@oxlint/binding-darwin-x64": ["@oxlint/binding-darwin-x64@1.58.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-EqdtJSiHweS2vfILNrpyJ6HUwpEq2g7+4Zx1FPi4hu3Hu7tC3znF6ufbXO8Ub2LD4mGgznjI7kSdku9NDD1Mkg=="], + "@oxlint/binding-darwin-x64": ["@oxlint/binding-darwin-x64@1.59.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-LgvrsdgVLX1qWqIEmNsSmMXJhpAWdtUQ0M+oR0CySwi+9IHWyOGuIL8w8+u/kbZNMyZr4WUyYB5i0+D+AKgkLg=="], - "@oxlint/binding-freebsd-x64": ["@oxlint/binding-freebsd-x64@1.58.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-VQt5TH4M42mY20F545G637RKxV/yjwVtKk2vfXuazfReSIiuvWBnv+FVSvIV5fKVTJNjt3GSJibh6JecbhGdBw=="], + "@oxlint/binding-freebsd-x64": ["@oxlint/binding-freebsd-x64@1.59.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-bOJhqX/ny4hrFuTPlyk8foSRx/vLRpxJh0jOOKN2NWW6FScXHPAA5rQbrwdQPcgGB5V8Ua51RS03fke8ssBcug=="], - "@oxlint/binding-linux-arm-gnueabihf": ["@oxlint/binding-linux-arm-gnueabihf@1.58.0", "", { "os": "linux", "cpu": "arm" }, "sha512-fBYcj4ucwpAtjJT3oeBdFBYKvNyjRSK+cyuvBOTQjh0jvKp4yeA4S/D0IsCHus/VPaNG5L48qQkh+Vjy3HL2/Q=="], + "@oxlint/binding-linux-arm-gnueabihf": ["@oxlint/binding-linux-arm-gnueabihf@1.59.0", "", { "os": "linux", "cpu": "arm" }, "sha512-vVUXxYMF9trXCsz4m9H6U0IjehosVHxBzVgJUxly1uz4W1PdDyicaBnpC0KRXsHYretLVe+uS9pJy8iM57Kujw=="], - "@oxlint/binding-linux-arm-musleabihf": ["@oxlint/binding-linux-arm-musleabihf@1.58.0", "", { "os": "linux", "cpu": "arm" }, "sha512-0BeuFfwlUHlJ1xpEdSD1YO3vByEFGPg36uLjK1JgFaxFb4W6w17F8ET8sz5cheZ4+x5f2xzdnRrrWv83E3Yd8g=="], + "@oxlint/binding-linux-arm-musleabihf": ["@oxlint/binding-linux-arm-musleabihf@1.59.0", "", { "os": "linux", "cpu": "arm" }, "sha512-TULQW8YBPGRWg5yZpFPL54HLOnJ3/HiX6VenDPi6YfxB/jlItwSMFh3/hCeSNbh+DAMaE1Py0j5MOaivHkI/9Q=="], - "@oxlint/binding-linux-arm64-gnu": ["@oxlint/binding-linux-arm64-gnu@1.58.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-TXlZgnPTlxrQzxG9ZXU7BNwx1Ilrr17P3GwZY0If2EzrinqRH3zXPc3HrRcBJgcsoZNMuNL5YivtkJYgp467UQ=="], + "@oxlint/binding-linux-arm64-gnu": ["@oxlint/binding-linux-arm64-gnu@1.59.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-Gt54Y4eqSgYJ90xipm24xeyaPV854706o/kiT8oZvUt3VDY7qqxdqyGqchMaujd87ib+/MXvnl9WkK8Cc1BExg=="], - "@oxlint/binding-linux-arm64-musl": ["@oxlint/binding-linux-arm64-musl@1.58.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-zSoYRo5dxHLcUx93Stl2hW3hSNjPt99O70eRVWt5A1zwJ+FPjeCCANCD2a9R4JbHsdcl11TIQOjyigcRVOH2mw=="], + "@oxlint/binding-linux-arm64-musl": ["@oxlint/binding-linux-arm64-musl@1.59.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-3CtsKp7NFB3OfqQzbuAecrY7GIZeiv7AD+xutU4tefVQzlfmTI7/ygWLrvkzsDEjTlMq41rYHxgsn6Yh8tybmA=="], - "@oxlint/binding-linux-ppc64-gnu": ["@oxlint/binding-linux-ppc64-gnu@1.58.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-NQ0U/lqxH2/VxBYeAIvMNUK1y0a1bJ3ZicqkF2c6wfakbEciP9jvIE4yNzCFpZaqeIeRYaV7AVGqEO1yrfVPjA=="], + "@oxlint/binding-linux-ppc64-gnu": ["@oxlint/binding-linux-ppc64-gnu@1.59.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-K0diOpT3ncDmOfl9I1HuvpEsAuTxkts0VYwIv/w6Xiy9CdwyPBVX88Ga9l8VlGgMrwBMnSY4xIvVlVY/fkQk7Q=="], - "@oxlint/binding-linux-riscv64-gnu": ["@oxlint/binding-linux-riscv64-gnu@1.58.0", "", { "os": "linux", "cpu": "none" }, "sha512-X9J+kr3gIC9FT8GuZt0ekzpNUtkBVzMVU4KiKDSlocyQuEgi3gBbXYN8UkQiV77FTusLDPsovjo95YedHr+3yg=="], + "@oxlint/binding-linux-riscv64-gnu": ["@oxlint/binding-linux-riscv64-gnu@1.59.0", "", { "os": "linux", "cpu": "none" }, "sha512-xAU7+QDU6kTJJ7mJLOGgo7oOjtAtkKyFZ0Yjdb5cEo3DiCCPFLvyr08rWiQh6evZ7RiUTf+o65NY/bqttzJiQQ=="], - "@oxlint/binding-linux-riscv64-musl": ["@oxlint/binding-linux-riscv64-musl@1.58.0", "", { "os": "linux", "cpu": "none" }, "sha512-CDze3pi1OO3Wvb/QsXjmLEY4XPKGM6kIo82ssNOgmcl1IdndF9VSGAE38YLhADWmOac7fjqhBw82LozuUVxD0Q=="], + "@oxlint/binding-linux-riscv64-musl": ["@oxlint/binding-linux-riscv64-musl@1.59.0", "", { "os": "linux", "cpu": "none" }, "sha512-KUmZmKlTTyauOnvUNVxK7G40sSSx0+w5l1UhaGsC6KPpOYHenx2oqJTnabmpLJicok7IC+3Y6fXAUOMyexaeJQ=="], - "@oxlint/binding-linux-s390x-gnu": ["@oxlint/binding-linux-s390x-gnu@1.58.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-b/89glbxFaEAcA6Uf1FvCNecBJEgcUTsV1quzrqXM/o4R1M4u+2KCVuyGCayN2UpsRWtGGLb+Ver0tBBpxaPog=="], + "@oxlint/binding-linux-s390x-gnu": ["@oxlint/binding-linux-s390x-gnu@1.59.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-4usRxC8gS0PGdkHnRmwJt/4zrQNZyk6vL0trCxwZSsAKM+OxhB8nKiR+mhjdBbl8lbMh2gc3bZpNN/ik8c4c2A=="], - "@oxlint/binding-linux-x64-gnu": ["@oxlint/binding-linux-x64-gnu@1.58.0", "", { "os": "linux", "cpu": "x64" }, "sha512-0/yYpkq9VJFCEcuRlrViGj8pJUFFvNS4EkEREaN7CB1EcLXJIaVSSa5eCihwBGXtOZxhnblWgxks9juRdNQI7w=="], + "@oxlint/binding-linux-x64-gnu": ["@oxlint/binding-linux-x64-gnu@1.59.0", "", { "os": "linux", "cpu": "x64" }, "sha512-s/rNE2gDmbwAOOP493xk2X7M8LZfI1LJFSSW1+yanz3vuQCFPiHkx4GY+O1HuLUDtkzGlhtMrIcxxzyYLv308w=="], - "@oxlint/binding-linux-x64-musl": ["@oxlint/binding-linux-x64-musl@1.58.0", "", { "os": "linux", "cpu": "x64" }, "sha512-hr6FNvmcAXiH+JxSvaJ4SJ1HofkdqEElXICW9sm3/Rd5eC3t7kzvmLyRAB3NngKO2wzXRCAm4Z/mGWfrsS4X8w=="], + "@oxlint/binding-linux-x64-musl": ["@oxlint/binding-linux-x64-musl@1.59.0", "", { "os": "linux", "cpu": "x64" }, "sha512-+yYj1udJa2UvvIUmEm0IcKgc0UlPMgz0nsSTvkPL2y6n0uU5LgIHSwVu4AHhrve6j9BpVSoRksnz8c9QcvITJA=="], - "@oxlint/binding-openharmony-arm64": ["@oxlint/binding-openharmony-arm64@1.58.0", "", { "os": "none", "cpu": "arm64" }, "sha512-R+O368VXgRql1K6Xar+FEo7NEwfo13EibPMoTv3sesYQedRXd6m30Dh/7lZMxnrQVFfeo4EOfYIP4FpcgWQNHg=="], + "@oxlint/binding-openharmony-arm64": ["@oxlint/binding-openharmony-arm64@1.59.0", "", { "os": "none", "cpu": "arm64" }, "sha512-bUplUb48LYsB3hHlQXP2ZMOenpieWoOyppLAnnAhuPag3MGPnt+7caxE3w/Vl9wpQsTA3gzLntQi9rxWrs7Xqg=="], - "@oxlint/binding-win32-arm64-msvc": ["@oxlint/binding-win32-arm64-msvc@1.58.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-Q0FZiAY/3c4YRj4z3h9K1PgaByrifrfbBoODSeX7gy97UtB7pySPUQfC2B/GbxWU6k7CzQrRy5gME10PltLAFQ=="], + "@oxlint/binding-win32-arm64-msvc": ["@oxlint/binding-win32-arm64-msvc@1.59.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-/HLsLuz42rWl7h7ePdmMTpHm2HIDmPtcEMYgm5BBEHiEiuNOrzMaUpd2z7UnNni5LGN9obJy2YoAYBLXQwazrA=="], - "@oxlint/binding-win32-ia32-msvc": ["@oxlint/binding-win32-ia32-msvc@1.58.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-Y8FKBABrSPp9H0QkRLHDHOSUgM/309a3IvOVgPcVxYcX70wxJrk608CuTg7w+C6vEd724X5wJoNkBcGYfH7nNQ=="], + "@oxlint/binding-win32-ia32-msvc": ["@oxlint/binding-win32-ia32-msvc@1.59.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-rUPy+JnanpPwV/aJCPnxAD1fW50+XPI0VkWr7f0vEbqcdsS8NpB24Rw6RsS7SdpFv8Dw+8ugCwao5nCFbqOUSg=="], - "@oxlint/binding-win32-x64-msvc": ["@oxlint/binding-win32-x64-msvc@1.58.0", "", { "os": "win32", "cpu": "x64" }, "sha512-bCn5rbiz5My+Bj7M09sDcnqW0QJyINRVxdZ65x1/Y2tGrMwherwK/lpk+HRQCKvXa8pcaQdF5KY5j54VGZLwNg=="], + "@oxlint/binding-win32-x64-msvc": ["@oxlint/binding-win32-x64-msvc@1.59.0", "", { "os": "win32", "cpu": "x64" }, "sha512-xkE7puteDS/vUyRngLXW0t8WgdWoS/tfxXjhP/P7SMqPDx+hs44SpssO3h3qmTqECYEuXBUPzcAw5257Ka+ofA=="], "@pkgr/core": ["@pkgr/core@0.2.9", "", {}, "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA=="], @@ -260,7 +256,7 @@ "@quansync/fs": ["@quansync/fs@1.0.0", "", { "dependencies": { "quansync": "^1.0.0" } }, "sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ=="], - "@reteps/dockerfmt": ["@reteps/dockerfmt@0.3.6", "", {}, "sha512-Tb5wIMvBf/nLejTQ61krK644/CEMB/cpiaIFXqGApfGqO3GwcR3qnI0DbmkFVCl2OyEp8LnLX3EkucoL0+tbFg=="], + "@reteps/dockerfmt": ["@reteps/dockerfmt@0.5.2", "", {}, "sha512-Hbr7yen4fP5TxGM54ucXa4o5NwWXatJ6Bd9I8gp0PValYbI4Rug2Gu+rVv7K7o/efQc3F5ctqWJz47rYaa8zBw=="], "@rolldown/binding-android-arm64": ["@rolldown/binding-android-arm64@1.0.0-rc.12", "", { "os": "android", "cpu": "arm64" }, "sha512-pv1y2Fv0JybcykuiiD3qBOBdz6RteYojRFY1d+b95WVuzx211CRh+ytI/+9iVyWQ6koTh5dawe4S/yRfOFjgaA=="], @@ -314,29 +310,29 @@ "@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="], - "@types/node": ["@types/node@25.5.0", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw=="], + "@types/node": ["@types/node@25.5.2", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-tO4ZIRKNC+MDWV4qKVZe3Ql/woTnmHDr5JD8UI5hn2pwBrHEwOEMZK7WlNb5RKB6EoJ02gwmQS9OrjuFnZYdpg=="], "@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="], - "@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.57.2", "", { "dependencies": { "@eslint-community/regexpp": "^4.12.2", "@typescript-eslint/scope-manager": "8.57.2", "@typescript-eslint/type-utils": "8.57.2", "@typescript-eslint/utils": "8.57.2", "@typescript-eslint/visitor-keys": "8.57.2", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.4.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.57.2", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-NZZgp0Fm2IkD+La5PR81sd+g+8oS6JwJje+aRWsDocxHkjyRw0J5L5ZTlN3LI1LlOcGL7ph3eaIUmTXMIjLk0w=="], + "@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.58.0", "", { "dependencies": { "@eslint-community/regexpp": "^4.12.2", "@typescript-eslint/scope-manager": "8.58.0", "@typescript-eslint/type-utils": "8.58.0", "@typescript-eslint/utils": "8.58.0", "@typescript-eslint/visitor-keys": "8.58.0", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.58.0", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-RLkVSiNuUP1C2ROIWfqX+YcUfLaSnxGE/8M+Y57lopVwg9VTYYfhuz15Yf1IzCKgZj6/rIbYTmJCUSqr76r0Wg=="], - "@typescript-eslint/parser": ["@typescript-eslint/parser@8.57.2", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.57.2", "@typescript-eslint/types": "8.57.2", "@typescript-eslint/typescript-estree": "8.57.2", "@typescript-eslint/visitor-keys": "8.57.2", "debug": "^4.4.3" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-30ScMRHIAD33JJQkgfGW1t8CURZtjc2JpTrq5n2HFhOefbAhb7ucc7xJwdWcrEtqUIYJ73Nybpsggii6GtAHjA=="], + "@typescript-eslint/parser": ["@typescript-eslint/parser@8.58.0", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.58.0", "@typescript-eslint/types": "8.58.0", "@typescript-eslint/typescript-estree": "8.58.0", "@typescript-eslint/visitor-keys": "8.58.0", "debug": "^4.4.3" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-rLoGZIf9afaRBYsPUMtvkDWykwXwUPL60HebR4JgTI8mxfFe2cQTu3AGitANp4b9B2QlVru6WzjgB2IzJKiCSA=="], - "@typescript-eslint/project-service": ["@typescript-eslint/project-service@8.57.2", "", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.57.2", "@typescript-eslint/types": "^8.57.2", "debug": "^4.4.3" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-FuH0wipFywXRTHf+bTTjNyuNQQsQC3qh/dYzaM4I4W0jrCqjCVuUh99+xd9KamUfmCGPvbO8NDngo/vsnNVqgw=="], + "@typescript-eslint/project-service": ["@typescript-eslint/project-service@8.58.0", "", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.58.0", "@typescript-eslint/types": "^8.58.0", "debug": "^4.4.3" }, "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-8Q/wBPWLQP1j16NxoPNIKpDZFMaxl7yWIoqXWYeWO+Bbd2mjgvoF0dxP2jKZg5+x49rgKdf7Ck473M8PC3V9lg=="], - "@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.57.2", "", { "dependencies": { "@typescript-eslint/types": "8.57.2", "@typescript-eslint/visitor-keys": "8.57.2" } }, "sha512-snZKH+W4WbWkrBqj4gUNRIGb/jipDW3qMqVJ4C9rzdFc+wLwruxk+2a5D+uoFcKPAqyqEnSb4l2ULuZf95eSkw=="], + "@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.58.0", "", { "dependencies": { "@typescript-eslint/types": "8.58.0", "@typescript-eslint/visitor-keys": "8.58.0" } }, "sha512-W1Lur1oF50FxSnNdGp3Vs6P+yBRSmZiw4IIjEeYxd8UQJwhUF0gDgDD/W/Tgmh73mxgEU3qX0Bzdl/NGuSPEpQ=="], - "@typescript-eslint/tsconfig-utils": ["@typescript-eslint/tsconfig-utils@8.57.2", "", { "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-3Lm5DSM+DCowsUOJC+YqHHnKEfFh5CoGkj5Z31NQSNF4l5wdOwqGn99wmwN/LImhfY3KJnmordBq/4+VDe2eKw=="], + "@typescript-eslint/tsconfig-utils": ["@typescript-eslint/tsconfig-utils@8.58.0", "", { "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-doNSZEVJsWEu4htiVC+PR6NpM+pa+a4ClH9INRWOWCUzMst/VA9c4gXq92F8GUD1rwhNvRLkgjfYtFXegXQF7A=="], - "@typescript-eslint/type-utils": ["@typescript-eslint/type-utils@8.57.2", "", { "dependencies": { "@typescript-eslint/types": "8.57.2", "@typescript-eslint/typescript-estree": "8.57.2", "@typescript-eslint/utils": "8.57.2", "debug": "^4.4.3", "ts-api-utils": "^2.4.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-Co6ZCShm6kIbAM/s+oYVpKFfW7LBc6FXoPXjTRQ449PPNBY8U0KZXuevz5IFuuUj2H9ss40atTaf9dlGLzbWZg=="], + "@typescript-eslint/type-utils": ["@typescript-eslint/type-utils@8.58.0", "", { "dependencies": { "@typescript-eslint/types": "8.58.0", "@typescript-eslint/typescript-estree": "8.58.0", "@typescript-eslint/utils": "8.58.0", "debug": "^4.4.3", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-aGsCQImkDIqMyx1u4PrVlbi/krmDsQUs4zAcCV6M7yPcPev+RqVlndsJy9kJ8TLihW9TZ0kbDAzctpLn5o+lOg=="], - "@typescript-eslint/types": ["@typescript-eslint/types@8.57.2", "", {}, "sha512-/iZM6FnM4tnx9csuTxspMW4BOSegshwX5oBDznJ7S4WggL7Vczz5d2W11ecc4vRrQMQHXRSxzrCsyG5EsPPTbA=="], + "@typescript-eslint/types": ["@typescript-eslint/types@8.58.0", "", {}, "sha512-O9CjxypDT89fbHxRfETNoAnHj/i6IpRK0CvbVN3qibxlLdo5p5hcLmUuCCrHMpxiWSwKyI8mCP7qRNYuOJ0Uww=="], - "@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.57.2", "", { "dependencies": { "@typescript-eslint/project-service": "8.57.2", "@typescript-eslint/tsconfig-utils": "8.57.2", "@typescript-eslint/types": "8.57.2", "@typescript-eslint/visitor-keys": "8.57.2", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", "tinyglobby": "^0.2.15", "ts-api-utils": "^2.4.0" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-2MKM+I6g8tJxfSmFKOnHv2t8Sk3T6rF20A1Puk0svLK+uVapDZB/4pfAeB7nE83uAZrU6OxW+HmOd5wHVdXwXA=="], + "@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.58.0", "", { "dependencies": { "@typescript-eslint/project-service": "8.58.0", "@typescript-eslint/tsconfig-utils": "8.58.0", "@typescript-eslint/types": "8.58.0", "@typescript-eslint/visitor-keys": "8.58.0", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", "tinyglobby": "^0.2.15", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-7vv5UWbHqew/dvs+D3e1RvLv1v2eeZ9txRHPnEEBUgSNLx5ghdzjHa0sgLWYVKssH+lYmV0JaWdoubo0ncGYLA=="], - "@typescript-eslint/utils": ["@typescript-eslint/utils@8.57.2", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", "@typescript-eslint/scope-manager": "8.57.2", "@typescript-eslint/types": "8.57.2", "@typescript-eslint/typescript-estree": "8.57.2" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-krRIbvPK1ju1WBKIefiX+bngPs+odIQUtR7kymzPfo1POVw3jlF+nLkmexdSSd4UCbDcQn+wMBATOOmpBbqgKg=="], + "@typescript-eslint/utils": ["@typescript-eslint/utils@8.58.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", "@typescript-eslint/scope-manager": "8.58.0", "@typescript-eslint/types": "8.58.0", "@typescript-eslint/typescript-estree": "8.58.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-RfeSqcFeHMHlAWzt4TBjWOAtoW9lnsAGiP3GbaX9uVgTYYrMbVnGONEfUCiSss+xMHFl+eHZiipmA8WkQ7FuNA=="], - "@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.57.2", "", { "dependencies": { "@typescript-eslint/types": "8.57.2", "eslint-visitor-keys": "^5.0.0" } }, "sha512-zhahknjobV2FiD6Ee9iLbS7OV9zi10rG26odsQdfBO/hjSzUQbkIYgda+iNKK1zNiW2ey+Lf8MU5btN17V3dUw=="], + "@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.58.0", "", { "dependencies": { "@typescript-eslint/types": "8.58.0", "eslint-visitor-keys": "^5.0.0" } }, "sha512-XJ9UD9+bbDo4a4epraTwG3TsNPeiB9aShrUneAVXy8q4LuwowN+qu89/6ByLMINqvIMeI9H9hOHQtg/ijrYXzQ=="], "@xml-tools/parser": ["@xml-tools/parser@1.0.11", "", { "dependencies": { "chevrotain": "7.1.1" } }, "sha512-aKqQ077XnR+oQtHJlrAflaZaL7qZsulWc/i/ZEooar5JiWj1eLt0+Wg28cpa+XLney107wXqneC+oG1IZvxkTA=="], @@ -374,13 +370,13 @@ "available-typed-arrays": ["available-typed-arrays@1.0.7", "", { "dependencies": { "possible-typed-array-names": "^1.0.0" } }, "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ=="], - "axe-core": ["axe-core@4.11.1", "", {}, "sha512-BASOg+YwO2C+346x3LZOeoovTIoTrRqEsqMa6fmfAV0P+U9mFr9NsyOEpiYvFjbc64NMrSswhV50WdXzdb/Z5A=="], + "axe-core": ["axe-core@4.11.2", "", {}, "sha512-byD6KPdvo72y/wj2T/4zGEvvlis+PsZsn/yPS3pEO+sFpcrqRpX/TJCxvVaEsNeMrfQbCr7w163YqoD9IYwHXw=="], "axobject-query": ["axobject-query@4.1.0", "", {}, "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ=="], "balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], - "baseline-browser-mapping": ["baseline-browser-mapping@2.10.12", "", { "bin": { "baseline-browser-mapping": "dist/cli.cjs" } }, "sha512-qyq26DxfY4awP2gIRXhhLWfwzwI+N5Nxk6iQi8EFizIaWIjqicQTE4sLnZZVdeKPRcVNoJOkkpfzoIYuvCKaIQ=="], + "baseline-browser-mapping": ["baseline-browser-mapping@2.10.16", "", { "bin": { "baseline-browser-mapping": "dist/cli.cjs" } }, "sha512-Lyf3aK28zpsD1yQMiiHD4RvVb6UdMoo8xzG2XzFIfR9luPzOpcBlAsT/qfB1XWS1bxWT+UtE4WmQgsp297FYOA=="], "binary-searching": ["binary-searching@2.0.5", "", {}, "sha512-v4N2l3RxL+m4zDxyxz3Ne2aTmiPn8ZUpKFpdPtO+ItW1NcTCXA7JeHG5GMBSvoKSkQZ9ycS+EouDVxYB9ufKWA=="], @@ -390,7 +386,7 @@ "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="], - "browserslist": ["browserslist@4.28.1", "", { "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", "electron-to-chromium": "^1.5.263", "node-releases": "^2.0.27", "update-browserslist-db": "^1.2.0" }, "bin": { "browserslist": "cli.js" } }, "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA=="], + "browserslist": ["browserslist@4.28.2", "", { "dependencies": { "baseline-browser-mapping": "^2.10.12", "caniuse-lite": "^1.0.30001782", "electron-to-chromium": "^1.5.328", "node-releases": "^2.0.36", "update-browserslist-db": "^1.2.3" }, "bin": { "browserslist": "cli.js" } }, "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg=="], "builtin-modules": ["builtin-modules@3.3.0", "", {}, "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw=="], @@ -406,7 +402,7 @@ "call-bound": ["call-bound@1.0.4", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "get-intrinsic": "^1.3.0" } }, "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg=="], - "caniuse-lite": ["caniuse-lite@1.0.30001781", "", {}, "sha512-RdwNCyMsNBftLjW6w01z8bKEvT6e/5tpPVEgtn22TiLGlstHOVecsX2KHFkD5e/vRnIE4EGzpuIODb3mtswtkw=="], + "caniuse-lite": ["caniuse-lite@1.0.30001786", "", {}, "sha512-4oxTZEvqmLLrERwxO76yfKM7acZo310U+v4kqexI2TL1DkkUEMT8UijrxxcnVdxR3qkVf5awGRX+4Z6aPHVKrA=="], "change-case": ["change-case@5.4.4", "", {}, "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w=="], @@ -420,7 +416,7 @@ "clean-regexp": ["clean-regexp@1.0.0", "", { "dependencies": { "escape-string-regexp": "^1.0.5" } }, "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw=="], - "comment-parser": ["comment-parser@1.4.5", "", {}, "sha512-aRDkn3uyIlCFfk5NUA+VdwMmMsh8JGhc4hapfV4yxymHGQ3BVskMQfoXGpCo5IoBuQ9tS5iiVKhCpTcB4pW4qw=="], + "comment-parser": ["comment-parser@1.4.6", "", {}, "sha512-ObxuY6vnbWTN6Od72xfwN9DbzC7Y2vv8u1Soi9ahRKL37gb6y1qk6/dgjs+3JWuXJHWvsg3BXIwzd/rkmAwavg=="], "concat-map": ["concat-map@0.0.1", "", {}, "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="], @@ -450,7 +446,7 @@ "define-properties": ["define-properties@1.2.1", "", { "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" } }, "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg=="], - "defu": ["defu@6.1.4", "", {}, "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg=="], + "defu": ["defu@6.1.7", "", {}, "sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ=="], "dequal": ["dequal@2.0.3", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="], @@ -460,7 +456,7 @@ "dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="], - "electron-to-chromium": ["electron-to-chromium@1.5.328", "", {}, "sha512-QNQ5l45DzYytThO21403XN3FvK0hOkWDG8viNf6jqS42msJ8I4tGDSpBCgvDRRPnkffafiwAym2X2eHeGD2V0w=="], + "electron-to-chromium": ["electron-to-chromium@1.5.332", "", {}, "sha512-7OOtytmh/rINMLwaFTbcMVvYXO3AUm029X0LcyfYk0B557RlPkdpTpnH9+htMlfu5dKwOmT0+Zs2Aw+lnn6TeQ=="], "emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="], @@ -486,7 +482,7 @@ "escape-string-regexp": ["escape-string-regexp@5.0.0", "", {}, "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="], - "eslint": ["eslint@10.1.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", "@eslint/config-array": "^0.23.3", "@eslint/config-helpers": "^0.5.3", "@eslint/core": "^1.1.1", "@eslint/plugin-kit": "^0.6.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "ajv": "^6.14.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^9.1.2", "eslint-visitor-keys": "^5.0.1", "espree": "^11.2.0", "esquery": "^1.7.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "minimatch": "^10.2.4", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-S9jlY/ELKEUwwQnqWDO+f+m6sercqOPSqXM5Go94l7DOmxHVDgmSFGWEzeE/gwgTAr0W103BWt0QLe/7mabIvA=="], + "eslint": ["eslint@10.2.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", "@eslint/config-array": "^0.23.4", "@eslint/config-helpers": "^0.5.4", "@eslint/core": "^1.2.0", "@eslint/plugin-kit": "^0.7.0", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "ajv": "^6.14.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^9.1.2", "eslint-visitor-keys": "^5.0.1", "espree": "^11.2.0", "esquery": "^1.7.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "minimatch": "^10.2.4", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-+L0vBFYGIpSNIt/KWTpFonPrqYvgKw1eUI5Vn7mEogrQcWtWYtNQ7dNqC+px/J0idT3BAkiWrhfS7k+Tum8TUA=="], "eslint-compat-utils": ["eslint-compat-utils@0.6.5", "", { "dependencies": { "semver": "^7.5.4" }, "peerDependencies": { "eslint": ">=6.0.0" } }, "sha512-vAUHYzue4YAa2hNACjB8HvUQj5yehAZgiClyFVVom9cP8z5NSFq3PwB/TtJslN2zAMgRX6FCFCjYBbQh71g5RQ=="], @@ -494,11 +490,11 @@ "eslint-plugin-functional": ["eslint-plugin-functional@9.0.4", "", { "dependencies": { "@typescript-eslint/utils": "^8.26.0", "deepmerge-ts": "^7.1.5", "escape-string-regexp": "^5.0.0", "is-immutable-type": "^5.0.1", "ts-api-utils": "^2.0.1", "ts-declaration-location": "^1.0.6" }, "peerDependencies": { "eslint": "^9.0.0 || ^10.0.0", "typescript": ">=4.7.4" }, "optionalPeers": ["typescript"] }, "sha512-zm4qaoqb2r50V4WXxt0Mj92buXGMECYvMxGQ6sSb+XeJ+Eec6zCHuMY2+AWK1mqiApvUz2tCtp1P3zcEPU0huw=="], - "eslint-plugin-jsdoc": ["eslint-plugin-jsdoc@62.8.1", "", { "dependencies": { "@es-joy/jsdoccomment": "~0.84.0", "@es-joy/resolve.exports": "1.2.0", "are-docs-informative": "^0.0.2", "comment-parser": "1.4.5", "debug": "^4.4.3", "escape-string-regexp": "^4.0.0", "espree": "^11.1.0", "esquery": "^1.7.0", "html-entities": "^2.6.0", "object-deep-merge": "^2.0.0", "parse-imports-exports": "^0.2.4", "semver": "^7.7.4", "spdx-expression-parse": "^4.0.0", "to-valid-identifier": "^1.0.0" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0" } }, "sha512-e9358PdHgvcMF98foNd3L7hVCw70Lt+YcSL7JzlJebB8eT5oRJtW6bHMQKoAwJtw6q0q0w/fRIr2kwnHdFDI6A=="], + "eslint-plugin-jsdoc": ["eslint-plugin-jsdoc@62.9.0", "", { "dependencies": { "@es-joy/jsdoccomment": "~0.86.0", "@es-joy/resolve.exports": "1.2.0", "are-docs-informative": "^0.0.2", "comment-parser": "1.4.6", "debug": "^4.4.3", "escape-string-regexp": "^4.0.0", "espree": "^11.2.0", "esquery": "^1.7.0", "html-entities": "^2.6.0", "object-deep-merge": "^2.0.0", "parse-imports-exports": "^0.2.4", "semver": "^7.7.4", "spdx-expression-parse": "^4.0.0", "to-valid-identifier": "^1.0.0" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0" } }, "sha512-PY7/X4jrVgoIDncUmITlUqK546Ltmx/Pd4Hdsu4CvSjryQZJI2mEV4vrdMufyTetMiZ5taNSqvK//BTgVUlNkA=="], "eslint-plugin-jsx-a11y": ["eslint-plugin-jsx-a11y@6.10.2", "", { "dependencies": { "aria-query": "^5.3.2", "array-includes": "^3.1.8", "array.prototype.flatmap": "^1.3.2", "ast-types-flow": "^0.0.8", "axe-core": "^4.10.0", "axobject-query": "^4.1.0", "damerau-levenshtein": "^1.0.8", "emoji-regex": "^9.2.2", "hasown": "^2.0.2", "jsx-ast-utils": "^3.3.5", "language-tags": "^1.0.9", "minimatch": "^3.1.2", "object.fromentries": "^2.0.8", "safe-regex-test": "^1.0.3", "string.prototype.includes": "^2.0.1" }, "peerDependencies": { "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9" } }, "sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q=="], - "eslint-plugin-perfectionist": ["eslint-plugin-perfectionist@5.7.0", "", { "dependencies": { "@typescript-eslint/utils": "^8.57.1", "natural-orderby": "^5.0.0" }, "peerDependencies": { "eslint": "^8.45.0 || ^9.0.0 || ^10.0.0" } }, "sha512-WRHj7OZS/INutQ/gKN5C1ZGnMhkQ3oKZQAA2I7rl5yM8keBtSd9oj/qlJaHuwh5873FhMPqYlttcadF0YsTN7g=="], + "eslint-plugin-perfectionist": ["eslint-plugin-perfectionist@5.8.0", "", { "dependencies": { "@typescript-eslint/utils": "^8.58.0", "natural-orderby": "^5.0.0" }, "peerDependencies": { "eslint": "^8.45.0 || ^9.0.0 || ^10.0.0" } }, "sha512-k8uIptWIxkUclonCFGyDzgYs9NI+Qh0a7cUXS3L7IYZDEsjXuimFBVbxXPQQngWqMiaxJRwbtYB4smMGMqF+cw=="], "eslint-plugin-sonarjs": ["eslint-plugin-sonarjs@4.0.2", "", { "dependencies": { "@eslint-community/regexpp": "^4.12.2", "builtin-modules": "^3.3.0", "bytes": "^3.1.2", "functional-red-black-tree": "^1.0.1", "globals": "^17.4.0", "jsx-ast-utils-x": "^0.1.0", "lodash.merge": "^4.6.2", "minimatch": "^10.2.4", "scslre": "^0.3.0", "semver": "^7.7.4", "ts-api-utils": "^2.4.0", "typescript": ">=5" }, "peerDependencies": { "eslint": "^8.0.0 || ^9.0.0 || ^10.0.0" } }, "sha512-BTcT1zr1iTbmJtVlcesISwnXzh+9uhf9LEOr+RRNf4kR8xA0HQTPft4oiyOCzCOGKkpSJxjR8ZYF6H7VPyplyw=="], @@ -662,7 +658,7 @@ "jiti": ["jiti@2.6.1", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ=="], - "jsdoc-type-pratt-parser": ["jsdoc-type-pratt-parser@7.1.1", "", {}, "sha512-/2uqY7x6bsrpi3i9LVU6J89352C0rpMk0as8trXxCtvd4kPk1ke/Eyif6wqfSLvoNJqcDG9Vk4UsXgygzCt2xA=="], + "jsdoc-type-pratt-parser": ["jsdoc-type-pratt-parser@7.2.0", "", {}, "sha512-dh140MMgjyg3JhJZY/+iEzW+NO5xR2gpbDFKHqotCmexElVntw7GjWjt511+C/Ef02RU5TKYrJo/Xlzk+OLaTw=="], "jsesc": ["jsesc@3.1.0", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="], @@ -678,7 +674,7 @@ "keyv": ["keyv@4.5.4", "", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="], - "knip": ["knip@6.1.1", "", { "dependencies": { "@nodelib/fs.walk": "^1.2.3", "fast-glob": "^3.3.3", "formatly": "^0.3.0", "get-tsconfig": "4.13.7", "jiti": "^2.6.0", "minimist": "^1.2.8", "oxc-parser": "^0.121.0", "oxc-resolver": "^11.19.1", "picocolors": "^1.1.1", "picomatch": "^4.0.1", "smol-toml": "^1.6.1", "strip-json-comments": "5.0.3", "unbash": "^2.2.0", "yaml": "^2.8.2", "zod": "^4.1.11" }, "bin": { "knip": "bin/knip.js", "knip-bun": "bin/knip-bun.js" } }, "sha512-BC/kbdxwCgv+p/3YkGbtlLxbOXhQDuR+CeKKFEpJyKb3BFwG1gZa+CMWSqAnPi+kUexz74m327d3zWxyn2fMew=="], + "knip": ["knip@6.3.0", "", { "dependencies": { "@nodelib/fs.walk": "^1.2.3", "fast-glob": "^3.3.3", "formatly": "^0.3.0", "get-tsconfig": "4.13.7", "jiti": "^2.6.0", "minimist": "^1.2.8", "oxc-parser": "^0.121.0", "oxc-resolver": "^11.19.1", "picocolors": "^1.1.1", "picomatch": "^4.0.1", "smol-toml": "^1.6.1", "strip-json-comments": "5.0.3", "unbash": "^2.2.0", "yaml": "^2.8.2", "zod": "^4.1.11" }, "bin": { "knip": "bin/knip.js", "knip-bun": "bin/knip-bun.js" } }, "sha512-g6dVPoTw6iNm3cubC5IWxVkVsd0r5hXhTBTbAGIEQN53GdA2ZM/slMTPJ7n5l8pBebNQPHpxjmKxuR4xVQ2/hQ=="], "language-subtag-registry": ["language-subtag-registry@0.3.23", "", {}, "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ=="], @@ -692,7 +688,7 @@ "lodash.merge": ["lodash.merge@4.6.2", "", {}, "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="], - "lru-cache": ["lru-cache@11.2.7", "", {}, "sha512-aY/R+aEsRelme17KGQa/1ZSIpLpNYYrhcrepKTZgE+W3WM16YMCaPwOHLHsmopZHELU0Ojin1lPVxKR0MihncA=="], + "lru-cache": ["lru-cache@11.3.2", "", {}, "sha512-wgWa6FWQ3QRRJbIjbsldRJZxdxYngT/dO0I5Ynmlnin8qy7tC6xYzbcJjtN4wHLXtkbVwHzk0C+OejVw1XM+DQ=="], "math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="], @@ -760,7 +756,7 @@ "natural-orderby": ["natural-orderby@5.0.0", "", {}, "sha512-kKHJhxwpR/Okycz4HhQKKlhWe4ASEfPgkSWNmKFHd7+ezuQlxkA5cM3+XkBPvm1gmHen3w53qsYAv+8GwRrBlg=="], - "node-releases": ["node-releases@2.0.36", "", {}, "sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA=="], + "node-releases": ["node-releases@2.0.37", "", {}, "sha512-1h5gKZCF+pO/o3Iqt5Jp7wc9rH3eJJ0+nh/CIoiRwjRxde/hAHyLPXYN4V3CqKAbiZPSeJFSWHmJsbkicta0Eg=="], "object-deep-merge": ["object-deep-merge@2.0.0", "", {}, "sha512-3DC3UMpeffLTHiuXSy/UG4NOIYTLlY9u3V82+djSCLYClWobZiS4ivYzpIUWrRY/nfsJ8cWsKyG3QfyLePmhvg=="], @@ -784,9 +780,9 @@ "oxc-resolver": ["oxc-resolver@11.19.1", "", { "optionalDependencies": { "@oxc-resolver/binding-android-arm-eabi": "11.19.1", "@oxc-resolver/binding-android-arm64": "11.19.1", "@oxc-resolver/binding-darwin-arm64": "11.19.1", "@oxc-resolver/binding-darwin-x64": "11.19.1", "@oxc-resolver/binding-freebsd-x64": "11.19.1", "@oxc-resolver/binding-linux-arm-gnueabihf": "11.19.1", "@oxc-resolver/binding-linux-arm-musleabihf": "11.19.1", "@oxc-resolver/binding-linux-arm64-gnu": "11.19.1", "@oxc-resolver/binding-linux-arm64-musl": "11.19.1", "@oxc-resolver/binding-linux-ppc64-gnu": "11.19.1", "@oxc-resolver/binding-linux-riscv64-gnu": "11.19.1", "@oxc-resolver/binding-linux-riscv64-musl": "11.19.1", "@oxc-resolver/binding-linux-s390x-gnu": "11.19.1", "@oxc-resolver/binding-linux-x64-gnu": "11.19.1", "@oxc-resolver/binding-linux-x64-musl": "11.19.1", "@oxc-resolver/binding-openharmony-arm64": "11.19.1", "@oxc-resolver/binding-wasm32-wasi": "11.19.1", "@oxc-resolver/binding-win32-arm64-msvc": "11.19.1", "@oxc-resolver/binding-win32-ia32-msvc": "11.19.1", "@oxc-resolver/binding-win32-x64-msvc": "11.19.1" } }, "sha512-qE/CIg/spwrTBFt5aKmwe3ifeDdLfA2NESN30E42X/lII5ClF8V7Wt6WIJhcGZjp0/Q+nQ+9vgxGk//xZNX2hg=="], - "oxlint": ["oxlint@1.58.0", "", { "optionalDependencies": { "@oxlint/binding-android-arm-eabi": "1.58.0", "@oxlint/binding-android-arm64": "1.58.0", "@oxlint/binding-darwin-arm64": "1.58.0", "@oxlint/binding-darwin-x64": "1.58.0", "@oxlint/binding-freebsd-x64": "1.58.0", "@oxlint/binding-linux-arm-gnueabihf": "1.58.0", "@oxlint/binding-linux-arm-musleabihf": "1.58.0", "@oxlint/binding-linux-arm64-gnu": "1.58.0", "@oxlint/binding-linux-arm64-musl": "1.58.0", "@oxlint/binding-linux-ppc64-gnu": "1.58.0", "@oxlint/binding-linux-riscv64-gnu": "1.58.0", "@oxlint/binding-linux-riscv64-musl": "1.58.0", "@oxlint/binding-linux-s390x-gnu": "1.58.0", "@oxlint/binding-linux-x64-gnu": "1.58.0", "@oxlint/binding-linux-x64-musl": "1.58.0", "@oxlint/binding-openharmony-arm64": "1.58.0", "@oxlint/binding-win32-arm64-msvc": "1.58.0", "@oxlint/binding-win32-ia32-msvc": "1.58.0", "@oxlint/binding-win32-x64-msvc": "1.58.0" }, "peerDependencies": { "oxlint-tsgolint": ">=0.18.0" }, "optionalPeers": ["oxlint-tsgolint"], "bin": { "oxlint": "bin/oxlint" } }, "sha512-t4s9leczDMqlvOSjnbCQe7gtoLkWgBGZ7sBdCJ9EOj5IXFSG/X7OAzK4yuH4iW+4cAYe8kLFbC8tuYMwWZm+Cg=="], + "oxlint": ["oxlint@1.59.0", "", { "optionalDependencies": { "@oxlint/binding-android-arm-eabi": "1.59.0", "@oxlint/binding-android-arm64": "1.59.0", "@oxlint/binding-darwin-arm64": "1.59.0", "@oxlint/binding-darwin-x64": "1.59.0", "@oxlint/binding-freebsd-x64": "1.59.0", "@oxlint/binding-linux-arm-gnueabihf": "1.59.0", "@oxlint/binding-linux-arm-musleabihf": "1.59.0", "@oxlint/binding-linux-arm64-gnu": "1.59.0", "@oxlint/binding-linux-arm64-musl": "1.59.0", "@oxlint/binding-linux-ppc64-gnu": "1.59.0", "@oxlint/binding-linux-riscv64-gnu": "1.59.0", "@oxlint/binding-linux-riscv64-musl": "1.59.0", "@oxlint/binding-linux-s390x-gnu": "1.59.0", "@oxlint/binding-linux-x64-gnu": "1.59.0", "@oxlint/binding-linux-x64-musl": "1.59.0", "@oxlint/binding-openharmony-arm64": "1.59.0", "@oxlint/binding-win32-arm64-msvc": "1.59.0", "@oxlint/binding-win32-ia32-msvc": "1.59.0", "@oxlint/binding-win32-x64-msvc": "1.59.0" }, "peerDependencies": { "oxlint-tsgolint": ">=0.18.0" }, "optionalPeers": ["oxlint-tsgolint"], "bin": { "oxlint": "bin/oxlint" } }, "sha512-0xBLeGGjP4vD9pygRo8iuOkOzEU1MqOnfiOl7KYezL/QvWL8NUg6n03zXc7ZVqltiOpUxBk2zgHI3PnRIEdAvw=="], - "oxlint-tsgolint": ["oxlint-tsgolint@0.19.0", "", { "optionalDependencies": { "@oxlint-tsgolint/darwin-arm64": "0.19.0", "@oxlint-tsgolint/darwin-x64": "0.19.0", "@oxlint-tsgolint/linux-arm64": "0.19.0", "@oxlint-tsgolint/linux-x64": "0.19.0", "@oxlint-tsgolint/win32-arm64": "0.19.0", "@oxlint-tsgolint/win32-x64": "0.19.0" }, "bin": { "tsgolint": "bin/tsgolint.js" } }, "sha512-pSzUmDjMyjC8iUUZ7fCLo0D1iUaYIfodd/WIQ6Zra11YkjkUQk3BOFoW4I5ec6uZ/0s2FEmxtiZ7hiTXFRp1cg=="], + "oxlint-tsgolint": ["oxlint-tsgolint@0.20.0", "", { "optionalDependencies": { "@oxlint-tsgolint/darwin-arm64": "0.20.0", "@oxlint-tsgolint/darwin-x64": "0.20.0", "@oxlint-tsgolint/linux-arm64": "0.20.0", "@oxlint-tsgolint/linux-x64": "0.20.0", "@oxlint-tsgolint/win32-arm64": "0.20.0", "@oxlint-tsgolint/win32-x64": "0.20.0" }, "bin": { "tsgolint": "bin/tsgolint.js" } }, "sha512-/Uc9TQyN1l8w9QNvXtVHYtz+SzDJHKpb5X0UnHodl0BVzijUPk0LPlDOHAvogd1UI+iy9ZSF6gQxEqfzUxCULQ=="], "p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="], @@ -804,7 +800,7 @@ "pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="], - "php-parser": ["php-parser@3.5.0", "", {}, "sha512-EHdzSckQNP86jQRCEsMYhs+YzS4BfvfxnyhvzHVhVRoRUGEMFi8f3xKfuS9xdChBazZSyvb10SZbqhYQLGBcQg=="], + "php-parser": ["php-parser@3.5.1", "", {}, "sha512-0By/iMXxBM9nIapBXOdFGHlD2os9t/3Pk1aIavUzCH7jKFPjq1WYeOVOv/iXhELCjlL4ZlzKwK1keyxLQjll8g=="], "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], @@ -828,9 +824,9 @@ "prettier-plugin-jsdoc": ["prettier-plugin-jsdoc@1.8.0", "", { "dependencies": { "binary-searching": "^2.0.5", "comment-parser": "^1.4.0", "mdast-util-from-markdown": "^2.0.0" }, "peerDependencies": { "prettier": "^3.0.0" } }, "sha512-byW8EBZ1DSA3CPdDGBXfcdqqhh2eq0+HlIOPTGZ6rf9O2p/AwBmtS0e49ot5ZeOdcszj81FyzbyHr/VS0eYpCg=="], - "prettier-plugin-pkg": ["prettier-plugin-pkg@0.22.0", "", { "peerDependencies": { "prettier": "^3.0.3" } }, "sha512-jqkbvnIG7YLWRkcu/5Gj04B5Rr+0FeygtsD8g0EvQa86KYWYLjzcMwLbpVY042rBSPsKp88QnMt2b/ndSHIuxA=="], + "prettier-plugin-pkg": ["prettier-plugin-pkg@0.22.1", "", { "peerDependencies": { "prettier": "^3.0.3" } }, "sha512-l9qnxic48hgTXsvXi9yWWWzovpqkEYo/Ljf8Af7zSkDTNVmLwscXW63IEVMJXH94DyloO8YkogeLheJUzJh/ZQ=="], - "prettier-plugin-sh": ["prettier-plugin-sh@0.18.0", "", { "dependencies": { "@reteps/dockerfmt": "^0.3.6", "sh-syntax": "^0.5.8" }, "peerDependencies": { "prettier": "^3.6.0" } }, "sha512-cW1XL27FOJQ/qGHOW6IHwdCiNWQsAgK+feA8V6+xUTaH0cD3Mh+tFAtBvEEWvuY6hTDzRV943Fzeii+qMOh7nQ=="], + "prettier-plugin-sh": ["prettier-plugin-sh@0.18.1", "", { "dependencies": { "@reteps/dockerfmt": "^0.5.1", "sh-syntax": "^0.5.8" }, "peerDependencies": { "prettier": "^3.6.0" } }, "sha512-uZmU22wBMevjh3rmCatNQqiEer2+5KLa0xYCBX6zQQUQkcNzVL+s6FbPKK6ZSUNUbQk6jMAcQHrYPvuL2W6ihQ=="], "prettier-plugin-sort-json": ["prettier-plugin-sort-json@4.2.0", "", { "peerDependencies": { "prettier": "^3.0.0" } }, "sha512-jK1w3/7otTvHtv1eoLji2U9mEoOGeyl7QQQ/afLnjht1YtRLSUUk8o0rIIC/HUVXhoGPCFe4SVZbRGYjjUVgvA=="], @@ -854,7 +850,7 @@ "regexp.prototype.flags": ["regexp.prototype.flags@1.5.4", "", { "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-errors": "^1.3.0", "get-proto": "^1.0.1", "gopd": "^1.2.0", "set-function-name": "^2.0.2" } }, "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA=="], - "regjsparser": ["regjsparser@0.13.0", "", { "dependencies": { "jsesc": "~3.1.0" }, "bin": { "regjsparser": "bin/parser" } }, "sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q=="], + "regjsparser": ["regjsparser@0.13.1", "", { "dependencies": { "jsesc": "~3.1.0" }, "bin": { "regjsparser": "bin/parser" } }, "sha512-dLsljMd9sqwRkby8zhO1gSg3PnJIBFid8f4CQj/sXx+7cKx+E7u0PKhZ+U4wmhx7EfmtvnA318oVaIkAB1lRJw=="], "reserved-identifiers": ["reserved-identifiers@1.2.0", "", {}, "sha512-yE7KUfFvaBFzGPs5H3Ops1RevfUEsDc5Iz65rOwWg4lE8HJSYtle77uul3+573457oHvBKuHYDl/xqUkKpEEdw=="], @@ -956,7 +952,7 @@ "typescript": ["typescript@6.0.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ=="], - "typescript-eslint": ["typescript-eslint@8.57.2", "", { "dependencies": { "@typescript-eslint/eslint-plugin": "8.57.2", "@typescript-eslint/parser": "8.57.2", "@typescript-eslint/typescript-estree": "8.57.2", "@typescript-eslint/utils": "8.57.2" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-VEPQ0iPgWO/sBaZOU1xo4nuNdODVOajPnTIbog2GKYr31nIlZ0fWPoCQgGfF3ETyBl1vn63F/p50Um9Z4J8O8A=="], + "typescript-eslint": ["typescript-eslint@8.58.0", "", { "dependencies": { "@typescript-eslint/eslint-plugin": "8.58.0", "@typescript-eslint/parser": "8.58.0", "@typescript-eslint/typescript-estree": "8.58.0", "@typescript-eslint/utils": "8.58.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-e2TQzKfaI85fO+F3QywtX+tCTsu/D3WW5LVU6nz8hTFKFZ8yBJ6mSYRpXqdR3mFjPWmO0eWsTa5f+UpAOe/FMA=="], "unbash": ["unbash@2.2.0", "", {}, "sha512-X2wH19RAPZE3+ldGicOkoj/SIA83OIxcJ6Cuaw23hf8Xc6fQpvZXY0SftE2JgS0QhYLUG4uwodSI3R53keyh7w=="], @@ -1004,11 +1000,11 @@ "@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="], - "@eslint/config-array/minimatch": ["minimatch@10.2.4", "", { "dependencies": { "brace-expansion": "^5.0.2" } }, "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg=="], + "@eslint/config-array/minimatch": ["minimatch@10.2.5", "", { "dependencies": { "brace-expansion": "^5.0.5" } }, "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg=="], "@typescript-eslint/eslint-plugin/ignore": ["ignore@7.0.5", "", {}, "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg=="], - "@typescript-eslint/typescript-estree/minimatch": ["minimatch@10.2.4", "", { "dependencies": { "brace-expansion": "^5.0.2" } }, "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg=="], + "@typescript-eslint/typescript-estree/minimatch": ["minimatch@10.2.5", "", { "dependencies": { "brace-expansion": "^5.0.5" } }, "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg=="], "@typescript-eslint/visitor-keys/eslint-visitor-keys": ["eslint-visitor-keys@5.0.1", "", {}, "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA=="], @@ -1022,7 +1018,7 @@ "eslint/espree": ["espree@11.2.0", "", { "dependencies": { "acorn": "^8.16.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^5.0.1" } }, "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw=="], - "eslint/minimatch": ["minimatch@10.2.4", "", { "dependencies": { "brace-expansion": "^5.0.2" } }, "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg=="], + "eslint/minimatch": ["minimatch@10.2.5", "", { "dependencies": { "brace-expansion": "^5.0.5" } }, "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg=="], "eslint-plugin-astro/globals": ["globals@16.5.0", "", {}, "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ=="], @@ -1030,7 +1026,7 @@ "eslint-plugin-jsdoc/espree": ["espree@11.2.0", "", { "dependencies": { "acorn": "^8.16.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^5.0.1" } }, "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw=="], - "eslint-plugin-sonarjs/minimatch": ["minimatch@10.2.4", "", { "dependencies": { "brace-expansion": "^5.0.2" } }, "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg=="], + "eslint-plugin-sonarjs/minimatch": ["minimatch@10.2.5", "", { "dependencies": { "brace-expansion": "^5.0.5" } }, "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg=="], "fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], @@ -1038,8 +1034,6 @@ "micromatch/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="], - "prettier-plugin-jsdoc/comment-parser": ["comment-parser@1.4.6", "", {}, "sha512-ObxuY6vnbWTN6Od72xfwN9DbzC7Y2vv8u1Soi9ahRKL37gb6y1qk6/dgjs+3JWuXJHWvsg3BXIwzd/rkmAwavg=="], - "rolldown/@oxc-project/types": ["@oxc-project/types@0.122.0", "", {}, "sha512-oLAl5kBpV4w69UtFZ9xqcmTi+GENWOcPF7FCrczTiBbmC0ibXxCwyvZGbO39rCVEuLGAZM84DH0pUIyyv/YJzA=="], "rolldown-plugin-dts/@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@8.0.0-rc.3", "", {}, "sha512-8AWCJ2VJJyDFlGBep5GpaaQ9AAaE/FjAcrqI7jyssYhtL7WGV0DOKpJsQqM037xDbpRLHXsY8TwU7zDma7coOw=="], diff --git a/cfg/eslint.config.ts b/cfg/eslint.config.ts index 8f223cc..f918764 100644 --- a/cfg/eslint.config.ts +++ b/cfg/eslint.config.ts @@ -1,4 +1,6 @@ import { configAstro } from "@gcch/configuration-eslint"; import { defineConfig } from "eslint/config"; -export default defineConfig([...configAstro]); +const config = defineConfig([...configAstro]); + +export default config; diff --git a/cfg/oxlint.config.ts b/cfg/oxlint.config.ts index 693b2c2..5ad209c 100644 --- a/cfg/oxlint.config.ts +++ b/cfg/oxlint.config.ts @@ -1,3 +1,3 @@ -import config from "../index"; +import config from "../index.ts"; export default config; diff --git a/cfg/tsdown.config.ts b/cfg/tsdown.config.ts index bd3eb15..f3b8735 100644 --- a/cfg/tsdown.config.ts +++ b/cfg/tsdown.config.ts @@ -1,13 +1,16 @@ import type { UserConfig } from "tsdown"; + import { defineConfig } from "tsdown"; const config: UserConfig = defineConfig({ + checks: { circularDependency: true }, clean: true, dts: { oxc: true, parallel: true }, entry: ["../index.ts"], minify: false, outDir: "../dist", platform: "node", + publint: true, sourcemap: false, target: "esnext", treeshake: true, diff --git a/dist/index.d.mts b/dist/index.d.mts index bca2f24..c9902b6 100644 --- a/dist/index.d.mts +++ b/dist/index.d.mts @@ -3,4 +3,4 @@ import { OxlintConfig } from "oxlint"; //#region ../index.d.ts declare const config: OxlintConfig; //#endregion -export { config as default }; +export { config as default }; \ No newline at end of file diff --git a/dist/index.mjs b/dist/index.mjs index dd76cc7..527034c 100644 --- a/dist/index.mjs +++ b/dist/index.mjs @@ -2,1031 +2,1138 @@ import { defineConfig } from "oxlint"; //#region ../rules/astro.ts const astroConfig = { - env: { astro: true }, - files: ["**/*.astro"], - jsPlugins: ["eslint-plugin-astro"], - rules: { - "astro/jsx-a11y/alt-text": "error", - "astro/jsx-a11y/anchor-ambiguous-text": "error", - "astro/jsx-a11y/anchor-has-content": "error", - "astro/jsx-a11y/anchor-is-valid": "error", - "astro/jsx-a11y/aria-activedescendant-has-tabindex": "error", - "astro/jsx-a11y/aria-props": "error", - "astro/jsx-a11y/aria-proptypes": "error", - "astro/jsx-a11y/aria-role": "error", - "astro/jsx-a11y/aria-unsupported-elements": "error", - "astro/jsx-a11y/autocomplete-valid": "error", - "astro/jsx-a11y/click-events-have-key-events": "error", - "astro/jsx-a11y/control-has-associated-label": "error", - "astro/jsx-a11y/heading-has-content": "error", - "astro/jsx-a11y/html-has-lang": "error", - "astro/jsx-a11y/iframe-has-title": "error", - "astro/jsx-a11y/img-redundant-alt": "error", - "astro/jsx-a11y/interactive-supports-focus": "error", - "astro/jsx-a11y/label-has-associated-control": "error", - "astro/jsx-a11y/lang": "error", - "astro/jsx-a11y/media-has-caption": "error", - "astro/jsx-a11y/mouse-events-have-key-events": "error", - "astro/jsx-a11y/no-access-key": "error", - "astro/jsx-a11y/no-aria-hidden-on-focusable": "error", - "astro/jsx-a11y/no-autofocus": "error", - "astro/jsx-a11y/no-distracting-elements": "error", - "astro/jsx-a11y/no-interactive-element-to-noninteractive-role": "error", - "astro/jsx-a11y/no-noninteractive-element-interactions": "error", - "astro/jsx-a11y/no-noninteractive-element-to-interactive-role": "error", - "astro/jsx-a11y/no-noninteractive-tabindex": "error", - "astro/jsx-a11y/no-redundant-roles": "error", - "astro/jsx-a11y/no-static-element-interactions": "error", - "astro/jsx-a11y/prefer-tag-over-role": "error", - "astro/jsx-a11y/role-has-required-aria-props": "error", - "astro/jsx-a11y/role-supports-aria-props": "error", - "astro/jsx-a11y/scope": "error", - "astro/jsx-a11y/tabindex-no-positive": "error", - "astro/missing-client-only-directive-value": "error", - "astro/no-conflict-set-directives": "error", - "astro/no-deprecated-astro-canonicalurl": "error", - "astro/no-deprecated-astro-fetchcontent": "error", - "astro/no-deprecated-astro-resolve": "error", - "astro/no-deprecated-getentrybyslug": "error", - "astro/no-exports-from-components": "error", - "astro/no-set-html-directive": "error", - "astro/no-set-text-directive": "error", - "astro/no-unused-css-selector": "error", - "astro/no-unused-define-vars-in-style": "error", - "astro/prefer-class-list-directive": "error", - "astro/prefer-object-class-list": "error", - "astro/prefer-split-class-list": ["error", { splitLiteral: false }], - "astro/sort-attributes": [ - "error", - { - ignoreCase: false, - order: "asc", - type: "alphabetical", - }, - ], - "astro/valid-compile": "error", - }, -}; - -//#endregion -//#region ../rules/functional.ts -const functionalRules = { - "functional/immutable-data": "error", - "functional/no-let": "error", - "functional/no-throw-statements": "error", - "functional/no-try-statements": "error", - "functional/prefer-property-signatures": "error", - "functional/readonly-type": ["error", "generic"], + env: { astro: true }, + files: ["**/*.astro"], + jsPlugins: ["eslint-plugin-astro"], + rules: { + "astro/jsx-a11y/alt-text": "deny", + "astro/jsx-a11y/anchor-ambiguous-text": "deny", + "astro/jsx-a11y/anchor-has-content": "deny", + "astro/jsx-a11y/anchor-is-valid": "deny", + "astro/jsx-a11y/aria-activedescendant-has-tabindex": "deny", + "astro/jsx-a11y/aria-props": "deny", + "astro/jsx-a11y/aria-proptypes": "deny", + "astro/jsx-a11y/aria-role": "deny", + "astro/jsx-a11y/aria-unsupported-elements": "deny", + "astro/jsx-a11y/autocomplete-valid": "deny", + "astro/jsx-a11y/click-events-have-key-events": "deny", + "astro/jsx-a11y/control-has-associated-label": "deny", + "astro/jsx-a11y/heading-has-content": "deny", + "astro/jsx-a11y/html-has-lang": "deny", + "astro/jsx-a11y/iframe-has-title": "deny", + "astro/jsx-a11y/img-redundant-alt": "deny", + "astro/jsx-a11y/interactive-supports-focus": "deny", + "astro/jsx-a11y/label-has-associated-control": "deny", + "astro/jsx-a11y/lang": "deny", + "astro/jsx-a11y/media-has-caption": "deny", + "astro/jsx-a11y/mouse-events-have-key-events": "deny", + "astro/jsx-a11y/no-access-key": "deny", + "astro/jsx-a11y/no-aria-hidden-on-focusable": "deny", + "astro/jsx-a11y/no-autofocus": "deny", + "astro/jsx-a11y/no-distracting-elements": "deny", + "astro/jsx-a11y/no-interactive-element-to-noninteractive-role": "deny", + "astro/jsx-a11y/no-noninteractive-element-interactions": "deny", + "astro/jsx-a11y/no-noninteractive-element-to-interactive-role": "deny", + "astro/jsx-a11y/no-noninteractive-tabindex": "deny", + "astro/jsx-a11y/no-redundant-roles": "deny", + "astro/jsx-a11y/no-static-element-interactions": "deny", + "astro/jsx-a11y/prefer-tag-over-role": "deny", + "astro/jsx-a11y/role-has-required-aria-props": "deny", + "astro/jsx-a11y/role-supports-aria-props": "deny", + "astro/jsx-a11y/scope": "deny", + "astro/jsx-a11y/tabindex-no-positive": "deny", + "astro/missing-client-only-directive-value": "deny", + "astro/no-conflict-set-directives": "deny", + "astro/no-deprecated-astro-canonicalurl": "deny", + "astro/no-deprecated-astro-fetchcontent": "deny", + "astro/no-deprecated-astro-resolve": "deny", + "astro/no-deprecated-getentrybyslug": "deny", + "astro/no-exports-from-components": "deny", + "astro/no-set-html-directive": "deny", + "astro/no-set-text-directive": "deny", + "astro/no-unused-css-selector": "deny", + "astro/no-unused-define-vars-in-style": "deny", + "astro/prefer-class-list-directive": "deny", + "astro/prefer-object-class-list": "deny", + "astro/prefer-split-class-list": ["deny", { splitLiteral: false }], + "astro/sort-attributes": ["deny", { + ignoreCase: false, + order: "asc", + type: "alphabetical" + }], + "astro/valid-compile": "deny" + } }; //#endregion //#region ../rules/eslint.ts const esLintRules = { - "eslint/accessor-pairs": ["deny", { enforceForTSTypes: true }], - "eslint/array-callback-return": ["deny", { checkForEach: true }], - "eslint/arrow-body-style": ["deny", "as-needed", { requireReturnForObjectLiteral: false }], - "eslint/block-scoped-var": "deny", - "eslint/capitalized-comments": [ - "deny", - "always", - { - block: { ignoreConsecutiveComments: true }, - line: { ignoreConsecutiveComments: true }, - }, - ], - "eslint/constructor-super": "deny", - "eslint/curly": ["deny", "all"], - "eslint/default-case": "deny", - "eslint/default-case-last": "deny", - "eslint/default-param-last": "deny", - "eslint/eqeqeq": "deny", - "eslint/for-direction": "deny", - "eslint/func-names": "allow", - "eslint/func-style": ["deny", "expression", { allowArrowFunctions: true }], - "eslint/getter-return": "deny", - "eslint/grouped-accessor-pairs": ["deny", "setBeforeGet", { enforceForTSTypes: true }], - "eslint/guard-for-in": "deny", - "eslint/id-length": "deny", - "eslint/init-declarations": ["deny", "always"], - "eslint/new-cap": [ - "deny", - { - capIsNew: false, - newIsCap: true, - properties: true, - }, - ], - "eslint/no-alert": "deny", - "eslint/no-array-constructor": "deny", - "eslint/no-async-promise-executor": "deny", - "eslint/no-await-in-loop": "deny", - "eslint/no-bitwise": "deny", - "eslint/no-caller": "deny", - "eslint/no-case-declarations": "deny", - "eslint/no-class-assign": "deny", - "eslint/no-compare-neg-zero": "deny", - "eslint/no-cond-assign": "deny", - "eslint/no-console": "allow", - "eslint/no-const-assign": "deny", - "eslint/no-constant-binary-expression": "deny", - "eslint/no-constant-condition": ["deny", { checkLoops: "allExceptWhileTrue" }], - "eslint/no-constructor-return": "deny", - "eslint/no-continue": "allow", - "eslint/no-control-regex": "deny", - "eslint/no-debugger": "deny", - "eslint/no-delete-var": "deny", - "eslint/no-div-regex": "allow", - "eslint/no-dupe-class-members": "deny", - "eslint/no-dupe-else-if": "deny", - "eslint/no-dupe-keys": "deny", - "eslint/no-duplicate-case": "deny", - "eslint/no-duplicate-imports": [ - "deny", - { - allowSeparateTypeImports: true, - includeExports: false, - }, - ], - "eslint/no-else-return": "allow", - "eslint/no-empty": ["deny", { allowEmptyCatch: false }], - "eslint/no-empty-character-class": "deny", - "eslint/no-empty-function": ["deny", { allow: [] }], - "eslint/no-empty-pattern": "deny", - "eslint/no-empty-static-block": "deny", - "eslint/no-eq-null": "deny", - "eslint/no-eval": "deny", - "eslint/no-ex-assign": "deny", - "eslint/no-extend-native": "deny", - "eslint/no-extra-bind": "deny", - "eslint/no-extra-boolean-cast": ["deny", { enforceForInnerExpressions: true }], - "eslint/no-extra-label": "deny", - "eslint/no-fallthrough": [ - "deny", - { - allowEmptyCase: false, - reportUnusedFallthroughComment: true, - }, - ], - "eslint/no-func-assign": "deny", - "eslint/no-global-assign": "deny", - "eslint/no-implicit-coercion": [ - "deny", - { - allow: [], - boolean: true, - disallowTemplateShorthand: false, - number: true, - string: true, - }, - ], - "eslint/no-import-assign": "deny", - "eslint/no-inline-comments": "deny", - "eslint/no-inner-declarations": ["deny", "both", "disallow"], - "eslint/no-invalid-regexp": "deny", - "eslint/no-irregular-whitespace": "deny", - "eslint/no-iterator": "deny", - "eslint/no-label-var": "deny", - "eslint/no-labels": "deny", - "eslint/no-lone-blocks": "deny", - "eslint/no-lonely-if": "deny", - "eslint/no-loop-func": "deny", - "eslint/no-loss-of-precision": "deny", - "eslint/no-magic-numbers": [ - "warn", - { - detectObjects: true, - enforceConst: true, - ignoreEnums: true, - ignoreNumericLiteralTypes: true, - ignoreTypeIndexes: true, - }, - ], - "eslint/no-misleading-character-class": "deny", - "eslint/no-multi-assign": "deny", - "eslint/no-multi-str": "deny", - "eslint/no-negated-condition": "deny", - "eslint/no-nested-ternary": "deny", - "eslint/no-new": "deny", - "eslint/no-new-func": "deny", - "eslint/no-new-native-nonconstructor": "deny", - "eslint/no-new-wrappers": "deny", - "eslint/no-nonoctal-decimal-escape": "deny", - "eslint/no-obj-calls": "deny", - "eslint/no-object-constructor": "deny", - "eslint/no-param-reassign": [ - "deny", - { - ignorePropertyModificationsFor: [], - props: true, - }, - ], - "eslint/no-plusplus": "deny", - "eslint/no-promise-executor-return": "deny", - "eslint/no-proto": "deny", - "eslint/no-prototype-builtins": "deny", - "eslint/no-redeclare": ["deny", { builtinGlobals: true }], - "eslint/no-regex-spaces": "deny", - "eslint/no-return-assign": ["deny", "always"], - "eslint/no-script-url": "deny", - "eslint/no-self-assign": ["deny", { props: true }], - "eslint/no-self-compare": "deny", - "eslint/no-sequences": ["deny", { allowInParentheses: false }], - "eslint/no-setter-return": "deny", - "eslint/no-shadow": [ - "deny", - { - builtinGlobals: true, - hoist: "functions-and-types", - ignoreFunctionTypeParameterNameValueShadow: true, - ignoreOnInitialization: false, - ignoreTypeValueShadow: true, - }, - ], - "eslint/no-shadow-restricted-names": ["deny", { reportGlobalThis: true }], - "eslint/no-sparse-arrays": "deny", - "eslint/no-template-curly-in-string": "deny", - "eslint/no-ternary": "deny", - "eslint/no-this-before-super": "deny", - "eslint/no-throw-literal": "allow", - "eslint/no-unassigned-vars": "deny", - "eslint/no-undef": ["deny", { typeof: true }], - "eslint/no-undefined": "deny", - "eslint/no-unexpected-multiline": "deny", - "eslint/no-unmodified-loop-condition": "deny", - "eslint/no-unneeded-ternary": ["deny", { defaultAssignment: false }], - "eslint/no-unreachable": "deny", - "eslint/no-unsafe-finally": "deny", - "eslint/no-unsafe-negation": ["deny", { enforceForOrderingRelations: true }], - "eslint/no-unsafe-optional-chaining": ["deny", { disallowArithmeticOperators: true }], - "eslint/no-unused-expressions": [ - "deny", - { - allowShortCircuit: false, - allowTaggedTemplates: false, - allowTernary: false, - enforceForJSX: true, - }, - ], - "eslint/no-unused-labels": "deny", - "eslint/no-unused-private-class-members": "deny", - "eslint/no-unused-vars": [ - "deny", - { - args: "all", - caughtErrors: "all", - fix: { - ignoreClassWithStaticInitBlock: false, - ignoreRestSiblings: false, - ignoreUsingDeclarations: false, - imports: "suggestion", - reportVarsOnlyUsedAsTypes: false, - variables: "suggestion", - vars: "all", - }, - }, - ], - "eslint/no-use-before-define": [ - "deny", - { - allowNamedExports: false, - classes: true, - enums: true, - functions: true, - ignoreTypeReferences: true, - typedefs: true, - variables: true, - }, - ], - "eslint/no-useless-backreference": "deny", - "eslint/no-useless-call": "deny", - "eslint/no-useless-catch": "deny", - "eslint/no-useless-computed-key": ["deny", { enforceForClassMembers: true }], - "eslint/no-useless-concat": "deny", - "eslint/no-useless-constructor": "deny", - "eslint/no-useless-escape": "deny", - "eslint/no-useless-rename": [ - "deny", - { - ignoreDestructuring: false, - ignoreExport: false, - ignoreImport: false, - }, - ], - "eslint/no-useless-return": "deny", - "eslint/no-var": "deny", - "eslint/no-void": ["deny", { allowAsStatement: false }], - "eslint/no-warning-comments": ["warn", { location: "anywhere" }], - "eslint/no-with": "deny", - "eslint/operator-assignment": ["deny", "never"], - "eslint/prefer-const": [ - "deny", - { - destructuring: "any", - ignoreReadBeforeAssign: true, - }, - ], - "eslint/prefer-destructuring": [ - "deny", - { - AssignmentExpression: { - array: true, - object: true, - }, - enforceForRenamedProperties: false, - VariableDeclarator: { - array: true, - object: true, - }, - }, - ], - "eslint/prefer-exponentiation-operator": "deny", - "eslint/prefer-numeric-literals": "deny", - "eslint/prefer-object-has-own": "deny", - "eslint/prefer-object-spread": "deny", - "eslint/prefer-promise-reject-errors": ["deny", { allowEmptyReject: false }], - "eslint/prefer-rest-params": "deny", - "eslint/prefer-spread": "deny", - "eslint/prefer-template": "deny", - "eslint/preserve-caught-error": "allow", - "eslint/radix": "deny", - "eslint/require-await": "allow", - "eslint/require-yield": "deny", - "eslint/sort-imports": "allow", - "eslint/sort-keys": "allow", - "eslint/sort-vars": "allow", - "eslint/symbol-description": "deny", - "eslint/unicode-bom": ["deny", "never"], - "eslint/use-isnan": [ - "deny", - { - enforceForIndexOf: true, - enforceForSwitchCase: true, - }, - ], - "eslint/valid-typeof": ["deny", { requireStringLiterals: true }], - "eslint/vars-on-top": "deny", - "eslint/yoda": [ - "deny", - "never", - { - exceptRange: false, - onlyEquality: false, - }, - ], + "eslint/accessor-pairs": ["deny", { enforceForTSTypes: true }], + "eslint/array-callback-return": ["deny", { checkForEach: true }], + "eslint/arrow-body-style": [ + "deny", + "as-needed", + { requireReturnForObjectLiteral: false } + ], + "eslint/block-scoped-var": "deny", + "eslint/capitalized-comments": [ + "deny", + "always", + { + block: { ignoreConsecutiveComments: true }, + line: { ignoreConsecutiveComments: true } + } + ], + "eslint/constructor-super": "deny", + "eslint/curly": ["deny", "all"], + "eslint/default-case": "deny", + "eslint/default-case-last": "deny", + "eslint/default-param-last": "deny", + "eslint/eqeqeq": "deny", + "eslint/for-direction": "deny", + "eslint/func-names": "allow", + "eslint/func-style": [ + "deny", + "expression", + { allowArrowFunctions: true } + ], + "eslint/getter-return": "deny", + "eslint/grouped-accessor-pairs": [ + "deny", + "setBeforeGet", + { enforceForTSTypes: true } + ], + "eslint/guard-for-in": "deny", + "eslint/id-length": ["deny", { + checkGeneric: true, + exceptionPatterns: [], + exceptions: ["_"], + max: 1e8, + min: 2, + properties: "always" + }], + "eslint/init-declarations": ["deny", "always"], + "eslint/new-cap": ["deny", { + capIsNew: false, + newIsCap: true, + properties: true + }], + "eslint/no-alert": "deny", + "eslint/no-array-constructor": "deny", + "eslint/no-async-promise-executor": "deny", + "eslint/no-await-in-loop": "deny", + "eslint/no-bitwise": "deny", + "eslint/no-caller": "deny", + "eslint/no-case-declarations": "deny", + "eslint/no-class-assign": "deny", + "eslint/no-compare-neg-zero": "deny", + "eslint/no-cond-assign": "deny", + "eslint/no-console": "allow", + "eslint/no-const-assign": "deny", + "eslint/no-constant-binary-expression": "deny", + "eslint/no-constant-condition": ["deny", { checkLoops: "allExceptWhileTrue" }], + "eslint/no-constructor-return": "deny", + "eslint/no-continue": "allow", + "eslint/no-control-regex": "deny", + "eslint/no-debugger": "deny", + "eslint/no-delete-var": "deny", + "eslint/no-div-regex": "allow", + "eslint/no-dupe-class-members": "deny", + "eslint/no-dupe-else-if": "deny", + "eslint/no-dupe-keys": "deny", + "eslint/no-duplicate-case": "deny", + "eslint/no-duplicate-imports": ["deny", { + allowSeparateTypeImports: true, + includeExports: false + }], + "eslint/no-else-return": "allow", + "eslint/no-empty": ["deny", { allowEmptyCatch: false }], + "eslint/no-empty-character-class": "deny", + "eslint/no-empty-function": ["deny", { allow: [] }], + "eslint/no-empty-pattern": "deny", + "eslint/no-empty-static-block": "deny", + "eslint/no-eq-null": "deny", + "eslint/no-eval": "deny", + "eslint/no-ex-assign": "deny", + "eslint/no-extend-native": "deny", + "eslint/no-extra-bind": "deny", + "eslint/no-extra-boolean-cast": ["deny", { enforceForInnerExpressions: true }], + "eslint/no-extra-label": "deny", + "eslint/no-fallthrough": ["deny", { + allowEmptyCase: false, + reportUnusedFallthroughComment: true + }], + "eslint/no-func-assign": "deny", + "eslint/no-global-assign": "deny", + "eslint/no-implicit-coercion": ["deny", { + allow: [], + boolean: true, + disallowTemplateShorthand: false, + number: true, + string: true + }], + "eslint/no-import-assign": "deny", + "eslint/no-inline-comments": "deny", + "eslint/no-inner-declarations": [ + "deny", + "both", + "disallow" + ], + "eslint/no-invalid-regexp": "deny", + "eslint/no-irregular-whitespace": "deny", + "eslint/no-iterator": "deny", + "eslint/no-label-var": "deny", + "eslint/no-labels": "deny", + "eslint/no-lone-blocks": "deny", + "eslint/no-lonely-if": "deny", + "eslint/no-loop-func": "deny", + "eslint/no-loss-of-precision": "deny", + "eslint/no-magic-numbers": ["warn", { + detectObjects: true, + enforceConst: true, + ignoreEnums: true, + ignoreNumericLiteralTypes: true, + ignoreTypeIndexes: true + }], + "eslint/no-misleading-character-class": "deny", + "eslint/no-multi-assign": "deny", + "eslint/no-multi-str": "deny", + "eslint/no-negated-condition": "deny", + "eslint/no-nested-ternary": "deny", + "eslint/no-new": "deny", + "eslint/no-new-func": "deny", + "eslint/no-new-native-nonconstructor": "deny", + "eslint/no-new-wrappers": "deny", + "eslint/no-nonoctal-decimal-escape": "deny", + "eslint/no-obj-calls": "deny", + "eslint/no-object-constructor": "deny", + "eslint/no-param-reassign": ["deny", { + ignorePropertyModificationsFor: [], + props: true + }], + "eslint/no-plusplus": "deny", + "eslint/no-promise-executor-return": "deny", + "eslint/no-proto": "deny", + "eslint/no-prototype-builtins": "deny", + "eslint/no-redeclare": ["deny", { builtinGlobals: true }], + "eslint/no-regex-spaces": "deny", + "eslint/no-return-assign": ["deny", "always"], + "eslint/no-script-url": "deny", + "eslint/no-self-assign": ["deny", { props: true }], + "eslint/no-self-compare": "deny", + "eslint/no-sequences": ["deny", { allowInParentheses: false }], + "eslint/no-setter-return": "deny", + "eslint/no-shadow": ["deny", { + builtinGlobals: true, + hoist: "functions-and-types", + ignoreFunctionTypeParameterNameValueShadow: true, + ignoreOnInitialization: false, + ignoreTypeValueShadow: true + }], + "eslint/no-shadow-restricted-names": ["deny", { reportGlobalThis: true }], + "eslint/no-sparse-arrays": "deny", + "eslint/no-template-curly-in-string": "deny", + "eslint/no-ternary": "deny", + "eslint/no-this-before-super": "deny", + "eslint/no-throw-literal": "allow", + "eslint/no-unassigned-vars": "deny", + "eslint/no-undef": ["deny", { typeof: true }], + "eslint/no-undefined": "deny", + "eslint/no-unexpected-multiline": "deny", + "eslint/no-unmodified-loop-condition": "deny", + "eslint/no-unneeded-ternary": ["deny", { defaultAssignment: false }], + "eslint/no-unreachable": "deny", + "eslint/no-unsafe-finally": "deny", + "eslint/no-unsafe-negation": ["deny", { enforceForOrderingRelations: true }], + "eslint/no-unsafe-optional-chaining": ["deny", { disallowArithmeticOperators: true }], + "eslint/no-unused-expressions": ["deny", { + allowShortCircuit: false, + allowTaggedTemplates: false, + allowTernary: false, + enforceForJSX: true + }], + "eslint/no-unused-labels": "deny", + "eslint/no-unused-private-class-members": "deny", + "eslint/no-unused-vars": ["deny", { + args: "all", + argsIgnorePattern: "^_", + caughtErrors: "all", + fix: { + ignoreClassWithStaticInitBlock: false, + ignoreRestSiblings: false, + ignoreUsingDeclarations: false, + imports: "suggestion", + reportVarsOnlyUsedAsTypes: false, + variables: "suggestion", + vars: "all" + } + }], + "eslint/no-use-before-define": ["deny", { + allowNamedExports: false, + classes: true, + enums: true, + functions: true, + ignoreTypeReferences: true, + typedefs: true, + variables: true + }], + "eslint/no-useless-backreference": "deny", + "eslint/no-useless-call": "deny", + "eslint/no-useless-catch": "deny", + "eslint/no-useless-computed-key": ["deny", { enforceForClassMembers: true }], + "eslint/no-useless-concat": "deny", + "eslint/no-useless-constructor": "deny", + "eslint/no-useless-escape": "deny", + "eslint/no-useless-rename": ["deny", { + ignoreDestructuring: false, + ignoreExport: false, + ignoreImport: false + }], + "eslint/no-useless-return": "deny", + "eslint/no-var": "deny", + "eslint/no-void": ["deny", { allowAsStatement: false }], + "eslint/no-warning-comments": ["warn", { location: "anywhere" }], + "eslint/no-with": "deny", + "eslint/operator-assignment": ["deny", "never"], + "eslint/prefer-const": ["deny", { + destructuring: "any", + ignoreReadBeforeAssign: true + }], + "eslint/prefer-destructuring": ["deny", { + AssignmentExpression: { + array: true, + object: true + }, + enforceForRenamedProperties: false, + VariableDeclarator: { + array: true, + object: true + } + }], + "eslint/prefer-exponentiation-operator": "deny", + "eslint/prefer-numeric-literals": "deny", + "eslint/prefer-object-has-own": "deny", + "eslint/prefer-object-spread": "deny", + "eslint/prefer-promise-reject-errors": ["deny", { allowEmptyReject: false }], + "eslint/prefer-rest-params": "deny", + "eslint/prefer-spread": "deny", + "eslint/prefer-template": "deny", + "eslint/preserve-caught-error": "allow", + "eslint/radix": "deny", + "eslint/require-await": "allow", + "eslint/require-yield": "deny", + "eslint/sort-imports": "allow", + "eslint/sort-keys": "allow", + "eslint/sort-vars": "allow", + "eslint/symbol-description": "deny", + "eslint/unicode-bom": ["deny", "never"], + "eslint/use-isnan": ["deny", { + enforceForIndexOf: true, + enforceForSwitchCase: true + }], + "eslint/valid-typeof": ["deny", { requireStringLiterals: true }], + "eslint/vars-on-top": "deny", + "eslint/yoda": [ + "deny", + "never", + { + exceptRange: false, + onlyEquality: false + } + ] +}; + +//#endregion +//#region ../rules/functional.ts +const functionalRules = { + "functional/immutable-data": "deny", + "functional/no-let": "deny", + "functional/no-throw-statements": "deny", + "functional/no-try-statements": "deny", + "functional/prefer-property-signatures": "deny", + "functional/readonly-type": ["deny", "generic"] +}; + +//#endregion +//#region ../rules/import.ts +const MAX_DEPTH = 4294967295; +const importRules = { + "import/consistent-type-specifier-style": ["deny", "prefer-top-level"], + "import/default": "deny", + "import/export": "deny", + "import/exports-last": "deny", + "import/extensions": [ + "deny", + "always", + { + checkTypeImports: true, + ignorePackages: true + } + ], + "import/first": ["deny", "absolute-first"], + "import/group-exports": "deny", + "import/max-dependencies": "allow", + "import/named": "deny", + "import/namespace": ["deny", { allowComputed: false }], + "import/no-absolute-path": ["deny", { + amd: false, + commonjs: true, + esmodule: true + }], + "import/no-amd": "deny", + "import/no-anonymous-default-export": ["deny", { + allowAnonymousClass: false, + allowAnonymousFunction: false, + allowArray: false, + allowArrowFunction: false, + allowCallExpression: false, + allowLiteral: false, + allowNew: false, + allowObject: false + }], + "import/no-commonjs": ["deny", { + allowConditionalRequire: false, + allowPrimitiveModules: false, + allowRequire: false + }], + "import/no-cycle": ["deny", { + allowUnsafeDynamicCyclicDependency: false, + ignoreExternal: false, + ignoreTypes: true, + maxDepth: MAX_DEPTH + }], + "import/no-default-export": "allow", + "import/no-duplicates": ["deny", { + considerQueryString: true, + preferInline: false + }], + "import/no-dynamic-require": ["deny", { esmodule: true }], + "import/no-empty-named-blocks": "deny", + "import/no-mutable-exports": "deny", + "import/no-named-as-default": "deny", + "import/no-named-as-default-member": "deny", + "import/no-named-default": "deny", + "import/no-named-export": "allow", + "import/no-namespace": "deny", + "import/no-nodejs-modules": "allow", + "import/no-relative-parent-imports": "allow", + "import/no-self-import": "deny", + "import/no-unassigned-import": "deny", + "import/no-webpack-loader-syntax": "deny", + "import/prefer-default-export": ["deny", { target: "single" }], + "import/unambiguous": "deny" }; //#endregion //#region ../rules/jsdoc.ts const jsDocRules = { - "jsdoc/check-access": "warn", - "jsdoc/check-property-names": "warn", - "jsdoc/check-tag-names": ["warn", { definedTags: ["link"] }], - "jsdoc/empty-tags": "warn", - "jsdoc/implements-on-classes": "warn", - "jsdoc/no-defaults": "warn", - "jsdoc/require-param": "warn", - "jsdoc/require-param-description": "warn", - "jsdoc/require-param-name": "warn", - "jsdoc/require-property": "warn", - "jsdoc/require-property-description": "warn", - "jsdoc/require-property-name": "warn", - "jsdoc/require-returns": "warn", - "jsdoc/require-returns-description": "warn", - "jsdoc/require-yields": "warn", + "jsdoc/check-access": "warn", + "jsdoc/check-property-names": "warn", + "jsdoc/check-tag-names": ["warn", { + definedTags: ["link"], + typed: true + }], + "jsdoc/empty-tags": "warn", + "jsdoc/implements-on-classes": "warn", + "jsdoc/no-defaults": ["warn", { noOptionalParamNames: true }], + "jsdoc/require-param": ["warn", { + checkConstructors: true, + checkDestructured: true, + checkDestructuredRoots: true, + checkGetters: true, + checkRestProperty: true, + checkSetters: true + }], + "jsdoc/require-param-description": "warn", + "jsdoc/require-param-name": "warn", + "jsdoc/require-param-type": "allow", + "jsdoc/require-property": "warn", + "jsdoc/require-property-description": "warn", + "jsdoc/require-property-name": "warn", + "jsdoc/require-property-type": "allow", + "jsdoc/require-returns": ["warn", { + checkConstructors: true, + checkGetters: true, + forceRequireReturn: true, + forceReturnsWithAsync: true + }], + "jsdoc/require-returns-description": "warn", + "jsdoc/require-returns-type": "allow", + "jsdoc/require-yields": ["warn", { + forceRequireYields: false, + withGeneratorTag: false + }] }; //#endregion -//#region ../rules/sonarjs.ts -const sonarJsRules = { - "sonarjs/anchor-precedence": "error", - "sonarjs/argument-type": "error", - "sonarjs/arguments-order": "error", - "sonarjs/arguments-usage": "error", - "sonarjs/array-callback-without-return": "error", - "sonarjs/assertions-in-tests": "error", - "sonarjs/aws-apigateway-public-api": "error", - "sonarjs/aws-ec2-rds-dms-public": "error", - "sonarjs/aws-ec2-unencrypted-ebs-volume": "error", - "sonarjs/aws-efs-unencrypted": "error", - "sonarjs/aws-iam-all-privileges": "error", - "sonarjs/aws-iam-privilege-escalation": "error", - "sonarjs/aws-iam-public-access": "error", - "sonarjs/aws-opensearchservice-domain": "error", - "sonarjs/aws-rds-unencrypted-databases": "error", - "sonarjs/aws-restricted-ip-admin-access": "error", - "sonarjs/aws-s3-bucket-granted-access": "error", - "sonarjs/aws-s3-bucket-insecure-http": "error", - "sonarjs/aws-s3-bucket-public-access": "error", - "sonarjs/aws-s3-bucket-versioning": "error", - "sonarjs/aws-sagemaker-unencrypted-notebook": "error", - "sonarjs/aws-sns-unencrypted-topics": "error", - "sonarjs/aws-sqs-unencrypted-queue": "error", - "sonarjs/bitwise-operators": "error", - "sonarjs/block-scoped-var": "error", - "sonarjs/call-argument-line": "error", - "sonarjs/chai-determinate-assertion": "error", - "sonarjs/class-name": "error", - "sonarjs/code-eval": "error", - "sonarjs/cognitive-complexity": "error", - "sonarjs/comma-or-logical-or-case": "error", - "sonarjs/concise-regex": "error", - "sonarjs/confidential-information-logging": "error", - "sonarjs/constructor-for-side-effects": "error", - "sonarjs/content-length": "error", - "sonarjs/content-security-policy": "error", - "sonarjs/cookie-no-httponly": "error", - "sonarjs/cors": "error", - "sonarjs/csrf": "error", - "sonarjs/deprecation": "error", - "sonarjs/different-types-comparison": "error", - "sonarjs/disabled-auto-escaping": "error", - "sonarjs/disabled-resource-integrity": "error", - "sonarjs/disabled-timeout": "error", - "sonarjs/duplicates-in-character-class": "error", - "sonarjs/dynamically-constructed-templates": "error", - "sonarjs/empty-string-repetition": "error", - "sonarjs/encryption-secure-mode": "error", - "sonarjs/existing-groups": "error", - "sonarjs/file-permissions": "error", - "sonarjs/file-uploads": "error", - "sonarjs/fixme-tag": "error", - "sonarjs/for-loop-increment-sign": "error", - "sonarjs/frame-ancestors": "error", - "sonarjs/function-inside-loop": "error", - "sonarjs/function-return-type": "error", - "sonarjs/future-reserved-words": "error", - "sonarjs/generator-without-yield": "error", - "sonarjs/hardcoded-secret-signatures": "error", - "sonarjs/hashing": "error", - "sonarjs/hidden-files": "error", - "sonarjs/in-operator-type-error": "error", - "sonarjs/inconsistent-function-call": "error", - "sonarjs/index-of-compare-to-positive-number": "error", - "sonarjs/insecure-cookie": "error", - "sonarjs/insecure-jwt-token": "error", - "sonarjs/inverted-assertion-arguments": "error", - "sonarjs/jsx-no-leaked-render": "error", - "sonarjs/label-position": "error", - "sonarjs/link-with-target-blank": "error", - "sonarjs/max-switch-cases": "error", - "sonarjs/misplaced-loop-counter": "error", - "sonarjs/new-operator-misuse": "error", - "sonarjs/no-all-duplicated-branches": "error", - "sonarjs/no-alphabetical-sort": "error", - "sonarjs/no-angular-bypass-sanitization": "error", - "sonarjs/no-array-delete": "error", - "sonarjs/no-associative-arrays": "error", - "sonarjs/no-async-constructor": "error", - "sonarjs/no-case-label-in-switch": "error", - "sonarjs/no-clear-text-protocols": "error", - "sonarjs/no-code-after-done": "error", - "sonarjs/no-collapsible-if": "error", - "sonarjs/no-collection-size-mischeck": "error", - "sonarjs/no-commented-code": "error", - "sonarjs/no-control-regex": "error", - "sonarjs/no-dead-store": "error", - "sonarjs/no-delete-var": "error", - "sonarjs/no-duplicate-in-composite": "error", - "sonarjs/no-duplicate-string": "error", - "sonarjs/no-duplicated-branches": "error", - "sonarjs/no-element-overwrite": "error", - "sonarjs/no-empty-after-reluctant": "error", - "sonarjs/no-empty-alternatives": "error", - "sonarjs/no-empty-character-class": "error", - "sonarjs/no-empty-collection": "error", - "sonarjs/no-empty-group": "error", - "sonarjs/no-empty-test-file": "error", - "sonarjs/no-equals-in-for-termination": "error", - "sonarjs/no-exclusive-tests": "error", - "sonarjs/no-extra-arguments": "error", - "sonarjs/no-fallthrough": "error", - "sonarjs/no-global-this": "error", - "sonarjs/no-globals-shadowing": "error", - "sonarjs/no-gratuitous-expressions": "error", - "sonarjs/no-hardcoded-ip": "error", - "sonarjs/no-hardcoded-passwords": "error", - "sonarjs/no-hardcoded-secrets": "error", - "sonarjs/no-hook-setter-in-body": "error", - "sonarjs/no-identical-conditions": "error", - "sonarjs/no-identical-expressions": "error", - "sonarjs/no-identical-functions": "error", - "sonarjs/no-ignored-exceptions": "error", - "sonarjs/no-ignored-return": "error", - "sonarjs/no-implicit-global": "error", - "sonarjs/no-in-misuse": "error", - "sonarjs/no-incomplete-assertions": "error", - "sonarjs/no-inconsistent-returns": "error", - "sonarjs/no-internal-api-use": "error", - "sonarjs/no-intrusive-permissions": "error", - "sonarjs/no-invalid-regexp": "error", - "sonarjs/no-invariant-returns": "error", - "sonarjs/no-inverted-boolean-check": "error", - "sonarjs/no-ip-forward": "error", - "sonarjs/no-labels": "error", - "sonarjs/no-literal-call": "error", - "sonarjs/no-mime-sniff": "error", - "sonarjs/no-misleading-array-reverse": "error", - "sonarjs/no-misleading-character-class": "error", - "sonarjs/no-mixed-content": "error", - "sonarjs/no-nested-assignment": "error", - "sonarjs/no-nested-conditional": "error", - "sonarjs/no-nested-functions": "error", - "sonarjs/no-nested-switch": "error", - "sonarjs/no-nested-template-literals": "error", - "sonarjs/no-os-command-from-path": "error", - "sonarjs/no-parameter-reassignment": "error", - "sonarjs/no-primitive-wrappers": "error", - "sonarjs/no-redundant-assignments": "error", - "sonarjs/no-redundant-boolean": "error", - "sonarjs/no-redundant-jump": "error", - "sonarjs/no-redundant-optional": "error", - "sonarjs/no-referrer-policy": "error", - "sonarjs/no-regex-spaces": "error", - "sonarjs/no-same-argument-assert": "error", - "sonarjs/no-same-line-conditional": "error", - "sonarjs/no-selector-parameter": "error", - "sonarjs/no-session-cookies-on-static-assets": "error", - "sonarjs/no-skipped-tests": "error", - "sonarjs/no-small-switch": "error", - "sonarjs/no-table-as-layout": "error", - "sonarjs/no-try-promise": "error", - "sonarjs/no-undefined-argument": "error", - "sonarjs/no-unenclosed-multiline-block": "error", - "sonarjs/no-uniq-key": "error", - "sonarjs/no-unsafe-unzip": "error", - "sonarjs/no-unthrown-error": "error", - "sonarjs/no-unused-collection": "error", - "sonarjs/no-unused-vars": "error", - "sonarjs/no-use-of-empty-return-value": "error", - "sonarjs/no-useless-catch": "error", - "sonarjs/no-useless-increment": "error", - "sonarjs/no-useless-intersection": "error", - "sonarjs/no-useless-react-setstate": "error", - "sonarjs/no-weak-cipher": "error", - "sonarjs/no-weak-keys": "error", - "sonarjs/non-existent-operator": "error", - "sonarjs/null-dereference": "error", - "sonarjs/object-alt-content": "error", - "sonarjs/os-command": "error", - "sonarjs/post-message": "error", - "sonarjs/prefer-default-last": "error", - "sonarjs/prefer-immediate-return": "error", - "sonarjs/prefer-promise-shorthand": "error", - "sonarjs/prefer-read-only-props": "error", - "sonarjs/prefer-regexp-exec": "error", - "sonarjs/prefer-single-boolean-return": "error", - "sonarjs/prefer-type-guard": "error", - "sonarjs/prefer-while": "error", - "sonarjs/production-debug": "error", - "sonarjs/pseudo-random": "error", - "sonarjs/public-static-readonly": "error", - "sonarjs/publicly-writable-directories": "error", - "sonarjs/reduce-initial-value": "error", - "sonarjs/redundant-type-aliases": "error", - "sonarjs/regex-complexity": "error", - "sonarjs/review-blockchain-mnemonic": "error", - "sonarjs/session-regeneration": "error", - "sonarjs/single-char-in-character-classes": "error", - "sonarjs/single-character-alternation": "error", - "sonarjs/slow-regex": "error", - "sonarjs/sql-queries": "error", - "sonarjs/stable-tests": "error", - "sonarjs/stateful-regex": "error", - "sonarjs/strict-transport-security": "error", - "sonarjs/table-header": "error", - "sonarjs/table-header-reference": "error", - "sonarjs/test-check-exception": "error", - "sonarjs/todo-tag": "error", - "sonarjs/unused-import": "error", - "sonarjs/unused-named-groups": "error", - "sonarjs/unverified-certificate": "error", - "sonarjs/unverified-hostname": "error", - "sonarjs/updated-const-var": "error", - "sonarjs/updated-loop-counter": "error", - "sonarjs/use-type-alias": "error", - "sonarjs/void-use": "error", - "sonarjs/weak-ssl": "error", - "sonarjs/x-powered-by": "error", - "sonarjs/xml-parser-xxe": "error", +//#region ../rules/node.ts +const nodeRules = { + "node/global-require": "deny", + "node/handle-callback-err": "allow", + "node/no-exports-assign": "deny", + "node/no-new-require": "deny", + "node/no-path-concat": "deny", + "node/no-process-env": "deny" +}; + +//#endregion +//#region ../rules/oxc.ts +const oxcRules = { + "oxc/approx-constant": "deny", + "oxc/bad-array-method-on-arguments": "deny", + "oxc/bad-bitwise-operator": "deny", + "oxc/bad-char-at-comparison": "deny", + "oxc/bad-comparison-sequence": "deny", + "oxc/bad-min-max-func": "deny", + "oxc/bad-object-literal-comparison": "deny", + "oxc/bad-replace-all-arg": "deny", + "oxc/branches-sharing-code": "warn", + "oxc/const-comparisons": "deny", + "oxc/double-comparisons": "deny", + "oxc/erasing-op": "deny", + "oxc/misrefactored-assign-op": "deny", + "oxc/missing-throw": "deny", + "oxc/no-accumulating-spread": "deny", + "oxc/no-async-await": "allow", + "oxc/no-async-endpoint-handlers": "allow", + "oxc/no-barrel-file": ["deny", { threshold: 100 }], + "oxc/no-const-enum": "deny", + "oxc/no-map-spread": "allow", + "oxc/no-optional-chaining": "allow", + "oxc/no-rest-spread-properties": "allow", + "oxc/no-this-in-exported-function": "deny", + "oxc/number-arg-out-of-range": "deny", + "oxc/only-used-in-recursion": "deny", + "oxc/uninvoked-array-callback": "deny" }; //#endregion //#region ../rules/perfectionist.ts const perfectionistRules = { - "perfectionist/sort-array-includes": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-classes": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-decorators": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-enums": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-export-attributes": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-exports": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-heritage-clauses": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-import-attributes": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-interfaces": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-intersection-types": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-jsx-props": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-maps": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-modules": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-named-exports": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-named-imports": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-object-types": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-objects": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-sets": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-switch-case": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-union-types": [ - "error", - { - order: "asc", - type: "natural", - }, - ], - "perfectionist/sort-variable-declarations": [ - "error", - { - order: "asc", - type: "natural", - }, - ], + "perfectionist/sort-array-includes": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-classes": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-decorators": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-enums": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-export-attributes": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-exports": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-heritage-clauses": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-import-attributes": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-interfaces": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-intersection-types": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-jsx-props": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-maps": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-modules": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-named-exports": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-named-imports": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-object-types": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-objects": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-sets": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-switch-case": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-union-types": ["deny", { + order: "asc", + type: "natural" + }], + "perfectionist/sort-variable-declarations": ["deny", { + order: "asc", + type: "natural" + }] +}; + +//#endregion +//#region ../rules/promise.ts +const promiseRules = { + "promise/always-return": ["deny", { + ignoreAssignmentVariable: ["globalThis"], + ignoreLastCallback: false + }], + "promise/avoid-new": "deny", + "promise/catch-or-return": ["deny", { + allowFinally: false, + allowThen: false, + terminationMethod: ["catch"] + }], + "promise/no-callback-in-promise": ["deny", { + callbacks: [ + "callback", + "cb", + "done", + "next" + ], + exceptions: [], + timeoutsErr: false + }], + "promise/no-multiple-resolved": "deny", + "promise/no-nesting": "deny", + "promise/no-new-statics": "deny", + "promise/no-promise-in-callback": "deny", + "promise/no-return-in-finally": "deny", + "promise/no-return-wrap": ["deny", { allowReject: false }], + "promise/param-names": ["deny", { + rejectPattern: "^_?reject$", + resolvePattern: "^_?resolve$" + }], + "promise/prefer-await-to-callbacks": "allow", + "promise/prefer-await-to-then": ["deny", { strict: true }], + "promise/prefer-catch": "deny", + "promise/spec-only": ["deny", { allowedMethods: [] }], + "promise/valid-params": "deny" }; //#endregion //#region ../rules/typescript.ts +/** Longueur minimale de la description accompagnat une directive (p. ex. `@ts-expect-error`). */ +const MIN_DIRECTIVE_DESCRIPTION_LENGTH = 10; const typeScriptRules = { - "@typescript-eslint/adjacent-overload-signatures": "error", - "@typescript-eslint/array-type": [ - "error", - { - default: "generic", - readonly: "generic", - }, - ], - "@typescript-eslint/await-thenable": "error", - "@typescript-eslint/ban-ts-comment": ["error", { minimumDescriptionLength: 10 }], - "@typescript-eslint/ban-tslint-comment": "error", - "@typescript-eslint/class-literal-property-style": "error", - "@typescript-eslint/consistent-generic-constructors": "error", - "@typescript-eslint/consistent-indexed-object-style": "error", - "@typescript-eslint/consistent-type-assertions": "error", - "@typescript-eslint/consistent-type-definitions": ["error", "type"], - "@typescript-eslint/dot-notation": "error", - "@typescript-eslint/no-array-delete": "error", - "@typescript-eslint/no-base-to-string": "error", - "@typescript-eslint/no-confusing-non-null-assertion": "error", - "@typescript-eslint/no-confusing-void-expression": "error", - "@typescript-eslint/no-deprecated": "error", - "@typescript-eslint/no-duplicate-enum-values": "error", - "@typescript-eslint/no-duplicate-type-constituents": "error", - "@typescript-eslint/no-dynamic-delete": "error", - "@typescript-eslint/no-empty-object-type": "error", - "@typescript-eslint/no-explicit-any": "error", - "@typescript-eslint/no-extra-non-null-assertion": "error", - "@typescript-eslint/no-extraneous-class": "error", - "@typescript-eslint/no-floating-promises": "error", - "@typescript-eslint/no-for-in-array": "error", - "@typescript-eslint/no-implied-eval": "error", - "@typescript-eslint/no-inferrable-types": "error", - "@typescript-eslint/no-invalid-void-type": "error", - "@typescript-eslint/no-meaningless-void-operator": "error", - "@typescript-eslint/no-misused-new": "error", - "@typescript-eslint/no-misused-promises": "error", - "@typescript-eslint/no-misused-spread": "error", - "@typescript-eslint/no-mixed-enums": "error", - "@typescript-eslint/no-namespace": "error", - "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error", - "@typescript-eslint/no-non-null-asserted-optional-chain": "error", - "@typescript-eslint/no-non-null-assertion": "error", - "@typescript-eslint/no-redundant-type-constituents": "error", - "@typescript-eslint/no-require-imports": "error", - "@typescript-eslint/no-this-alias": "error", - "@typescript-eslint/no-unnecessary-condition": "error", - "@typescript-eslint/no-unnecessary-template-expression": "error", - "@typescript-eslint/no-unnecessary-type-arguments": "error", - "@typescript-eslint/no-unnecessary-type-assertion": "error", - "@typescript-eslint/no-unnecessary-type-constraint": "error", - "@typescript-eslint/no-unnecessary-type-conversion": "error", - "@typescript-eslint/no-unsafe-argument": "error", - "@typescript-eslint/no-unsafe-assignment": "error", - "@typescript-eslint/no-unsafe-call": "error", - "@typescript-eslint/no-unsafe-declaration-merging": "error", - "@typescript-eslint/no-unsafe-enum-comparison": "error", - "@typescript-eslint/no-unsafe-function-type": "error", - "@typescript-eslint/no-unsafe-member-access": "error", - "@typescript-eslint/no-unsafe-return": "error", - "@typescript-eslint/no-unsafe-unary-minus": "error", - "@typescript-eslint/no-useless-default-assignment": "error", - "@typescript-eslint/no-wrapper-object-types": "error", - "@typescript-eslint/non-nullable-type-assertion-style": "error", - "@typescript-eslint/prefer-as-const": "error", - "@typescript-eslint/prefer-find": "error", - "@typescript-eslint/prefer-for-of": "error", - "@typescript-eslint/prefer-function-type": "error", - "@typescript-eslint/prefer-includes": "error", - "@typescript-eslint/prefer-literal-enum-member": "error", - "@typescript-eslint/prefer-namespace-keyword": "error", - "@typescript-eslint/prefer-nullish-coalescing": "error", - "@typescript-eslint/prefer-optional-chain": "error", - "@typescript-eslint/prefer-promise-reject-errors": "error", - "@typescript-eslint/prefer-readonly": "error", - "@typescript-eslint/prefer-reduce-type-parameter": "error", - "@typescript-eslint/prefer-regexp-exec": "error", - "@typescript-eslint/prefer-return-this-type": "error", - "@typescript-eslint/prefer-string-starts-ends-with": "error", - "@typescript-eslint/related-getter-setter-pairs": "error", - "@typescript-eslint/require-await": "error", - "@typescript-eslint/restrict-plus-operands": [ - "error", - { - allowAny: false, - allowBoolean: false, - allowNullish: false, - allowNumberAndString: false, - allowRegExp: false, - }, - ], - "@typescript-eslint/restrict-template-expressions": [ - "error", - { - allowAny: false, - allowBoolean: false, - allowNever: false, - allowNullish: false, - allowNumber: false, - allowRegExp: false, - }, - ], - "@typescript-eslint/return-await": ["error", "error-handling-correctness-only"], - "@typescript-eslint/switch-exhaustiveness-check": "error", - "@typescript-eslint/triple-slash-reference": "error", - "@typescript-eslint/unbound-method": "error", - "@typescript-eslint/unified-signatures": "error", - "@typescript-eslint/use-unknown-in-catch-callback-variable": "error", + "typescript/adjacent-overload-signatures": "deny", + "typescript/array-type": ["deny", { + default: "generic", + readonly: "generic" + }], + "typescript/await-thenable": "deny", + "typescript/ban-ts-comment": ["deny", { + minimumDescriptionLength: MIN_DIRECTIVE_DESCRIPTION_LENGTH, + "ts-check": false, + "ts-expect-error": "allow-with-description", + "ts-ignore": true, + "ts-nocheck": true + }], + "typescript/ban-tslint-comment": "deny", + "typescript/class-literal-property-style": ["deny", "fields"], + "typescript/consistent-generic-constructors": ["deny", { option: "constructor" }], + "typescript/consistent-indexed-object-style": ["deny", "record"], + "typescript/consistent-return": ["deny", { treatUndefinedAsUnspecified: false }], + "typescript/consistent-type-assertions": ["deny", { assertionStyle: "never" }], + "typescript/consistent-type-definitions": ["deny", "type"], + "typescript/consistent-type-exports": ["deny", { fixMixedExportsWithInlineTypeSpecifier: false }], + "typescript/consistent-type-imports": ["deny", { + disallowTypeAnnotations: true, + fixStyle: "separate-type-imports", + prefer: "type-imports" + }], + "typescript/dot-notation": ["deny", { + allowIndexSignaturePropertyAccess: false, + allowKeywords: false, + allowPattern: "", + allowPrivateClassPropertyAccess: false, + allowProtectedClassPropertyAccess: false + }], + "typescript/explicit-function-return-type": ["deny", { + allowConciseArrowFunctionExpressionsStartingWithVoid: false, + allowDirectConstAssertionInArrowFunctions: true, + allowedNames: [], + allowExpressions: false, + allowFunctionsWithoutTypeParameters: false, + allowHigherOrderFunctions: true, + allowIIFEs: false, + allowTypedFunctionExpressions: true + }], + "typescript/explicit-module-boundary-types": ["deny", { + allowArgumentsExplicitlyTypedAsAny: false, + allowDirectConstAssertionInArrowFunctions: true, + allowedNames: [], + allowHigherOrderFunctions: true, + allowOverloadFunctions: false, + allowTypedFunctionExpressions: true + }], + "typescript/no-array-delete": "deny", + "typescript/no-base-to-string": ["deny", { + checkUnknown: true, + ignoredTypeNames: [ + "deny", + "RegExp", + "URL", + "URLSearchParams" + ] + }], + "typescript/no-confusing-non-null-assertion": "deny", + "typescript/no-confusing-void-expression": ["deny", { + ignoreArrowShorthand: false, + ignoreVoidOperator: false, + ignoreVoidReturningFunctions: false + }], + "typescript/no-deprecated": "deny", + "typescript/no-duplicate-enum-values": "deny", + "typescript/no-duplicate-type-constituents": ["deny", { + ignoreIntersections: false, + ignoreUnions: false + }], + "typescript/no-dynamic-delete": "deny", + "typescript/no-empty-interface": ["deny", { allowSingleExtends: false }], + "typescript/no-empty-object-type": ["deny", { + allowInterfaces: "never", + allowObjectTypes: "never" + }], + "typescript/no-explicit-any": ["deny", { + fixToUnknown: true, + ignoreRestArgs: false + }], + "typescript/no-extra-non-null-assertion": "deny", + "typescript/no-extraneous-class": ["deny", { + allowConstructorOnly: false, + allowEmpty: false, + allowStaticOnly: false, + allowWithDecorator: false + }], + "typescript/no-floating-promises": ["deny", { + allowForKnownSafeCalls: [], + allowForKnownSafePromises: [], + checkThenables: true, + ignoreIIFE: false, + ignoreVoid: false + }], + "typescript/no-for-in-array": "deny", + "typescript/no-implied-eval": "deny", + "typescript/no-import-type-side-effects": "deny", + "typescript/no-inferrable-types": ["deny", { + ignoreParameters: true, + ignoreProperties: true + }], + "typescript/no-invalid-void-type": ["deny", { + allowAsThisParameter: false, + allowInGenericTypeArguments: true + }], + "typescript/no-meaningless-void-operator": ["deny", { checkNever: true }], + "typescript/no-misused-new": "deny", + "typescript/no-misused-promises": ["deny", { + checksConditionals: true, + checksSpreads: true, + checksVoidReturn: true + }], + "typescript/no-misused-spread": ["deny", { allow: [] }], + "typescript/no-mixed-enums": "deny", + "typescript/no-namespace": ["deny", { + allowDeclarations: false, + allowDefinitionFiles: true + }], + "typescript/no-non-null-asserted-nullish-coalescing": "deny", + "typescript/no-non-null-asserted-optional-chain": "deny", + "typescript/no-non-null-assertion": "deny", + "typescript/no-redundant-type-constituents": "deny", + "typescript/no-require-imports": ["deny", { + allow: [], + allowAsImport: false + }], + "typescript/no-this-alias": ["deny", { + allowDestructuring: false, + allowedNames: [] + }], + "typescript/no-unnecessary-boolean-literal-compare": "allow", + "typescript/no-unnecessary-condition": ["deny", { + allowConstantLoopConditions: "never", + checkTypePredicates: true + }], + "typescript/no-unnecessary-parameter-property-assignment": "deny", + "typescript/no-unnecessary-qualifier": "deny", + "typescript/no-unnecessary-template-expression": "deny", + "typescript/no-unnecessary-type-arguments": "deny", + "typescript/no-unnecessary-type-assertion": ["deny", { + checkLiteralConstAssertions: false, + typesToIgnore: [] + }], + "typescript/no-unnecessary-type-constraint": "deny", + "typescript/no-unnecessary-type-conversion": "deny", + "typescript/no-unnecessary-type-parameters": "deny", + "typescript/no-unsafe-argument": "deny", + "typescript/no-unsafe-assignment": "deny", + "typescript/no-unsafe-call": "deny", + "typescript/no-unsafe-declaration-merging": "deny", + "typescript/no-unsafe-enum-comparison": "deny", + "typescript/no-unsafe-function-type": "deny", + "typescript/no-unsafe-member-access": ["deny", { allowOptionalChaining: false }], + "typescript/no-unsafe-return": "deny", + "typescript/no-unsafe-type-assertion": "deny", + "typescript/no-unsafe-unary-minus": "deny", + "typescript/no-useless-default-assignment": "deny", + "typescript/no-useless-empty-export": "deny", + "typescript/no-wrapper-object-types": "deny", + "typescript/non-nullable-type-assertion-style": "allow", + "typescript/only-throw-error": ["deny", { + allow: [], + allowRethrowing: true, + allowThrowingAny: false, + allowThrowingUnknown: false + }], + "typescript/parameter-properties": ["deny", { prefer: "class-property" }], + "typescript/prefer-as-const": "deny", + "typescript/prefer-enum-initializers": "deny", + "typescript/prefer-find": "deny", + "typescript/prefer-for-of": "deny", + "typescript/prefer-function-type": "deny", + "typescript/prefer-includes": "deny", + "typescript/prefer-literal-enum-member": ["deny", { allowBitwiseExpressions: false }], + "typescript/prefer-nullish-coalescing": ["deny", { + ignoreBooleanCoercion: false, + ignoreConditionalTests: true, + ignoreIfStatements: false, + ignoreMixedLogicalExpressions: false, + ignorePrimitives: false, + ignoreTernaryTests: false + }], + "typescript/prefer-optional-chain": ["deny", { + checkAny: true, + checkBigInt: true, + checkBoolean: true, + checkNumber: true, + checkString: true, + checkUnknown: true, + requireNullish: false + }], + "typescript/prefer-promise-reject-errors": ["deny", { + allowEmptyReject: false, + allowThrowingAny: false, + allowThrowingUnknown: false + }], + "typescript/prefer-readonly": ["deny", { onlyInlineLambdas: false }], + "typescript/prefer-readonly-parameter-types": ["allow", { + allow: [], + checkParameterProperties: true, + ignoreInferredTypes: true, + treatMethodsAsReadonly: false + }], + "typescript/prefer-reduce-type-parameter": "deny", + "typescript/prefer-regexp-exec": "deny", + "typescript/prefer-return-this-type": "deny", + "typescript/prefer-string-starts-ends-with": ["deny", { allowSingleElementEquality: "never" }], + "typescript/prefer-ts-expect-error": "allow", + "typescript/promise-function-async": ["deny", { + allowAny: false, + allowedPromiseNames: [], + checkArrowFunctions: true, + checkFunctionDeclarations: true, + checkFunctionExpressions: true, + checkMethodDeclarations: true + }], + "typescript/related-getter-setter-pairs": "deny", + "typescript/require-array-sort-compare": ["deny", { ignoreStringArrays: true }], + "typescript/require-await": "deny", + "typescript/restrict-plus-operands": ["deny", { + allowAny: false, + allowBoolean: false, + allowNullish: false, + allowNumberAndString: false, + allowRegExp: false + }], + "typescript/restrict-template-expressions": ["deny", { + allow: [{ + from: "lib", + name: [ + "Error", + "URL", + "URLSearchParams" + ] + }], + allowAny: false, + allowBoolean: false, + allowNever: false, + allowNullish: false, + allowNumber: false, + allowRegExp: false + }], + "typescript/return-await": ["deny", "error-handling-correctness-only"], + "typescript/strict-boolean-expressions": ["deny", { + allowAny: false, + allowNullableBoolean: true, + allowNullableEnum: true, + allowNullableNumber: false, + allowNullableObject: false, + allowNullableString: false, + allowNumber: false, + allowString: false + }], + "typescript/strict-void-return": ["deny", { allowReturnAny: false }], + "typescript/switch-exhaustiveness-check": ["deny", { + allowDefaultCaseForExhaustiveSwitch: true, + considerDefaultExhaustiveForUnions: false, + defaultCaseCommentPattern: "@skip-exhaustive-check", + requireDefaultForNonUnion: false + }], + "typescript/triple-slash-reference": ["deny", { + lib: "never", + path: "never", + types: "prefer-import" + }], + "typescript/unbound-method": ["deny", { ignoreStatic: false }], + "typescript/unified-signatures": ["deny", { + ignoreDifferentlyNamedParameters: false, + ignoreOverloadsWithDifferentJSDoc: false + }], + "typescript/use-unknown-in-catch-callback-variable": "deny" }; //#endregion //#region ../rules/unicorn.ts const unicornRules = { - "unicorn/catch-error-name": "error", - "unicorn/consistent-date-clone": "error", - "unicorn/consistent-empty-array-spread": "error", - "unicorn/consistent-existence-index-check": "error", - "unicorn/custom-error-definition": "error", - "unicorn/error-message": "error", - "unicorn/escape-case": "error", - "unicorn/explicit-length-check": ["error", { "non-zero": "not-equal" }], - "unicorn/new-for-builtins": "error", - "unicorn/no-abusive-eslint-disable": "error", - "unicorn/no-accessor-recursion": "error", - "unicorn/no-anonymous-default-export": "error", - "unicorn/no-array-method-this-argument": "error", - "unicorn/no-array-reverse": "error", - "unicorn/no-array-sort": "error", - "unicorn/no-await-in-promise-methods": "error", - "unicorn/no-console-spaces": "error", - "unicorn/no-document-cookie": "error", - "unicorn/no-empty-file": "error", - "unicorn/no-hex-escape": "error", - "unicorn/no-instanceof-builtins": "error", - "unicorn/no-invalid-fetch-options": "error", - "unicorn/no-invalid-remove-event-listener": "error", - "unicorn/no-lonely-if": "error", - "unicorn/no-magic-array-flat-depth": "error", - "unicorn/no-negated-condition": "error", - "unicorn/no-negation-in-equality-check": "error", - "unicorn/no-nested-ternary": "error", - "unicorn/no-new-array": "error", - "unicorn/no-new-buffer": "error", - "unicorn/no-null": "error", - "unicorn/no-object-as-default-parameter": "error", - "unicorn/no-process-exit": "error", - "unicorn/no-single-promise-in-promise-methods": "error", - "unicorn/no-static-only-class": "error", - "unicorn/no-thenable": "error", - "unicorn/no-this-assignment": "error", - "unicorn/no-typeof-undefined": "error", - "unicorn/no-unnecessary-array-flat-depth": "error", - "unicorn/no-unnecessary-array-splice-count": "error", - "unicorn/no-unnecessary-await": "error", - "unicorn/no-unnecessary-slice-end": "error", - "unicorn/no-unreadable-array-destructuring": "error", - "unicorn/no-unreadable-iife": "error", - "unicorn/no-useless-collection-argument": "error", - "unicorn/no-useless-error-capture-stack-trace": "error", - "unicorn/no-useless-fallback-in-spread": "error", - "unicorn/no-useless-length-check": "error", - "unicorn/no-useless-promise-resolve-reject": "error", - "unicorn/no-useless-spread": "error", - "unicorn/no-useless-switch-case": "error", - "unicorn/no-useless-undefined": "error", - "unicorn/no-zero-fractions": "error", - "unicorn/number-literal-case": "error", - "unicorn/numeric-separators-style": "error", - "unicorn/prefer-add-event-listener": "error", - "unicorn/prefer-array-find": "error", - "unicorn/prefer-array-flat": "error", - "unicorn/prefer-array-flat-map": "error", - "unicorn/prefer-array-index-of": "error", - "unicorn/prefer-array-some": "error", - "unicorn/prefer-at": "error", - "unicorn/prefer-bigint-literals": "error", - "unicorn/prefer-blob-reading-methods": "error", - "unicorn/prefer-class-fields": "error", - "unicorn/prefer-classlist-toggle": "error", - "unicorn/prefer-code-point": "error", - "unicorn/prefer-date-now": "error", - "unicorn/prefer-default-parameters": "error", - "unicorn/prefer-dom-node-append": "error", - "unicorn/prefer-dom-node-remove": "error", - "unicorn/prefer-dom-node-text-content": "error", - "unicorn/prefer-event-target": "error", - "unicorn/prefer-global-this": "error", - "unicorn/prefer-includes": "error", - "unicorn/prefer-keyboard-event-key": "error", - "unicorn/prefer-logical-operator-over-ternary": "error", - "unicorn/prefer-math-min-max": "error", - "unicorn/prefer-math-trunc": "error", - "unicorn/prefer-modern-dom-apis": "error", - "unicorn/prefer-modern-math-apis": "error", - "unicorn/prefer-module": "error", - "unicorn/prefer-native-coercion-functions": "error", - "unicorn/prefer-negative-index": "error", - "unicorn/prefer-node-protocol": "error", - "unicorn/prefer-number-properties": "error", - "unicorn/prefer-object-from-entries": "error", - "unicorn/prefer-optional-catch-binding": "error", - "unicorn/prefer-prototype-methods": "error", - "unicorn/prefer-reflect-apply": "error", - "unicorn/prefer-regexp-test": "error", - "unicorn/prefer-response-static-json": "error", - "unicorn/prefer-set-has": "error", - "unicorn/prefer-set-size": "error", - "unicorn/prefer-string-raw": "error", - "unicorn/prefer-string-replace-all": "error", - "unicorn/prefer-string-slice": "error", - "unicorn/prefer-string-starts-ends-with": "error", - "unicorn/prefer-string-trim-start-end": "error", - "unicorn/prefer-structured-clone": "error", - "unicorn/prefer-ternary": "off", - "unicorn/prefer-top-level-await": "error", - "unicorn/prefer-type-error": "error", - "unicorn/relative-url-style": "error", - "unicorn/require-array-join-separator": "error", - "unicorn/require-module-attributes": "error", - "unicorn/require-module-specifiers": "error", - "unicorn/require-number-to-fixed-digits-argument": "error", - "unicorn/text-encoding-identifier-case": "error", - "unicorn/throw-new-error": "error", + "unicorn/catch-error-name": ["deny", { ignore: ["_"] }], + "unicorn/consistent-assert": "deny", + "unicorn/consistent-date-clone": "deny", + "unicorn/consistent-empty-array-spread": "deny", + "unicorn/consistent-existence-index-check": "deny", + "unicorn/consistent-function-scoping": ["deny", { checkArrowFunctions: true }], + "unicorn/custom-error-definition": "deny", + "unicorn/empty-brace-spaces": "deny", + "unicorn/error-message": "deny", + "unicorn/escape-case": "deny", + "unicorn/explicit-length-check": ["deny", { "non-zero": "not-equal" }], + "unicorn/filename-case": ["deny", { + case: "kebabCase", + ignore: "", + multipleFileExtensions: true + }], + "unicorn/new-for-builtins": "deny", + "unicorn/no-abusive-eslint-disable": "deny", + "unicorn/no-accessor-recursion": "deny", + "unicorn/no-anonymous-default-export": "deny", + "unicorn/no-array-callback-reference": "allow", + "unicorn/no-array-for-each": "allow", + "unicorn/no-array-method-this-argument": "allow", + "unicorn/no-array-reduce": "allow", + "unicorn/no-array-reverse": ["deny", { allowExpressionStatement: false }], + "unicorn/no-array-sort": ["deny", { allowExpressionStatement: false }], + "unicorn/no-await-expression-member": "deny", + "unicorn/no-await-in-promise-methods": "deny", + "unicorn/no-console-spaces": "deny", + "unicorn/no-document-cookie": "deny", + "unicorn/no-empty-file": "deny", + "unicorn/no-hex-escape": "deny", + "unicorn/no-immediate-mutation": "deny", + "unicorn/no-instanceof-array": "deny", + "unicorn/no-instanceof-builtins": ["deny", { + exlude: [], + include: [], + strategy: "strict", + useErrorIsError: true + }], + "unicorn/no-invalid-fetch-options": "deny", + "unicorn/no-invalid-remove-event-listener": "deny", + "unicorn/no-length-as-slice-end": "deny", + "unicorn/no-lonely-if": "deny", + "unicorn/no-magic-array-flat-depth": "deny", + "unicorn/no-negated-condition": "deny", + "unicorn/no-negation-in-equality-check": "deny", + "unicorn/no-nested-ternary": "deny", + "unicorn/no-new-array": "deny", + "unicorn/no-new-buffer": "deny", + "unicorn/no-null": ["deny", { checkStrictEquality: true }], + "unicorn/no-object-as-default-parameter": "deny", + "unicorn/no-process-exit": "deny", + "unicorn/no-single-promise-in-promise-methods": "deny", + "unicorn/no-static-only-class": "deny", + "unicorn/no-thenable": "deny", + "unicorn/no-this-assignment": "deny", + "unicorn/no-typeof-undefined": "deny", + "unicorn/no-unnecessary-array-flat-depth": "deny", + "unicorn/no-unnecessary-array-splice-count": "deny", + "unicorn/no-unnecessary-await": "deny", + "unicorn/no-unnecessary-slice-end": "deny", + "unicorn/no-unreadable-array-destructuring": "deny", + "unicorn/no-unreadable-iife": "deny", + "unicorn/no-useless-collection-argument": "deny", + "unicorn/no-useless-error-capture-stack-trace": "deny", + "unicorn/no-useless-fallback-in-spread": "deny", + "unicorn/no-useless-length-check": "deny", + "unicorn/no-useless-promise-resolve-reject": ["deny", { allowReject: false }], + "unicorn/no-useless-spread": "deny", + "unicorn/no-useless-switch-case": "deny", + "unicorn/no-useless-undefined": "deny", + "unicorn/no-zero-fractions": "deny", + "unicorn/number-literal-case": "deny", + "unicorn/numeric-separators-style": ["deny", { + binary: { + groupLength: 3, + minimumDigits: 4 + }, + hexadecimal: { + groupLength: 3, + minimumDigits: 4 + }, + number: { + groupLength: 3, + minimumDigits: 4 + }, + octal: { + groupLength: 3, + minimumDigits: 4 + }, + onlyIfContainsSeparator: false + }], + "unicorn/prefer-add-event-listener": "deny", + "unicorn/prefer-array-find": "deny", + "unicorn/prefer-array-flat": "deny", + "unicorn/prefer-array-flat-map": "deny", + "unicorn/prefer-array-index-of": "deny", + "unicorn/prefer-array-some": "deny", + "unicorn/prefer-at": ["deny", { + checkAllIndexAccess: true, + getLastElementFunctions: [] + }], + "unicorn/prefer-bigint-literals": "deny", + "unicorn/prefer-blob-reading-methods": "deny", + "unicorn/prefer-class-fields": "deny", + "unicorn/prefer-classlist-toggle": "deny", + "unicorn/prefer-code-point": "deny", + "unicorn/prefer-date-now": "deny", + "unicorn/prefer-default-parameters": "deny", + "unicorn/prefer-dom-node-append": "deny", + "unicorn/prefer-dom-node-dataset": "allow", + "unicorn/prefer-dom-node-remove": "deny", + "unicorn/prefer-dom-node-text-content": "deny", + "unicorn/prefer-event-target": "deny", + "unicorn/prefer-global-this": "deny", + "unicorn/prefer-includes": "deny", + "unicorn/prefer-keyboard-event-key": "deny", + "unicorn/prefer-logical-operator-over-ternary": "deny", + "unicorn/prefer-math-min-max": "deny", + "unicorn/prefer-math-trunc": "deny", + "unicorn/prefer-modern-dom-apis": "deny", + "unicorn/prefer-modern-math-apis": "deny", + "unicorn/prefer-module": "deny", + "unicorn/prefer-native-coercion-functions": "deny", + "unicorn/prefer-negative-index": "deny", + "unicorn/prefer-node-protocol": "deny", + "unicorn/prefer-number-properties": ["deny", { + checkInfinity: true, + checkNaN: true + }], + "unicorn/prefer-object-from-entries": "deny", + "unicorn/prefer-optional-catch-binding": "deny", + "unicorn/prefer-prototype-methods": "deny", + "unicorn/prefer-query-selector": "deny", + "unicorn/prefer-reflect-apply": "deny", + "unicorn/prefer-regexp-test": "deny", + "unicorn/prefer-response-static-json": "deny", + "unicorn/prefer-set-has": "deny", + "unicorn/prefer-set-size": "deny", + "unicorn/prefer-spread": "deny", + "unicorn/prefer-string-raw": "deny", + "unicorn/prefer-string-replace-all": "deny", + "unicorn/prefer-string-slice": "deny", + "unicorn/prefer-string-starts-ends-with": "deny", + "unicorn/prefer-string-trim-start-end": "deny", + "unicorn/prefer-structured-clone": "deny", + "unicorn/prefer-ternary": "allow", + "unicorn/prefer-top-level-await": "deny", + "unicorn/prefer-type-error": "deny", + "unicorn/relative-url-style": ["deny", "always"], + "unicorn/require-array-join-separator": "deny", + "unicorn/require-module-attributes": "deny", + "unicorn/require-module-specifiers": "deny", + "unicorn/require-number-to-fixed-digits-argument": "deny", + "unicorn/require-post-message-target-origin": "deny", + "unicorn/switch-case-braces": ["deny", "avoid"], + "unicorn/switch-case-break-position": "deny", + "unicorn/text-encoding-identifier-case": "deny", + "unicorn/throw-new-error": "deny" }; //#endregion //#region ../index.ts const config = defineConfig({ - categories: { - correctness: "off", - nursery: "off", - pedantic: "off", - perf: "off", - style: "off", - suspicious: "off", - }, - env: { - browser: true, - builtin: true, - es2026: true, - node: true, - }, - ignorePatterns: [".astro", ".cache", "dist/**/*"], - jsPlugins: ["eslint-plugin-functional", "eslint-plugin-perfectionist", "eslint-plugin-sonarjs"], - options: { - reportUnusedDisableDirectives: "warn", - typeAware: true, - typeCheck: false, - }, - overrides: [astroConfig], - plugins: ["import", "jsdoc", "node", "oxc", "promise", "typescript", "unicorn"], - rules: { - ...esLintRules, - ...functionalRules, - ...jsDocRules, - ...sonarJsRules, - ...perfectionistRules, - ...typeScriptRules, - ...unicornRules, - }, - settings: {}, + categories: { + correctness: "off", + nursery: "off", + pedantic: "off", + perf: "off", + style: "off", + suspicious: "off" + }, + env: { + browser: true, + builtin: true, + es2026: true, + node: true + }, + ignorePatterns: [ + ".astro", + ".cache", + "dist/**/*" + ], + jsPlugins: ["eslint-plugin-functional", "eslint-plugin-perfectionist"], + options: { + reportUnusedDisableDirectives: "warn", + typeAware: true, + typeCheck: false + }, + overrides: [astroConfig], + plugins: [ + "import", + "jsdoc", + "node", + "oxc", + "promise", + "typescript", + "unicorn" + ], + rules: { + ...esLintRules, + ...functionalRules, + ...importRules, + ...jsDocRules, + ...nodeRules, + ...oxcRules, + ...perfectionistRules, + ...promiseRules, + ...typeScriptRules, + ...unicornRules + }, + settings: {} }); //#endregion -export { config as default }; +export { config as default }; \ No newline at end of file diff --git a/index.ts b/index.ts index cf0b2fe..ef96def 100644 --- a/index.ts +++ b/index.ts @@ -1,13 +1,17 @@ -import { defineConfig } from "oxlint"; import type { OxlintConfig } from "oxlint"; -import astroConfig from "./rules/astro"; -import functionalRules from "./rules/functional"; -import esLintRules from "./rules/eslint"; -import jsDocRules from "./rules/jsdoc"; -import sonarJsRules from "./rules/sonarjs"; -import perfectionistRules from "./rules/perfectionist"; -import typeScriptRules from "./rules/typescript"; -import unicornRules from "./rules/unicorn"; +import { defineConfig } from "oxlint"; + +import astroConfig from "./rules/astro.ts"; +import esLintRules from "./rules/eslint.ts"; +import functionalRules from "./rules/functional.ts"; +import importRules from "./rules/import.ts"; +import jsDocRules from "./rules/jsdoc.ts"; +import nodeRules from "./rules/node.ts"; +import oxcRules from "./rules/oxc.ts"; +import perfectionistRules from "./rules/perfectionist.ts"; +import promiseRules from "./rules/promise.ts"; +import typeScriptRules from "./rules/typescript.ts"; +import unicornRules from "./rules/unicorn.ts"; const config: OxlintConfig = defineConfig({ categories: { @@ -25,7 +29,7 @@ const config: OxlintConfig = defineConfig({ node: true, }, ignorePatterns: [".astro", ".cache", "dist/**/*"], - jsPlugins: ["eslint-plugin-functional", "eslint-plugin-perfectionist", "eslint-plugin-sonarjs"], + jsPlugins: ["eslint-plugin-functional", "eslint-plugin-perfectionist"], options: { reportUnusedDisableDirectives: "warn", typeAware: true, @@ -36,9 +40,12 @@ const config: OxlintConfig = defineConfig({ rules: { ...esLintRules, ...functionalRules, + ...importRules, ...jsDocRules, - ...sonarJsRules, + ...nodeRules, + ...oxcRules, ...perfectionistRules, + ...promiseRules, ...typeScriptRules, ...unicornRules, }, diff --git a/justfile b/justfile index 5fe63b9..b2cc575 100644 --- a/justfile +++ b/justfile @@ -48,3 +48,7 @@ clean: rm -rf bun.lock rm -rf node_modules/ rm -rfv dist/ + +# Teste les règles à la mise à jour des fichiers sources. +watch: + watchexec --watch "./rules/" just build lint-js diff --git a/package.json b/package.json index c109853..8d3af16 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gcch/configuration-oxlint", - "version": "0.0.1", + "version": "0.0.3", "type": "module", "description": "Configuration Oxlint partageable pour gcch.", "main": "./dist/index.mjs", @@ -15,32 +15,27 @@ "eslint-plugin-astro": "^1.6.0", "eslint-plugin-functional": "^9.0.4", "eslint-plugin-jsx-a11y": "^6.10.2", - "eslint-plugin-perfectionist": "^5.7.0", - "eslint-plugin-sonarjs": "^4.0.2", - "oxlint": "^1.58.0", - "oxlint-tsgolint": "^0.19.0", + "eslint-plugin-perfectionist": "^5.8.0", + "oxlint": "^1.59.0", + "oxlint-tsgolint": "^0.20.0", "typescript": "^6.0.2" }, "dependencies": { + "eslint-plugin-astro": "^1.6.0", + "eslint-plugin-functional": "^9.0.4", + "eslint-plugin-jsx-a11y": "^6.10.2", + "eslint-plugin-perfectionist": "^5.8.0", "globals": "^17.4.0", - "oxlint": "^1.58.0", - "oxlint-tsgolint": "^0.19.0" - }, - "optionalDependencies": { - "eslint-plugin-astro": "^1.6.0" + "oxlint": "^1.59.0", + "oxlint-tsgolint": "^0.20.0" }, "devDependencies": { "@arethetypeswrong/core": "^0.18.2", "@gcch/configuration-eslint": "git+https://git.gcch.fr/gcch/configuration-eslint#c0620280e6", "@gcch/configuration-prettier": "git+https://git.gcch.fr/gcch/configuration-prettier#91d4573bff", "@types/bun": "^1.3.11", - "@types/node": "^25.5.0", - "eslint-plugin-astro": "^1.6.0", - "eslint-plugin-functional": "^9.0.4", - "eslint-plugin-jsx-a11y": "^6.10.2", - "eslint-plugin-perfectionist": "^5.7.0", - "eslint-plugin-sonarjs": "^4.0.2", - "knip": "^6.1.1", + "@types/node": "^25.5.2", + "knip": "^6.3.0", "prettier": "^3.8.1", "publint": "^0.3.18", "tsdown": "^0.21.7", diff --git a/rules/astro.ts b/rules/astro.ts index 60ea076..793dae7 100644 --- a/rules/astro.ts +++ b/rules/astro.ts @@ -7,70 +7,70 @@ const astroConfig: OxlintOverride = { files: ["**/*.astro"], jsPlugins: ["eslint-plugin-astro"], rules: { - "astro/jsx-a11y/alt-text": "error", - "astro/jsx-a11y/anchor-ambiguous-text": "error", - "astro/jsx-a11y/anchor-has-content": "error", - "astro/jsx-a11y/anchor-is-valid": "error", - "astro/jsx-a11y/aria-activedescendant-has-tabindex": "error", - "astro/jsx-a11y/aria-props": "error", - "astro/jsx-a11y/aria-proptypes": "error", - "astro/jsx-a11y/aria-role": "error", - "astro/jsx-a11y/aria-unsupported-elements": "error", - "astro/jsx-a11y/autocomplete-valid": "error", - "astro/jsx-a11y/click-events-have-key-events": "error", - "astro/jsx-a11y/control-has-associated-label": "error", - "astro/jsx-a11y/heading-has-content": "error", - "astro/jsx-a11y/html-has-lang": "error", - "astro/jsx-a11y/iframe-has-title": "error", - "astro/jsx-a11y/img-redundant-alt": "error", - "astro/jsx-a11y/interactive-supports-focus": "error", - "astro/jsx-a11y/label-has-associated-control": "error", - "astro/jsx-a11y/lang": "error", - "astro/jsx-a11y/media-has-caption": "error", - "astro/jsx-a11y/mouse-events-have-key-events": "error", - "astro/jsx-a11y/no-access-key": "error", - "astro/jsx-a11y/no-aria-hidden-on-focusable": "error", - "astro/jsx-a11y/no-autofocus": "error", - "astro/jsx-a11y/no-distracting-elements": "error", - "astro/jsx-a11y/no-interactive-element-to-noninteractive-role": "error", - "astro/jsx-a11y/no-noninteractive-element-interactions": "error", - "astro/jsx-a11y/no-noninteractive-element-to-interactive-role": "error", - "astro/jsx-a11y/no-noninteractive-tabindex": "error", - "astro/jsx-a11y/no-redundant-roles": "error", - "astro/jsx-a11y/no-static-element-interactions": "error", - "astro/jsx-a11y/prefer-tag-over-role": "error", - "astro/jsx-a11y/role-has-required-aria-props": "error", - "astro/jsx-a11y/role-supports-aria-props": "error", - "astro/jsx-a11y/scope": "error", - "astro/jsx-a11y/tabindex-no-positive": "error", - "astro/missing-client-only-directive-value": "error", - "astro/no-conflict-set-directives": "error", - "astro/no-deprecated-astro-canonicalurl": "error", - "astro/no-deprecated-astro-fetchcontent": "error", - "astro/no-deprecated-astro-resolve": "error", - "astro/no-deprecated-getentrybyslug": "error", - "astro/no-exports-from-components": "error", - "astro/no-set-html-directive": "error", - "astro/no-set-text-directive": "error", - "astro/no-unused-css-selector": "error", - "astro/no-unused-define-vars-in-style": "error", - "astro/prefer-class-list-directive": "error", - "astro/prefer-object-class-list": "error", + "astro/jsx-a11y/alt-text": "deny", + "astro/jsx-a11y/anchor-ambiguous-text": "deny", + "astro/jsx-a11y/anchor-has-content": "deny", + "astro/jsx-a11y/anchor-is-valid": "deny", + "astro/jsx-a11y/aria-activedescendant-has-tabindex": "deny", + "astro/jsx-a11y/aria-props": "deny", + "astro/jsx-a11y/aria-proptypes": "deny", + "astro/jsx-a11y/aria-role": "deny", + "astro/jsx-a11y/aria-unsupported-elements": "deny", + "astro/jsx-a11y/autocomplete-valid": "deny", + "astro/jsx-a11y/click-events-have-key-events": "deny", + "astro/jsx-a11y/control-has-associated-label": "deny", + "astro/jsx-a11y/heading-has-content": "deny", + "astro/jsx-a11y/html-has-lang": "deny", + "astro/jsx-a11y/iframe-has-title": "deny", + "astro/jsx-a11y/img-redundant-alt": "deny", + "astro/jsx-a11y/interactive-supports-focus": "deny", + "astro/jsx-a11y/label-has-associated-control": "deny", + "astro/jsx-a11y/lang": "deny", + "astro/jsx-a11y/media-has-caption": "deny", + "astro/jsx-a11y/mouse-events-have-key-events": "deny", + "astro/jsx-a11y/no-access-key": "deny", + "astro/jsx-a11y/no-aria-hidden-on-focusable": "deny", + "astro/jsx-a11y/no-autofocus": "deny", + "astro/jsx-a11y/no-distracting-elements": "deny", + "astro/jsx-a11y/no-interactive-element-to-noninteractive-role": "deny", + "astro/jsx-a11y/no-noninteractive-element-interactions": "deny", + "astro/jsx-a11y/no-noninteractive-element-to-interactive-role": "deny", + "astro/jsx-a11y/no-noninteractive-tabindex": "deny", + "astro/jsx-a11y/no-redundant-roles": "deny", + "astro/jsx-a11y/no-static-element-interactions": "deny", + "astro/jsx-a11y/prefer-tag-over-role": "deny", + "astro/jsx-a11y/role-has-required-aria-props": "deny", + "astro/jsx-a11y/role-supports-aria-props": "deny", + "astro/jsx-a11y/scope": "deny", + "astro/jsx-a11y/tabindex-no-positive": "deny", + "astro/missing-client-only-directive-value": "deny", + "astro/no-conflict-set-directives": "deny", + "astro/no-deprecated-astro-canonicalurl": "deny", + "astro/no-deprecated-astro-fetchcontent": "deny", + "astro/no-deprecated-astro-resolve": "deny", + "astro/no-deprecated-getentrybyslug": "deny", + "astro/no-exports-from-components": "deny", + "astro/no-set-html-directive": "deny", + "astro/no-set-text-directive": "deny", + "astro/no-unused-css-selector": "deny", + "astro/no-unused-define-vars-in-style": "deny", + "astro/prefer-class-list-directive": "deny", + "astro/prefer-object-class-list": "deny", "astro/prefer-split-class-list": [ - "error", + "deny", { splitLiteral: false, }, ], "astro/sort-attributes": [ - "error", + "deny", { ignoreCase: false, order: "asc", type: "alphabetical", }, ], - "astro/valid-compile": "error", + "astro/valid-compile": "deny", }, }; diff --git a/rules/eslint.ts b/rules/eslint.ts index 1dda2ad..c9f344a 100644 --- a/rules/eslint.ts +++ b/rules/eslint.ts @@ -52,7 +52,17 @@ const esLintRules: DummyRuleMap = { }, ], "eslint/guard-for-in": "deny", - "eslint/id-length": "deny", + "eslint/id-length": [ + "deny", + { + checkGeneric: true, + exceptionPatterns: [], + exceptions: ["_"], + max: 100_000_000, + min: 2, + properties: "always", + }, + ], "eslint/init-declarations": ["deny", "always"], "eslint/new-cap": [ "deny", @@ -266,6 +276,7 @@ const esLintRules: DummyRuleMap = { "deny", { args: "all", + argsIgnorePattern: "^_", caughtErrors: "all", fix: { ignoreClassWithStaticInitBlock: false, diff --git a/rules/functional.ts b/rules/functional.ts index 0535549..95d179c 100644 --- a/rules/functional.ts +++ b/rules/functional.ts @@ -1,12 +1,12 @@ import type { DummyRuleMap } from "oxlint"; const functionalRules: DummyRuleMap = { - "functional/immutable-data": "error", - "functional/no-let": "error", - "functional/no-throw-statements": "error", - "functional/no-try-statements": "error", - "functional/prefer-property-signatures": "error", - "functional/readonly-type": ["error", "generic"], + "functional/immutable-data": "deny", + "functional/no-let": "deny", + "functional/no-throw-statements": "deny", + "functional/no-try-statements": "deny", + "functional/prefer-property-signatures": "deny", + "functional/readonly-type": ["deny", "generic"], }; export default functionalRules; diff --git a/rules/import.ts b/rules/import.ts new file mode 100644 index 0000000..3b5fa16 --- /dev/null +++ b/rules/import.ts @@ -0,0 +1,111 @@ +import type { DummyRuleMap } from "oxlint"; + +const MAX_DEPTH = 4_294_967_295; + +const importRules: DummyRuleMap = { + "import/consistent-type-specifier-style": ["deny", "prefer-top-level"], + "import/default": "deny", + "import/export": "deny", + "import/exports-last": "deny", + "import/extensions": [ + "deny", + "always", + { + checkTypeImports: true, + ignorePackages: true, + }, + ], + "import/first": ["deny", "absolute-first"], + "import/group-exports": "deny", + "import/max-dependencies": "allow", + "import/named": "deny", + "import/namespace": [ + "deny", + { + allowComputed: false, + }, + ], + "import/no-absolute-path": [ + "deny", + { + amd: false, + commonjs: true, + esmodule: true, + }, + ], + "import/no-amd": "deny", + "import/no-anonymous-default-export": [ + "deny", + { + allowAnonymousClass: false, + allowAnonymousFunction: false, + allowArray: false, + allowArrowFunction: false, + allowCallExpression: false, + allowLiteral: false, + allowNew: false, + allowObject: false, + }, + ], + "import/no-commonjs": [ + "deny", + { + allowConditionalRequire: false, + allowPrimitiveModules: false, + allowRequire: false, + }, + ], + "import/no-cycle": [ + "deny", + { + allowUnsafeDynamicCyclicDependency: false, + ignoreExternal: false, + ignoreTypes: true, + maxDepth: MAX_DEPTH, + }, + ], + // J'aime les exports par défaut. + "import/no-default-export": "allow", + "import/no-duplicates": [ + "deny", + { + considerQueryString: true, + preferInline: false, + }, + ], + "import/no-dynamic-require": [ + "deny", + { + esmodule: true, + }, + ], + "import/no-empty-named-blocks": "deny", + "import/no-mutable-exports": "deny", + "import/no-named-as-default": "deny", + "import/no-named-as-default-member": "deny", + "import/no-named-default": "deny", + /** + * Prohibit named exports. + * + * Named exports require strict identifier matching and can lead to fragile imports, while default exports enforce a + * single, consistent module entry point. + * + * Activer cette règle empêche l'existence de multiples exports au sein d'un module. + */ + "import/no-named-export": "allow", + "import/no-namespace": "deny", + "import/no-nodejs-modules": "allow", + "import/no-relative-parent-imports": "allow", + "import/no-self-import": "deny", + "import/no-unassigned-import": "deny", + "import/no-webpack-loader-syntax": "deny", + "import/prefer-default-export": [ + "deny", + { + target: "single", + }, + ], + "import/unambiguous": "deny", +}; + +export default importRules; diff --git a/rules/jsdoc.ts b/rules/jsdoc.ts index 937112c..e07a93e 100644 --- a/rules/jsdoc.ts +++ b/rules/jsdoc.ts @@ -7,20 +7,50 @@ const jsDocRules: DummyRuleMap = { "warn", { definedTags: ["link"], + typed: true, }, ], "jsdoc/empty-tags": "warn", "jsdoc/implements-on-classes": "warn", - "jsdoc/no-defaults": "warn", - "jsdoc/require-param": "warn", + "jsdoc/no-defaults": ["warn", { noOptionalParamNames: true }], + "jsdoc/require-param": [ + "warn", + { + checkConstructors: true, + checkDestructured: true, + checkDestructuredRoots: true, + checkGetters: true, + checkRestProperty: true, + checkSetters: true, + }, + ], "jsdoc/require-param-description": "warn", "jsdoc/require-param-name": "warn", + // Pris en charge par les annotations de type TypeScript. + "jsdoc/require-param-type": "allow", "jsdoc/require-property": "warn", "jsdoc/require-property-description": "warn", "jsdoc/require-property-name": "warn", - "jsdoc/require-returns": "warn", + // Pris en charge par les annotations de type TypeScript. + "jsdoc/require-property-type": "allow", + "jsdoc/require-returns": [ + "warn", + { + checkConstructors: true, + checkGetters: true, + forceRequireReturn: true, + forceReturnsWithAsync: true, + }, + ], "jsdoc/require-returns-description": "warn", - "jsdoc/require-yields": "warn", + "jsdoc/require-returns-type": "allow", + "jsdoc/require-yields": [ + "warn", + { + forceRequireYields: false, + withGeneratorTag: false, + }, + ], }; export default jsDocRules; diff --git a/rules/node.ts b/rules/node.ts new file mode 100644 index 0000000..c283db1 --- /dev/null +++ b/rules/node.ts @@ -0,0 +1,12 @@ +import type { DummyRuleMap } from "oxlint"; + +const nodeRules: DummyRuleMap = { + "node/global-require": "deny", + "node/handle-callback-err": "allow", + "node/no-exports-assign": "deny", + "node/no-new-require": "deny", + "node/no-path-concat": "deny", + "node/no-process-env": "deny", +}; + +export default nodeRules; diff --git a/rules/old-eslint.ts b/rules/old-eslint.ts deleted file mode 100644 index 672d087..0000000 --- a/rules/old-eslint.ts +++ /dev/null @@ -1,87 +0,0 @@ -import type { DummyRuleMap } from "oxlint"; - -const esLintRules: DummyRuleMap = { - "array-callback-return": [ - "error", - { - allowVoid: true, - checkForEach: true, - }, - ], - "for-direction": "error", - "max-params": [ - "error", - { - max: 3, - }, - ], - "no-array-constructor": "error", - "no-async-promise-executor": "error", - "no-case-declarations": "error", - "no-compare-neg-zero": "error", - "no-cond-assign": "error", - "no-constant-binary-expression": "error", - "no-constant-condition": "error", - "no-control-regex": "error", - "no-debugger": "error", - "no-delete-var": "error", - "no-dupe-else-if": "error", - "no-duplicate-case": "error", - "no-duplicate-imports": [ - "error", - { - allowSeparateTypeImports: true, - }, - ], - "no-empty": "error", - "no-empty-character-class": "error", - "no-empty-function": "error", - "no-empty-pattern": "error", - "no-empty-static-block": "error", - "no-ex-assign": "error", - "no-extra-boolean-cast": "error", - "no-fallthrough": "error", - "no-global-assign": "error", - "no-invalid-regexp": "error", - "no-irregular-whitespace": "error", - "no-loss-of-precision": "error", - "no-misleading-character-class": "error", - "no-nonoctal-decimal-escape": "error", - "no-param-reassign": "error", - "no-prototype-builtins": "error", - "no-regex-spaces": "error", - "no-self-assign": "error", - "no-shadow-restricted-names": "error", - "no-sparse-arrays": "error", - "no-unassigned-vars": "error", - "no-unexpected-multiline": "error", - "no-unneeded-ternary": [ - "error", - { - defaultAssignment: false, - }, - ], - "no-unsafe-finally": "error", - "no-unsafe-optional-chaining": "error", - "no-unused-expressions": "error", - "no-unused-labels": "error", - "no-unused-private-class-members": "error", - "no-unused-vars": "error", - "no-useless-backreference": "error", - "no-useless-catch": "error", - "no-useless-constructor": "error", - "no-useless-escape": "error", - "no-var": "error", - "prefer-const": "error", - "prefer-rest-params": "error", - "prefer-spread": "error", - "preserve-caught-error": "error", - "require-yield": "error", - // Rentre en conflit avec perfectionnist. - "sort-imports": "off", - "use-isnan": "error", - "valid-typeof": "error", - yoda: ["error", "never"], -}; - -export default esLintRules; diff --git a/rules/oxc.ts b/rules/oxc.ts new file mode 100644 index 0000000..1a28ae9 --- /dev/null +++ b/rules/oxc.ts @@ -0,0 +1,35 @@ +import type { DummyRuleMap } from "oxlint"; + +const oxcRules: DummyRuleMap = { + "oxc/approx-constant": "deny", + "oxc/bad-array-method-on-arguments": "deny", + "oxc/bad-bitwise-operator": "deny", + "oxc/bad-char-at-comparison": "deny", + "oxc/bad-comparison-sequence": "deny", + "oxc/bad-min-max-func": "deny", + "oxc/bad-object-literal-comparison": "deny", + "oxc/bad-replace-all-arg": "deny", + "oxc/branches-sharing-code": "warn", + "oxc/const-comparisons": "deny", + "oxc/double-comparisons": "deny", + "oxc/erasing-op": "deny", + "oxc/misrefactored-assign-op": "deny", + "oxc/missing-throw": "deny", + "oxc/no-accumulating-spread": "deny", + // This rule should generally not be used in modern JavaScript/TypeScript codebases without good reason. + "oxc/no-async-await": "allow", + "oxc/no-async-endpoint-handlers": "allow", + "oxc/no-barrel-file": ["deny", { threshold: 100 }], + "oxc/no-const-enum": "deny", + "oxc/no-map-spread": "allow", + // In most codebases at this point, you should not use this rule. + "oxc/no-optional-chaining": "allow", + // In most codebases at this point, you should not use this rule. + "oxc/no-rest-spread-properties": "allow", + "oxc/no-this-in-exported-function": "deny", + "oxc/number-arg-out-of-range": "deny", + "oxc/only-used-in-recursion": "deny", + "oxc/uninvoked-array-callback": "deny", +}; + +export default oxcRules; diff --git a/rules/perfectionist.ts b/rules/perfectionist.ts index 4641225..57bd57d 100644 --- a/rules/perfectionist.ts +++ b/rules/perfectionist.ts @@ -2,147 +2,147 @@ import type { DummyRuleMap } from "oxlint"; const perfectionistRules: DummyRuleMap = { "perfectionist/sort-array-includes": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-classes": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-decorators": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-enums": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-export-attributes": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-exports": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-heritage-clauses": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-import-attributes": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-interfaces": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-intersection-types": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-jsx-props": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-maps": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-modules": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-named-exports": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-named-imports": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-object-types": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-objects": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-sets": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-switch-case": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-union-types": [ - "error", + "deny", { order: "asc", type: "natural", }, ], "perfectionist/sort-variable-declarations": [ - "error", + "deny", { order: "asc", type: "natural", diff --git a/rules/promise.ts b/rules/promise.ts new file mode 100644 index 0000000..aff8825 --- /dev/null +++ b/rules/promise.ts @@ -0,0 +1,64 @@ +import type { DummyRuleMap } from "oxlint"; + +const promiseRules: DummyRuleMap = { + "promise/always-return": [ + "deny", + { + ignoreAssignmentVariable: ["globalThis"], + ignoreLastCallback: false, + }, + ], + "promise/avoid-new": "deny", + "promise/catch-or-return": [ + "deny", + { + allowFinally: false, + allowThen: false, + terminationMethod: ["catch"], + }, + ], + "promise/no-callback-in-promise": [ + "deny", + { + callbacks: ["callback", "cb", "done", "next"], + exceptions: [], + timeoutsErr: false, + }, + ], + "promise/no-multiple-resolved": "deny", + "promise/no-nesting": "deny", + "promise/no-new-statics": "deny", + "promise/no-promise-in-callback": "deny", + "promise/no-return-in-finally": "deny", + "promise/no-return-wrap": [ + "deny", + { + allowReject: false, + }, + ], + "promise/param-names": [ + "deny", + { + rejectPattern: "^_?reject$", + resolvePattern: "^_?resolve$", + }, + ], + // Émet de faux positifs avec Effect. + "promise/prefer-await-to-callbacks": "allow", + "promise/prefer-await-to-then": [ + "deny", + { + strict: true, + }, + ], + "promise/prefer-catch": "deny", + "promise/spec-only": [ + "deny", + { + allowedMethods: [], + }, + ], + "promise/valid-params": "deny", +}; + +export default promiseRules; diff --git a/rules/sonarjs.ts b/rules/sonarjs.ts deleted file mode 100644 index 4bcf764..0000000 --- a/rules/sonarjs.ts +++ /dev/null @@ -1,216 +0,0 @@ -import type { DummyRuleMap } from "oxlint"; - -const sonarJsRules: DummyRuleMap = { - "sonarjs/anchor-precedence": "error", - "sonarjs/argument-type": "error", - "sonarjs/arguments-order": "error", - "sonarjs/arguments-usage": "error", - "sonarjs/array-callback-without-return": "error", - "sonarjs/assertions-in-tests": "error", - "sonarjs/aws-apigateway-public-api": "error", - "sonarjs/aws-ec2-rds-dms-public": "error", - "sonarjs/aws-ec2-unencrypted-ebs-volume": "error", - "sonarjs/aws-efs-unencrypted": "error", - "sonarjs/aws-iam-all-privileges": "error", - "sonarjs/aws-iam-privilege-escalation": "error", - "sonarjs/aws-iam-public-access": "error", - "sonarjs/aws-opensearchservice-domain": "error", - "sonarjs/aws-rds-unencrypted-databases": "error", - "sonarjs/aws-restricted-ip-admin-access": "error", - "sonarjs/aws-s3-bucket-granted-access": "error", - "sonarjs/aws-s3-bucket-insecure-http": "error", - "sonarjs/aws-s3-bucket-public-access": "error", - "sonarjs/aws-s3-bucket-versioning": "error", - "sonarjs/aws-sagemaker-unencrypted-notebook": "error", - "sonarjs/aws-sns-unencrypted-topics": "error", - "sonarjs/aws-sqs-unencrypted-queue": "error", - "sonarjs/bitwise-operators": "error", - "sonarjs/block-scoped-var": "error", - "sonarjs/call-argument-line": "error", - "sonarjs/chai-determinate-assertion": "error", - "sonarjs/class-name": "error", - "sonarjs/code-eval": "error", - "sonarjs/cognitive-complexity": "error", - "sonarjs/comma-or-logical-or-case": "error", - "sonarjs/concise-regex": "error", - "sonarjs/confidential-information-logging": "error", - "sonarjs/constructor-for-side-effects": "error", - "sonarjs/content-length": "error", - "sonarjs/content-security-policy": "error", - "sonarjs/cookie-no-httponly": "error", - "sonarjs/cors": "error", - "sonarjs/csrf": "error", - "sonarjs/deprecation": "error", - "sonarjs/different-types-comparison": "error", - "sonarjs/disabled-auto-escaping": "error", - "sonarjs/disabled-resource-integrity": "error", - "sonarjs/disabled-timeout": "error", - "sonarjs/duplicates-in-character-class": "error", - "sonarjs/dynamically-constructed-templates": "error", - "sonarjs/empty-string-repetition": "error", - "sonarjs/encryption-secure-mode": "error", - "sonarjs/existing-groups": "error", - "sonarjs/file-permissions": "error", - "sonarjs/file-uploads": "error", - "sonarjs/fixme-tag": "error", - "sonarjs/for-loop-increment-sign": "error", - "sonarjs/frame-ancestors": "error", - "sonarjs/function-inside-loop": "error", - "sonarjs/function-return-type": "error", - "sonarjs/future-reserved-words": "error", - "sonarjs/generator-without-yield": "error", - "sonarjs/hardcoded-secret-signatures": "error", - "sonarjs/hashing": "error", - "sonarjs/hidden-files": "error", - "sonarjs/in-operator-type-error": "error", - "sonarjs/inconsistent-function-call": "error", - "sonarjs/index-of-compare-to-positive-number": "error", - "sonarjs/insecure-cookie": "error", - "sonarjs/insecure-jwt-token": "error", - "sonarjs/inverted-assertion-arguments": "error", - "sonarjs/jsx-no-leaked-render": "error", - "sonarjs/label-position": "error", - "sonarjs/link-with-target-blank": "error", - "sonarjs/max-switch-cases": "error", - "sonarjs/misplaced-loop-counter": "error", - "sonarjs/new-operator-misuse": "error", - "sonarjs/no-all-duplicated-branches": "error", - "sonarjs/no-alphabetical-sort": "error", - "sonarjs/no-angular-bypass-sanitization": "error", - "sonarjs/no-array-delete": "error", - "sonarjs/no-associative-arrays": "error", - "sonarjs/no-async-constructor": "error", - "sonarjs/no-case-label-in-switch": "error", - "sonarjs/no-clear-text-protocols": "error", - "sonarjs/no-code-after-done": "error", - "sonarjs/no-collapsible-if": "error", - "sonarjs/no-collection-size-mischeck": "error", - "sonarjs/no-commented-code": "error", - "sonarjs/no-control-regex": "error", - "sonarjs/no-dead-store": "error", - "sonarjs/no-delete-var": "error", - "sonarjs/no-duplicate-in-composite": "error", - "sonarjs/no-duplicate-string": "error", - "sonarjs/no-duplicated-branches": "error", - "sonarjs/no-element-overwrite": "error", - "sonarjs/no-empty-after-reluctant": "error", - "sonarjs/no-empty-alternatives": "error", - "sonarjs/no-empty-character-class": "error", - "sonarjs/no-empty-collection": "error", - "sonarjs/no-empty-group": "error", - "sonarjs/no-empty-test-file": "error", - "sonarjs/no-equals-in-for-termination": "error", - "sonarjs/no-exclusive-tests": "error", - "sonarjs/no-extra-arguments": "error", - "sonarjs/no-fallthrough": "error", - "sonarjs/no-global-this": "error", - "sonarjs/no-globals-shadowing": "error", - "sonarjs/no-gratuitous-expressions": "error", - "sonarjs/no-hardcoded-ip": "error", - "sonarjs/no-hardcoded-passwords": "error", - "sonarjs/no-hardcoded-secrets": "error", - "sonarjs/no-hook-setter-in-body": "error", - "sonarjs/no-identical-conditions": "error", - "sonarjs/no-identical-expressions": "error", - "sonarjs/no-identical-functions": "error", - "sonarjs/no-ignored-exceptions": "error", - "sonarjs/no-ignored-return": "error", - "sonarjs/no-implicit-global": "error", - "sonarjs/no-in-misuse": "error", - "sonarjs/no-incomplete-assertions": "error", - "sonarjs/no-inconsistent-returns": "error", - "sonarjs/no-internal-api-use": "error", - "sonarjs/no-intrusive-permissions": "error", - "sonarjs/no-invalid-regexp": "error", - "sonarjs/no-invariant-returns": "error", - "sonarjs/no-inverted-boolean-check": "error", - "sonarjs/no-ip-forward": "error", - "sonarjs/no-labels": "error", - "sonarjs/no-literal-call": "error", - "sonarjs/no-mime-sniff": "error", - "sonarjs/no-misleading-array-reverse": "error", - "sonarjs/no-misleading-character-class": "error", - "sonarjs/no-mixed-content": "error", - "sonarjs/no-nested-assignment": "error", - "sonarjs/no-nested-conditional": "error", - "sonarjs/no-nested-functions": "error", - "sonarjs/no-nested-switch": "error", - "sonarjs/no-nested-template-literals": "error", - "sonarjs/no-os-command-from-path": "error", - "sonarjs/no-parameter-reassignment": "error", - "sonarjs/no-primitive-wrappers": "error", - "sonarjs/no-redundant-assignments": "error", - "sonarjs/no-redundant-boolean": "error", - "sonarjs/no-redundant-jump": "error", - "sonarjs/no-redundant-optional": "error", - "sonarjs/no-referrer-policy": "error", - "sonarjs/no-regex-spaces": "error", - "sonarjs/no-same-argument-assert": "error", - "sonarjs/no-same-line-conditional": "error", - "sonarjs/no-selector-parameter": "error", - "sonarjs/no-session-cookies-on-static-assets": "error", - "sonarjs/no-skipped-tests": "error", - "sonarjs/no-small-switch": "error", - "sonarjs/no-table-as-layout": "error", - "sonarjs/no-try-promise": "error", - "sonarjs/no-undefined-argument": "error", - "sonarjs/no-unenclosed-multiline-block": "error", - "sonarjs/no-uniq-key": "error", - "sonarjs/no-unsafe-unzip": "error", - "sonarjs/no-unthrown-error": "error", - "sonarjs/no-unused-collection": "error", - "sonarjs/no-unused-vars": "error", - "sonarjs/no-use-of-empty-return-value": "error", - "sonarjs/no-useless-catch": "error", - "sonarjs/no-useless-increment": "error", - "sonarjs/no-useless-intersection": "error", - "sonarjs/no-useless-react-setstate": "error", - "sonarjs/no-weak-cipher": "error", - "sonarjs/no-weak-keys": "error", - "sonarjs/non-existent-operator": "error", - "sonarjs/null-dereference": "error", - "sonarjs/object-alt-content": "error", - "sonarjs/os-command": "error", - "sonarjs/post-message": "error", - "sonarjs/prefer-default-last": "error", - "sonarjs/prefer-immediate-return": "error", - "sonarjs/prefer-promise-shorthand": "error", - "sonarjs/prefer-read-only-props": "error", - "sonarjs/prefer-regexp-exec": "error", - "sonarjs/prefer-single-boolean-return": "error", - "sonarjs/prefer-type-guard": "error", - "sonarjs/prefer-while": "error", - "sonarjs/production-debug": "error", - "sonarjs/pseudo-random": "error", - "sonarjs/public-static-readonly": "error", - "sonarjs/publicly-writable-directories": "error", - "sonarjs/reduce-initial-value": "error", - "sonarjs/redundant-type-aliases": "error", - "sonarjs/regex-complexity": "error", - "sonarjs/review-blockchain-mnemonic": "error", - "sonarjs/session-regeneration": "error", - "sonarjs/single-char-in-character-classes": "error", - "sonarjs/single-character-alternation": "error", - "sonarjs/slow-regex": "error", - "sonarjs/sql-queries": "error", - "sonarjs/stable-tests": "error", - "sonarjs/stateful-regex": "error", - "sonarjs/strict-transport-security": "error", - "sonarjs/table-header": "error", - "sonarjs/table-header-reference": "error", - "sonarjs/test-check-exception": "error", - "sonarjs/todo-tag": "error", - "sonarjs/unused-import": "error", - "sonarjs/unused-named-groups": "error", - "sonarjs/unverified-certificate": "error", - "sonarjs/unverified-hostname": "error", - "sonarjs/updated-const-var": "error", - "sonarjs/updated-loop-counter": "error", - "sonarjs/use-type-alias": "error", - "sonarjs/void-use": "error", - "sonarjs/weak-ssl": "error", - "sonarjs/x-powered-by": "error", - "sonarjs/xml-parser-xxe": "error", -}; - -export default sonarJsRules; diff --git a/rules/typescript.ts b/rules/typescript.ts index 2784635..07d54e6 100644 --- a/rules/typescript.ts +++ b/rules/typescript.ts @@ -1,94 +1,374 @@ import type { DummyRuleMap } from "oxlint"; +/** Longueur minimale de la description accompagnat une directive (p. ex. `@ts-expect-error`). */ +const MIN_DIRECTIVE_DESCRIPTION_LENGTH = 10; + const typeScriptRules: DummyRuleMap = { - "@typescript-eslint/adjacent-overload-signatures": "error", - "@typescript-eslint/array-type": [ - "error", + "typescript/adjacent-overload-signatures": "deny", + "typescript/array-type": [ + "deny", { default: "generic", readonly: "generic", }, ], - "@typescript-eslint/await-thenable": "error", - "@typescript-eslint/ban-ts-comment": [ - "error", + "typescript/await-thenable": "deny", + "typescript/ban-ts-comment": [ + "deny", { - minimumDescriptionLength: 10, + minimumDescriptionLength: MIN_DIRECTIVE_DESCRIPTION_LENGTH, + "ts-check": false, + "ts-expect-error": "allow-with-description", + "ts-ignore": true, + "ts-nocheck": true, }, ], - "@typescript-eslint/ban-tslint-comment": "error", - "@typescript-eslint/class-literal-property-style": "error", - "@typescript-eslint/consistent-generic-constructors": "error", - "@typescript-eslint/consistent-indexed-object-style": "error", - "@typescript-eslint/consistent-type-assertions": "error", - "@typescript-eslint/consistent-type-definitions": ["error", "type"], - "@typescript-eslint/dot-notation": "error", - "@typescript-eslint/no-array-delete": "error", - "@typescript-eslint/no-base-to-string": "error", - "@typescript-eslint/no-confusing-non-null-assertion": "error", - "@typescript-eslint/no-confusing-void-expression": "error", - "@typescript-eslint/no-deprecated": "error", - "@typescript-eslint/no-duplicate-enum-values": "error", - "@typescript-eslint/no-duplicate-type-constituents": "error", - "@typescript-eslint/no-dynamic-delete": "error", - "@typescript-eslint/no-empty-object-type": "error", - "@typescript-eslint/no-explicit-any": "error", - "@typescript-eslint/no-extra-non-null-assertion": "error", - "@typescript-eslint/no-extraneous-class": "error", - "@typescript-eslint/no-floating-promises": "error", - "@typescript-eslint/no-for-in-array": "error", - "@typescript-eslint/no-implied-eval": "error", - "@typescript-eslint/no-inferrable-types": "error", - "@typescript-eslint/no-invalid-void-type": "error", - "@typescript-eslint/no-meaningless-void-operator": "error", - "@typescript-eslint/no-misused-new": "error", - "@typescript-eslint/no-misused-promises": "error", - "@typescript-eslint/no-misused-spread": "error", - "@typescript-eslint/no-mixed-enums": "error", - "@typescript-eslint/no-namespace": "error", - "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error", - "@typescript-eslint/no-non-null-asserted-optional-chain": "error", - "@typescript-eslint/no-non-null-assertion": "error", - "@typescript-eslint/no-redundant-type-constituents": "error", - "@typescript-eslint/no-require-imports": "error", - "@typescript-eslint/no-this-alias": "error", - "@typescript-eslint/no-unnecessary-condition": "error", - "@typescript-eslint/no-unnecessary-template-expression": "error", - "@typescript-eslint/no-unnecessary-type-arguments": "error", - "@typescript-eslint/no-unnecessary-type-assertion": "error", - "@typescript-eslint/no-unnecessary-type-constraint": "error", - "@typescript-eslint/no-unnecessary-type-conversion": "error", - "@typescript-eslint/no-unsafe-argument": "error", - "@typescript-eslint/no-unsafe-assignment": "error", - "@typescript-eslint/no-unsafe-call": "error", - "@typescript-eslint/no-unsafe-declaration-merging": "error", - "@typescript-eslint/no-unsafe-enum-comparison": "error", - "@typescript-eslint/no-unsafe-function-type": "error", - "@typescript-eslint/no-unsafe-member-access": "error", - "@typescript-eslint/no-unsafe-return": "error", - "@typescript-eslint/no-unsafe-unary-minus": "error", - "@typescript-eslint/no-useless-default-assignment": "error", - "@typescript-eslint/no-wrapper-object-types": "error", - "@typescript-eslint/non-nullable-type-assertion-style": "error", - "@typescript-eslint/prefer-as-const": "error", - "@typescript-eslint/prefer-find": "error", - "@typescript-eslint/prefer-for-of": "error", - "@typescript-eslint/prefer-function-type": "error", - "@typescript-eslint/prefer-includes": "error", - "@typescript-eslint/prefer-literal-enum-member": "error", - "@typescript-eslint/prefer-namespace-keyword": "error", - "@typescript-eslint/prefer-nullish-coalescing": "error", - "@typescript-eslint/prefer-optional-chain": "error", - "@typescript-eslint/prefer-promise-reject-errors": "error", - "@typescript-eslint/prefer-readonly": "error", - "@typescript-eslint/prefer-reduce-type-parameter": "error", - "@typescript-eslint/prefer-regexp-exec": "error", - "@typescript-eslint/prefer-return-this-type": "error", - "@typescript-eslint/prefer-string-starts-ends-with": "error", - "@typescript-eslint/related-getter-setter-pairs": "error", - "@typescript-eslint/require-await": "error", - "@typescript-eslint/restrict-plus-operands": [ - "error", + "typescript/ban-tslint-comment": "deny", + "typescript/class-literal-property-style": ["deny", "fields"], + "typescript/consistent-generic-constructors": [ + "deny", + { + option: "constructor", + }, + ], + "typescript/consistent-indexed-object-style": ["deny", "record"], + "typescript/consistent-return": [ + "deny", + { + treatUndefinedAsUnspecified: false, + }, + ], + "typescript/consistent-type-assertions": [ + "deny", + { + assertionStyle: "never", + }, + ], + "typescript/consistent-type-definitions": ["deny", "type"], + "typescript/consistent-type-exports": [ + "deny", + { + fixMixedExportsWithInlineTypeSpecifier: false, + }, + ], + "typescript/consistent-type-imports": [ + "deny", + { + disallowTypeAnnotations: true, + fixStyle: "separate-type-imports", + prefer: "type-imports", + }, + ], + "typescript/dot-notation": [ + "deny", + { + allowIndexSignaturePropertyAccess: false, + allowKeywords: false, + allowPattern: "", + allowPrivateClassPropertyAccess: false, + allowProtectedClassPropertyAccess: false, + }, + ], + "typescript/explicit-function-return-type": [ + "deny", + { + allowConciseArrowFunctionExpressionsStartingWithVoid: false, + allowDirectConstAssertionInArrowFunctions: true, + allowedNames: [], + allowExpressions: false, + allowFunctionsWithoutTypeParameters: false, + allowHigherOrderFunctions: true, + allowIIFEs: false, + allowTypedFunctionExpressions: true, + }, + ], + "typescript/explicit-module-boundary-types": [ + "deny", + { + allowArgumentsExplicitlyTypedAsAny: false, + allowDirectConstAssertionInArrowFunctions: true, + allowedNames: [], + allowHigherOrderFunctions: true, + allowOverloadFunctions: false, + allowTypedFunctionExpressions: true, + }, + ], + "typescript/no-array-delete": "deny", + "typescript/no-base-to-string": [ + "deny", + { + checkUnknown: true, + ignoredTypeNames: ["deny", "RegExp", "URL", "URLSearchParams"], + }, + ], + "typescript/no-confusing-non-null-assertion": "deny", + "typescript/no-confusing-void-expression": [ + "deny", + { + ignoreArrowShorthand: false, + ignoreVoidOperator: false, + ignoreVoidReturningFunctions: false, + }, + ], + "typescript/no-deprecated": "deny", + "typescript/no-duplicate-enum-values": "deny", + "typescript/no-duplicate-type-constituents": [ + "deny", + { + ignoreIntersections: false, + ignoreUnions: false, + }, + ], + "typescript/no-dynamic-delete": "deny", + "typescript/no-empty-interface": [ + "deny", + { + allowSingleExtends: false, + }, + ], + "typescript/no-empty-object-type": [ + "deny", + { + allowInterfaces: "never", + allowObjectTypes: "never", + }, + ], + "typescript/no-explicit-any": [ + "deny", + { + fixToUnknown: true, + ignoreRestArgs: false, + }, + ], + "typescript/no-extra-non-null-assertion": "deny", + "typescript/no-extraneous-class": [ + "deny", + { + allowConstructorOnly: false, + allowEmpty: false, + allowStaticOnly: false, + allowWithDecorator: false, + }, + ], + "typescript/no-floating-promises": [ + "deny", + { + allowForKnownSafeCalls: [], + allowForKnownSafePromises: [], + checkThenables: true, + ignoreIIFE: false, + ignoreVoid: false, + }, + ], + "typescript/no-for-in-array": "deny", + "typescript/no-implied-eval": "deny", + "typescript/no-import-type-side-effects": "deny", + // + "typescript/no-inferrable-types": [ + "deny", + { + ignoreParameters: true, + ignoreProperties: true, + }, + ], + "typescript/no-invalid-void-type": [ + "deny", + { + allowAsThisParameter: false, + allowInGenericTypeArguments: true, + }, + ], + "typescript/no-meaningless-void-operator": [ + "deny", + { + checkNever: true, + }, + ], + "typescript/no-misused-new": "deny", + "typescript/no-misused-promises": [ + "deny", + { + checksConditionals: true, + checksSpreads: true, + checksVoidReturn: true, + }, + ], + "typescript/no-misused-spread": [ + "deny", + { + allow: [], + }, + ], + "typescript/no-mixed-enums": "deny", + "typescript/no-namespace": [ + "deny", + { + allowDeclarations: false, + allowDefinitionFiles: true, + }, + ], + "typescript/no-non-null-asserted-nullish-coalescing": "deny", + "typescript/no-non-null-asserted-optional-chain": "deny", + "typescript/no-non-null-assertion": "deny", + "typescript/no-redundant-type-constituents": "deny", + "typescript/no-require-imports": [ + "deny", + { + allow: [], + allowAsImport: false, + }, + ], + "typescript/no-this-alias": [ + "deny", + { + allowDestructuring: false, + allowedNames: [], + }, + ], + // J'apprécie de pouvoir être explicite dans la comparaison. + "typescript/no-unnecessary-boolean-literal-compare": "allow", + "typescript/no-unnecessary-condition": [ + "deny", + { + allowConstantLoopConditions: "never", + checkTypePredicates: true, + }, + ], + "typescript/no-unnecessary-parameter-property-assignment": "deny", + "typescript/no-unnecessary-qualifier": "deny", + "typescript/no-unnecessary-template-expression": "deny", + "typescript/no-unnecessary-type-arguments": "deny", + "typescript/no-unnecessary-type-assertion": [ + "deny", + { + checkLiteralConstAssertions: false, + typesToIgnore: [], + }, + ], + "typescript/no-unnecessary-type-constraint": "deny", + "typescript/no-unnecessary-type-conversion": "deny", + "typescript/no-unnecessary-type-parameters": "deny", + "typescript/no-unsafe-argument": "deny", + "typescript/no-unsafe-assignment": "deny", + "typescript/no-unsafe-call": "deny", + "typescript/no-unsafe-declaration-merging": "deny", + "typescript/no-unsafe-enum-comparison": "deny", + "typescript/no-unsafe-function-type": "deny", + "typescript/no-unsafe-member-access": [ + "deny", + { + allowOptionalChaining: false, + }, + ], + "typescript/no-unsafe-return": "deny", + "typescript/no-unsafe-type-assertion": "deny", + "typescript/no-unsafe-unary-minus": "deny", + "typescript/no-useless-default-assignment": "deny", + "typescript/no-useless-empty-export": "deny", + "typescript/no-wrapper-object-types": "deny", + "typescript/non-nullable-type-assertion-style": "allow", + "typescript/only-throw-error": [ + "deny", + { + allow: [], + allowRethrowing: true, + allowThrowingAny: false, + allowThrowingUnknown: false, + }, + ], + "typescript/parameter-properties": [ + "deny", + { + prefer: "class-property", + }, + ], + "typescript/prefer-as-const": "deny", + "typescript/prefer-enum-initializers": "deny", + "typescript/prefer-find": "deny", + "typescript/prefer-for-of": "deny", + "typescript/prefer-function-type": "deny", + "typescript/prefer-includes": "deny", + + "typescript/prefer-literal-enum-member": [ + "deny", + { + allowBitwiseExpressions: false, + }, + ], + "typescript/prefer-nullish-coalescing": [ + "deny", + { + ignoreBooleanCoercion: false, + ignoreConditionalTests: true, + ignoreIfStatements: false, + ignoreMixedLogicalExpressions: false, + ignorePrimitives: false, + ignoreTernaryTests: false, + }, + ], + "typescript/prefer-optional-chain": [ + "deny", + { + checkAny: true, + checkBigInt: true, + checkBoolean: true, + checkNumber: true, + checkString: true, + checkUnknown: true, + requireNullish: false, + }, + ], + "typescript/prefer-promise-reject-errors": [ + "deny", + { + allowEmptyReject: false, + allowThrowingAny: false, + allowThrowingUnknown: false, + }, + ], + "typescript/prefer-readonly": [ + "deny", + { + onlyInlineLambdas: false, + }, + ], + // Nécessite trop de bruit dans le code avec l'ajout d'annotations de type `Readonly`. + "typescript/prefer-readonly-parameter-types": [ + "allow", + { + allow: [], + checkParameterProperties: true, + ignoreInferredTypes: true, + treatMethodsAsReadonly: false, + }, + ], + "typescript/prefer-reduce-type-parameter": "deny", + "typescript/prefer-regexp-exec": "deny", + "typescript/prefer-return-this-type": "deny", + "typescript/prefer-string-starts-ends-with": ["deny", { allowSingleElementEquality: "never" }], + // Règle rendue caduque par typescript/ban-ts-comment. + "typescript/prefer-ts-expect-error": "allow", + "typescript/promise-function-async": [ + "deny", + { + allowAny: false, + allowedPromiseNames: [], + checkArrowFunctions: true, + checkFunctionDeclarations: true, + checkFunctionExpressions: true, + checkMethodDeclarations: true, + }, + ], + "typescript/related-getter-setter-pairs": "deny", + "typescript/require-array-sort-compare": [ + "deny", + { + ignoreStringArrays: true, + }, + ], + "typescript/require-await": "deny", + "typescript/restrict-plus-operands": [ + "deny", { allowAny: false, allowBoolean: false, @@ -97,9 +377,10 @@ const typeScriptRules: DummyRuleMap = { allowRegExp: false, }, ], - "@typescript-eslint/restrict-template-expressions": [ - "error", + "typescript/restrict-template-expressions": [ + "deny", { + allow: [{ from: "lib", name: ["Error", "URL", "URLSearchParams"] }], allowAny: false, allowBoolean: false, allowNever: false, @@ -108,12 +389,57 @@ const typeScriptRules: DummyRuleMap = { allowRegExp: false, }, ], - "@typescript-eslint/return-await": ["error", "error-handling-correctness-only"], - "@typescript-eslint/switch-exhaustiveness-check": "error", - "@typescript-eslint/triple-slash-reference": "error", - "@typescript-eslint/unbound-method": "error", - "@typescript-eslint/unified-signatures": "error", - "@typescript-eslint/use-unknown-in-catch-callback-variable": "error", + "typescript/return-await": ["deny", "error-handling-correctness-only"], + "typescript/strict-boolean-expressions": [ + "deny", + { + allowAny: false, + allowNullableBoolean: true, + allowNullableEnum: true, + allowNullableNumber: false, + allowNullableObject: false, + allowNullableString: false, + allowNumber: false, + allowString: false, + }, + ], + "typescript/strict-void-return": [ + "deny", + { + allowReturnAny: false, + }, + ], + "typescript/switch-exhaustiveness-check": [ + "deny", + { + allowDefaultCaseForExhaustiveSwitch: true, + considerDefaultExhaustiveForUnions: false, + defaultCaseCommentPattern: "@skip-exhaustive-check", + requireDefaultForNonUnion: false, + }, + ], + "typescript/triple-slash-reference": [ + "deny", + { + lib: "never", + path: "never", + types: "prefer-import", + }, + ], + "typescript/unbound-method": [ + "deny", + { + ignoreStatic: false, + }, + ], + "typescript/unified-signatures": [ + "deny", + { + ignoreDifferentlyNamedParameters: false, + ignoreOverloadsWithDifferentJSDoc: false, + }, + ], + "typescript/use-unknown-in-catch-callback-variable": "deny", }; export default typeScriptRules; diff --git a/rules/unicorn.ts b/rules/unicorn.ts index 511dd2a..6da097b 100644 --- a/rules/unicorn.ts +++ b/rules/unicorn.ts @@ -1,121 +1,774 @@ import type { DummyRuleMap } from "oxlint"; const unicornRules: DummyRuleMap = { - "unicorn/catch-error-name": "error", - "unicorn/consistent-date-clone": "error", - "unicorn/consistent-empty-array-spread": "error", - "unicorn/consistent-existence-index-check": "error", - "unicorn/custom-error-definition": "error", - "unicorn/error-message": "error", - "unicorn/escape-case": "error", + /** + * This rule enforces consistent and descriptive naming for error variables in `catch` statements, preventing the use + * of vague names like `badName` or _ when the error is used. + * + * Using non-descriptive names like `badName` or _ makes the code harder to read and understand, especially when + * debugging. It's important to use clear, consistent names to represent errors. + */ + "unicorn/catch-error-name": [ + "deny", + { + ignore: ["_"], + }, + ], + /** Enforces consistent usage of the `assert` module. */ + "unicorn/consistent-assert": "deny", + /** + * The `Date` constructor can clone a `Date` object directly when passed as an argument, making timestamp conversion + * unnecessary. This rule enforces the use of the direct `Date` cloning instead of using `.getTime()` for conversion. + * + * Using `.getTime()` to convert a `Date` object to a timestamp and then back to a `Date` is redundant and + * unnecessary. Simply passing the `Date` object to the `Date` constructor is cleaner and more efficient. + */ + "unicorn/consistent-date-clone": "deny", + /** + * When spreading a ternary in an array, we can use both `[]` and `''` as fallbacks, but it's better to have + * consistent types in both branches. + */ + "unicorn/consistent-empty-array-spread": "deny", + /** + * Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and + * `findLastIndex()`. This ensures that comparisons are performed in a standard and clear way. + * + * This rule is meant to enforce a specific style and improve code clarity. Using inconsistent comparison styles + * (e.g., `index < 0`, `index >= 0`) can make the intention behind the code unclear, especially in large codebases. + */ + "unicorn/consistent-existence-index-check": "deny", + /** + * Disallow functions that are declared in a scope which does not capture any variables from the outer scope. + * + * Moving function declarations to the highest possible scope improves readability, directly improves performance and allows JavaScript engines to better optimize your performance. + */ + "unicorn/consistent-function-scoping": [ + "deny", + { + /** Whether to check scoping with arrow functions. */ + checkArrowFunctions: true, + }, + ], + /** + * Enforces the only valid way of `Error` subclassing. It works with any super class that ends in `Error`. + * + * Incorrectly defined custom errors can lead to unexpected behavior when catching and identifying errors. Missing + * `super()` calls, wrong `name` property values, or non-standard class names make error handling unreliable. + */ + "unicorn/custom-error-definition": "deny", + /** + * Removes the extra spaces or new line characters inside a pair of braces that does not contain additional code. This + * ensures that braces are clean and do not contain unnecessary spaces or newlines. + * + * Extra spaces inside braces can negatively impact the readability of the code. Keeping braces clean and free of + * unnecessary characters improves consistency and makes the code easier to understand and maintain. + */ + "unicorn/empty-brace-spaces": "deny", + /** + * Enforces providing a `message` when creating built-in `Error` objects to improve readability and debugging. + * + * Throwing an `Error` without a message, like throw new `Error()`, provides no context on what went wrong, making + * debugging harder. A clear error message improves code clarity and helps developers quickly identify issues. + */ + "unicorn/error-message": "deny", + /** + * Enforces defining escape sequence values with uppercase characters rather than lowercase ones. This promotes + * readability by making the escaped value more distinguishable from the identifier. + */ + "unicorn/escape-case": "deny", + /** Enforce explicitly comparing the `length` or `size` property of a value. */ "unicorn/explicit-length-check": [ - "error", + "deny", { "non-zero": "not-equal", }, ], - "unicorn/new-for-builtins": "error", - "unicorn/no-abusive-eslint-disable": "error", - "unicorn/no-accessor-recursion": "error", - "unicorn/no-anonymous-default-export": "error", - "unicorn/no-array-method-this-argument": "error", - "unicorn/no-array-reverse": "error", - "unicorn/no-array-sort": "error", - "unicorn/no-await-in-promise-methods": "error", - "unicorn/no-console-spaces": "error", - "unicorn/no-document-cookie": "error", - "unicorn/no-empty-file": "error", - "unicorn/no-hex-escape": "error", - "unicorn/no-instanceof-builtins": "error", - "unicorn/no-invalid-fetch-options": "error", - "unicorn/no-invalid-remove-event-listener": "error", - "unicorn/no-lonely-if": "error", - "unicorn/no-magic-array-flat-depth": "error", - "unicorn/no-negated-condition": "error", - "unicorn/no-negation-in-equality-check": "error", - "unicorn/no-nested-ternary": "error", - "unicorn/no-new-array": "error", - "unicorn/no-new-buffer": "error", - "unicorn/no-null": "error", - "unicorn/no-object-as-default-parameter": "error", - "unicorn/no-process-exit": "error", - "unicorn/no-single-promise-in-promise-methods": "error", - "unicorn/no-static-only-class": "error", - "unicorn/no-thenable": "error", - "unicorn/no-this-assignment": "error", - "unicorn/no-typeof-undefined": "error", - "unicorn/no-unnecessary-array-flat-depth": "error", - "unicorn/no-unnecessary-array-splice-count": "error", - "unicorn/no-unnecessary-await": "error", - "unicorn/no-unnecessary-slice-end": "error", - "unicorn/no-unreadable-array-destructuring": "error", - "unicorn/no-unreadable-iife": "error", - "unicorn/no-useless-collection-argument": "error", - "unicorn/no-useless-error-capture-stack-trace": "error", - "unicorn/no-useless-fallback-in-spread": "error", - "unicorn/no-useless-length-check": "error", - "unicorn/no-useless-promise-resolve-reject": "error", - "unicorn/no-useless-spread": "error", - "unicorn/no-useless-switch-case": "error", - "unicorn/no-useless-undefined": "error", - "unicorn/no-zero-fractions": "error", - "unicorn/number-literal-case": "error", - "unicorn/numeric-separators-style": "error", - "unicorn/prefer-add-event-listener": "error", - "unicorn/prefer-array-find": "error", - "unicorn/prefer-array-flat": "error", - "unicorn/prefer-array-flat-map": "error", - "unicorn/prefer-array-index-of": "error", - "unicorn/prefer-array-some": "error", - "unicorn/prefer-at": "error", - "unicorn/prefer-bigint-literals": "error", - "unicorn/prefer-blob-reading-methods": "error", - "unicorn/prefer-class-fields": "error", - "unicorn/prefer-classlist-toggle": "error", - "unicorn/prefer-code-point": "error", - "unicorn/prefer-date-now": "error", - "unicorn/prefer-default-parameters": "error", - "unicorn/prefer-dom-node-append": "error", - "unicorn/prefer-dom-node-remove": "error", - "unicorn/prefer-dom-node-text-content": "error", - "unicorn/prefer-event-target": "error", - "unicorn/prefer-global-this": "error", - "unicorn/prefer-includes": "error", - "unicorn/prefer-keyboard-event-key": "error", - "unicorn/prefer-logical-operator-over-ternary": "error", - "unicorn/prefer-math-min-max": "error", - "unicorn/prefer-math-trunc": "error", - "unicorn/prefer-modern-dom-apis": "error", - "unicorn/prefer-modern-math-apis": "error", - "unicorn/prefer-module": "error", - "unicorn/prefer-native-coercion-functions": "error", - "unicorn/prefer-negative-index": "error", - "unicorn/prefer-node-protocol": "error", - "unicorn/prefer-number-properties": "error", - "unicorn/prefer-object-from-entries": "error", - "unicorn/prefer-optional-catch-binding": "error", - "unicorn/prefer-prototype-methods": "error", - "unicorn/prefer-reflect-apply": "error", - "unicorn/prefer-regexp-test": "error", - "unicorn/prefer-response-static-json": "error", - "unicorn/prefer-set-has": "error", - "unicorn/prefer-set-size": "error", - "unicorn/prefer-string-raw": "error", - "unicorn/prefer-string-replace-all": "error", - "unicorn/prefer-string-slice": "error", - "unicorn/prefer-string-starts-ends-with": "error", - "unicorn/prefer-string-trim-start-end": "error", - "unicorn/prefer-structured-clone": "error", - "unicorn/prefer-ternary": "off", - "unicorn/prefer-top-level-await": "error", - "unicorn/prefer-type-error": "error", - "unicorn/relative-url-style": "error", - "unicorn/require-array-join-separator": "error", - "unicorn/require-module-attributes": "error", - "unicorn/require-module-specifiers": "error", - "unicorn/require-number-to-fixed-digits-argument": "error", - "unicorn/text-encoding-identifier-case": "error", - "unicorn/throw-new-error": "error", + /** + * Enforces a consistent case style for filenames to improve project organization and maintainability. By default, + * `kebab-case` is enforced, but other styles can be configured. + * + * Files named `index.js`, `index.ts`, etc. are exempt from this rule as they cannot reliably be renamed to other + * casings (mainly just a problem with PascalCase). + * + * Inconsistent file naming conventions make it harder to locate files, navigate projects, and enforce consistency + * across a codebase. Standardizing naming conventions improves readability, reduces cognitive overhead, and aligns + * with best practices in large-scale development. + */ + "unicorn/filename-case": [ + "deny", + { + case: "kebabCase", + ignore: "", + multipleFileExtensions: true, + }, + ], + /** Enforces the use of `new` for many builtins and disallow it for some other. */ + "unicorn/new-for-builtins": "deny", + /** Disallows `oxlint-disable` or `eslint-disable` comments without specifying rules. */ + "unicorn/no-abusive-eslint-disable": "deny", + /** + * Disallow recursive access to `this` within getters and setters. + * + * This rule prevents recursive access to `this` within getter and setter methods in objects and classes, avoiding infinite recursion and stack overflow errors. + */ + "unicorn/no-accessor-recursion": "deny", + /** Disallows anonymous functions and classes as default exports. */ + "unicorn/no-anonymous-default-export": "deny", + /** + * Prevents passing a function reference directly to iterator methods. + * + * Passing functions to iterator methods can cause issues when the function is changed without realizing that the + * iterator passes 2 more parameters to it (index and array). This can lead to unexpected behavior when the function + * signature changes. + * + * Cause des soucis avec les pipelines `Effect`. + */ + "unicorn/no-array-callback-reference": "allow", + /** + * Forbids the use of Array#forEach in favor of a for loop. + * + * Je préfère utiliser les méthodes `.forEach` dans les pipelines. + */ + "unicorn/no-array-for-each": "allow", + /** + * Disallows the use of the `thisArg` parameter in array iteration methods such as `map`, `filter`, `some`, `every`, + * and similar. + * + * The `thisArg` parameter makes code harder to understand and reason about. Instead, prefer arrow functions or bind + * explicitly in a clearer way. Arrow functions inherit `this` from the lexical scope, which is more intuitive and + * less error-prone. + * + * Cause des soucis avec les pipelines `Effect`. + */ + "unicorn/no-array-method-this-argument": "allow", + /** + * Disallow `Array#reduce()` and `Array#reduceRight()`. + * + * `reduce()` est utile dans certains cas. + */ + "unicorn/no-array-reduce": "allow", + /** + * Prefer using `Array#toReversed()` over `Array#reverse()`. + * + * `Array#reverse()` modifies the original array in place, which can lead to unintended side effects—especially when the original array is used elsewhere in the code. + */ + "unicorn/no-array-reverse": [ + "deny", + { + /** This rule allows `array.reverse()` as an expression statement by default. Set to `false` to forbid `Array#reverse()` even if it's an expression statement. */ + allowExpressionStatement: false, + }, + ], + /** + * Prefer using `Array#toSorted()` over `Array#sort()`. + * + * `Array#sort()` modifies the original array in place, which can lead to unintended side effects—especially when the original array is used elsewhere in the code. + */ + "unicorn/no-array-sort": [ + "deny", + { + /** When set to `true` (default), allows `array.sort()` as an expression statement. Set to `false` to forbid `Array#sort()` even if it's an expression statement. */ + allowExpressionStatement: false, + }, + ], + /** + * Disallows member access from `await` expressions. + * + * When accessing a member from an `await` expression, the `await` expression has to be parenthesized, which is not + * readable. + */ + "unicorn/no-await-expression-member": "deny", + /** Disallow using await in Promise method parameters. */ + "unicorn/no-await-in-promise-methods": "deny", + /** + * Disallows leading/trailing space inside `console.log()` and similar methods. + * + * The `console.log()` method and similar methods join the parameters with a space so adding a leading/trailing space + * to a parameter, results in two spaces being added. + */ + "unicorn/no-console-spaces": "deny", + /** Disallows direct use of [`document.cookie`](https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie). */ + "unicorn/no-document-cookie": "deny", + /** Disallows files that do not contain any meaningful code. */ + /** Disallows files that do not contain any meaningful code. */ + "unicorn/no-empty-file": "deny", + /** Enforces a convention of using Unicode escapes instead of hexadecimal escapes for consistency and clarity. */ + "unicorn/no-hex-escape": "deny", + /** Disallows mutating a variable immediately after initialization. */ + "unicorn/no-immediate-mutation": "deny", + /** Require `Array.isArray()` instead of `instanceof Array`. */ + "unicorn/no-instanceof-array": "deny", + /** + * Disallows the use of `instanceof` with ECMAScript built-in constructors because: + * + * - it breaks across execution contexts (`iframe`, Web Worker, Node VM, etc.); + * - it is often misleading (e.g. `instanceof Array` fails for a subclass); + * - there is always a clearer and safer alternative `(Array.isArray`, `typeof`, `Buffer.isBuffer`, …). + * + * `instanceof` breaks across execution contexts (`iframe`, Web Worker, Node `vm`), and may give misleading results for subclasses or exotic objects. + */ + "unicorn/no-instanceof-builtins": [ + "deny", + { + /** Constructor names to exclude from checking. */ + exlude: [], + /** Additional constructor names to check beyond the default set. Use this to extend the rule with additional constructors. */ + include: [], + /** + * Controls which built-in constructors are checked. + * + * - `"loose"` (default): Only checks `Array`, `Function`, `Error` (if `useErrorIsError` is `true`), and primitive wrappers; + * - `"strict"`: Additionally checks `Error` types, collections, typed arrays, and other built-in constructors. + */ + strategy: "strict", + /** + * When `true`, checks `instanceof Error` and suggests using `Error.isError()` instead. Requires the `Error.isError()` function to be available. + */ + useErrorIsError: true, + }, + ], + /** + * Disallow invalid options in `fetch()` and new `Request().` Specifically, this rule ensures that a body is not + * provided when the method is `GET` or `HEAD,` as it will result in a `TypeError.` + */ + "unicorn/no-invalid-fetch-options": "deny", + /** It warns when you use a non-function value as the second argument of `removeEventListener`. */ + "unicorn/no-invalid-remove-event-listener": "deny", + /** Disallow using `length` as the end argument of a `slice` call. */ + "unicorn/no-length-as-slice-end": "deny", + /** Disallow `if` statements as the only statement in `if` blocks without `else`. */ + "unicorn/no-lonely-if": "deny", + /** + * Disallow magic numbers for + * [`Array.prototype.flat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat) + * depth. + * + * Magic numbers are hard to understand and maintain. When calling `Array.prototype.flat`, it is usually called with + * `1`, or `Infinity`. If you are using a different number, it is better to add a comment explaining the reason for + * the depth provided. + */ + "unicorn/no-magic-array-flat-depth": "deny", + "unicorn/no-negated-condition": "deny", + /** Disallow negated expressions on the left of (in)equality checks. */ + "unicorn/no-negation-in-equality-check": "deny", + /** + * This rule disallows deeply nested ternary expressions. Nested ternary expressions that are only one level deep and + * wrapped in parentheses are allowed. + * + * Nesting ternary expressions can make code more difficult to understand. + */ + "unicorn/no-nested-ternary": "deny", + /** Disallow new `Array()`. */ + "unicorn/no-new-array": "deny", + /** Disallows the deprecated new `Buffer()` constructor. */ + "unicorn/no-new-buffer": "deny", + /** + * Disallow the use of the `null` literal, to encourage using undefined instead. + * + * There are some reasons for using `undefined` instead of `null`. + * + * - From experience, most developers use `null` and `undefined` inconsistently and interchangeably, and few know when + * to use which. + * - Supporting both `null` and `undefined` complicates input validation. + * - Using `null` makes TypeScript types more verbose: `type A = {foo?: string | null} vs type A = {foo?: string}`. + */ + "unicorn/no-null": [ + "deny", + { + checkStrictEquality: true, + }, + ], + /** Disallow the use of an object literal as a default value for a parameter. */ + "unicorn/no-object-as-default-parameter": "deny", + /** + * Disallow all usage of `process.exit()`. + * + * `process.exit()` should generally only be used in command-line utilities. In all other types of applications, the + * code should throw an error instead. + */ + "unicorn/no-process-exit": "deny", + /** Disallow passing single-element arrays to `Promise` methods. */ + "unicorn/no-single-promise-in-promise-methods": "deny", + /** Disallow `class` declarations that exclusively contain `static` members. */ + "unicorn/no-static-only-class": "deny", + /** Disallow defining a `then` property. */ + "unicorn/no-thenable": "deny", + /** Disallow assigning `this` to a variable. */ + "unicorn/no-this-assignment": "deny", + /** Disallow `typeof` comparisons with `undefined`. */ + "unicorn/no-typeof-undefined": "deny", + /** Disallows passing `1` to `Array.prototype.flat`. */ + "unicorn/no-unnecessary-array-flat-depth": "deny", + /** + * Disallows passing `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#splice()` or + * `Array#toSpliced()`. + */ + "unicorn/no-unnecessary-array-splice-count": "deny", + /** Disallow awaiting on non-`Promise` values. */ + "unicorn/no-unnecessary-await": "deny", + /** Disallows unnecessarily passing a second argument to `slice(...)`, for cases where it would not change the result. */ + "unicorn/no-unnecessary-slice-end": "deny", + /** + * Disallows destructuring values from an array in ways that are difficult to read. + * + * Destructuring can be very useful, but it can also make some code harder to read. This rule prevents ignoring + * consecutive values (e.g. `let [,,foo] = array`) when destructuring from an array. + */ + "unicorn/no-unreadable-array-destructuring": "deny", + /** This rule disallows IIFEs with a parenthesized arrow function body. */ + "unicorn/no-unreadable-iife": "deny", + /** + * Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`. + * + * It is unnecessary to pass an empty array or empty string when constructing a `Set`, `Map`, `WeakSet`, or `WeakMap`, + * since they accept nullish values. + * + * It is also unnecessary to provide a fallback for possible nullish values. + */ + "unicorn/no-useless-collection-argument": "deny", + /** + * Disallows unnecessary `Error.captureStackTrace(…)` in error constructors. + * + * Calling `Error.captureStackTrace(…)` inside the constructor of a built-in `Error` subclass is unnecessary, since + * the `Error` constructor calls it automatically. + */ + "unicorn/no-useless-error-capture-stack-trace": "deny", + /** Disallow useless fallback when spreading in object litterals. */ + "unicorn/no-useless-fallback-in-spread": "deny", + /** It checks for an unnecessary array length check in a logical expression. */ + "unicorn/no-useless-length-check": "deny", + /** + * Disallows returning values wrapped in `Promise.resolve` or `Promise.reject` in an async function or a + * `Promise#then/catch/finally` callback. + */ + "unicorn/no-useless-promise-resolve-reject": [ + "deny", + { + allowReject: false, + }, + ], + /** + * Disallows using spread syntax in following, unnecessary cases: + * + * - Spread an array literal as elements of an array literal + * - Spread an array literal as arguments of a call or a new call + * - Spread an object literal as properties of an object literal + * - Use spread syntax to clone an array created inline + */ + "unicorn/no-useless-spread": "deny", + /** Disallows useless `default` cases in `switch` statements. */ + "unicorn/no-useless-switch-case": "deny", + /** Prevents usage of undefined in cases where it would be useless. */ + "unicorn/no-useless-undefined": "deny", + /** + * Prevents the use of zero fractions. + * + * There is no difference in JavaScript between, for example, `1,` `1.0` and `1.`, so prefer the former for consistency and brevity. + */ + "unicorn/no-zero-fractions": "deny", + /** + * This rule enforces proper case for numeric literals. + * + * When both an identifier and a numeric literal are in lower case, it can be hard to differentiate between them. + */ + "unicorn/number-literal-case": "deny", + /** + * Enforces a convention of grouping digits using numeric separators. + * + * A long series of digits can be difficult to read, and it can be difficult to determine the value of the number at a glance. Breaking up the digits with numeric separators (`_`) can greatly improve readability. + */ + "unicorn/numeric-separators-style": [ + "deny", + { + binary: { + groupLength: 3, + minimumDigits: 4, + }, + hexadecimal: { + groupLength: 3, + minimumDigits: 4, + }, + number: { + groupLength: 3, + minimumDigits: 4, + }, + octal: { + groupLength: 3, + minimumDigits: 4, + }, + onlyIfContainsSeparator: false, + }, + ], + /** + * Enforces the use of `.addEventListener()` and `.removeEventListener()` over their on-function counterparts. + * + * For example, `foo.addEventListener('click', handler);` is preferred over `foo.onclick = handler;` for HTML DOM Events. + * + * There are numerous advantages of using `addEventListener`. Some of these advantages include registering unlimited event handlers and optionally having the event handler invoked only once. + */ + "unicorn/prefer-add-event-listener": "deny", + /** + * Encourages using `Array.prototype.find` instead of `filter(...)[0]` or similar patterns when only the first + * matching element is needed. + */ + "unicorn/prefer-array-find": "deny", + /** Prefers `Array#flat()` over legacy techniques to flatten arrays. */ + "unicorn/prefer-array-flat": "deny", + /** Prefers the use of `.flatMap()` when `map().flat()` are used together. */ + "unicorn/prefer-array-flat-map": "deny", + /** + * Enforces using `indexOf` or `lastIndexOf` instead of `findIndex` or `findLastIndex` when the callback is a simple strict equality comparison. + * + * Using `findIndex(x => x === value)` is unnecessarily verbose when `indexOf(value)` accomplishes the same thing more concisely and clearly. It also avoids the overhead of creating a callback function. + */ + "unicorn/prefer-array-index-of": "deny", + /** + * Prefers using `Array#some()` over `Array#find()`, `Array#findLast()` with comparing to `undefined`, or + * `Array#findIndex()`, `Array#findLastIndex()` and a non-zero length check on the result of `Array#filter()`. + */ + "unicorn/prefer-array-some": "deny", + /** + * Prefer the `Array#at()` and `String#at()` methods for index access. + * + * This rule also discourages using `String#charAt()`. + */ + "unicorn/prefer-at": [ + "deny", + { + /** + * Check all index access, not just special patterns like `array.length - 1`. When enabled, `array[0]`, + * `array[1]`, etc. will also be flagged. + */ + checkAllIndexAccess: true, + /** + * List of function names to treat as "get last element" functions. These functions will be checked for `.at(-1)` + * usage. + */ + getLastElementFunctions: [], + }, + ], + /** + * Requires using `BigInt` literals (e.g. `123n`) instead of calling the `BigInt()` constructor with literal arguments such as numbers or numeric strings. + * + * Using `BigInt(…)` with literal values is unnecessarily verbose and less idiomatic than using a `BigInt` literal. + */ + "unicorn/prefer-bigint-literals": "deny", + /** + * Recommends using `Blob#text()` and `Blob#arrayBuffer()` over `FileReader#readAsText()` and + * `FileReader#readAsArrayBuffer()`. + */ + "unicorn/prefer-blob-reading-methods": "deny", + /** + * Prefers class field declarations over `this` assignments in constructors for static values. + * + * Class field declarations are more readable and less error-prone than assigning static values to `this` in the constructor. Using class fields keeps the constructor cleaner and makes the intent clearer. + */ + "unicorn/prefer-class-fields": "deny", + /** + * Prefers the use of `element.classList.toggle(className, condition)` over conditional add/remove patterns. + * + * The `toggle()` method is more concise and expressive than using conditional logic to switch between `add()` and `remove()`. + */ + "unicorn/prefer-classlist-toggle": "deny", + /** + * Prefers usage of `String.prototype.codePointAt` over `String.prototype.charCodeAt.` Prefers usage of + * `String.fromCodePoint` over `String.fromCharCode`. + */ + "unicorn/prefer-code-point": "deny", + /** Prefers use of `Date.now()` over new `Date().getTime()` or new `Date().valueOf()`. */ + "unicorn/prefer-date-now": "deny", + /** + * Instead of reassigning a function parameter, default parameters should be used. The `foo = foo || 123` statement evaluates to `123` when `foo` is falsy, possibly leading to confusing behavior, whereas default parameters only apply when passed an `undefined` value. This rule only reports reassignments to literal values. + * + *You should disable this rule if you want your functions to deal with `null` and other falsy values the same way as `undefined`. Default parameters are exclusively applied when undefined is received.. However, we recommend moving away from null. + * + * Using default parameters makes it clear that a parameter has a default value, improving code readability and maintainability. + */ + "unicorn/prefer-default-parameters": "deny", + /** + * Enforces the use of, for example, `document.body.append(div);` over `document.body.appendChild(div);` for DOM + * nodes. + */ + "unicorn/prefer-dom-node-append": "deny", + /** + * Use `.dataset` on DOM elements over `getAttribute(…)`, `.setAttribute(…)`, `.removeAttribute(…)` and + * ``.hasAttribute(…)`. + */ + "unicorn/prefer-dom-node-dataset": "allow", + /** Prefers the use of `child.remove()` over `parentNode.removeChild(child)`. */ + "unicorn/prefer-dom-node-remove": "deny", + /** + * Enforces the use of `.textContent` over `.innerText` for DOM nodes. + * + * There are some disadvantages of using `.innerText`. + * + * - `.innerText` is much more performance-heavy as it requires layout information to return the result. + * - `.innerText` is defined only for `HTMLElement` objects, while `.textContent` is defined for all `Node` objects. + * - `.innerText` is not standard, for example, it is not present in Firefox. + */ + "unicorn/prefer-dom-node-text-content": "deny", + /** + * Prefers `EventTarget` over `EventEmitter`. + * + * This rule reduces the bundle size and makes your code more cross-platform friendly. + */ + "unicorn/prefer-event-target": "deny", + /** + * Enforces the use of `globalThis` instead of environment‑specific global object aliases `(window,` `self,` or `global`). + * + * Using the standard `globalThis` makes your code portable across browsers, Web Workers, Node.js, and future JavaScript runtimes. + * + * `window` is only defined in browser main threads, `self` is used in Web Workers, and `global` is Node‑specific. Choosing the wrong alias causes runtime crashes when the code is executed outside of its original environment. + * + * `globalThis` clearly communicates that you are referring to the global object itself rather than a particular platform. + */ + "unicorn/prefer-global-this": "deny", + /** + * Prefer `includes()` over `indexOf()` when checking for existence or non-existence. All built-ins have `.includes()` in addition to `.indexOf()`. + * + * The `.includes()` method is more readable and less error-prone than `.indexOf()`. + */ + "unicorn/prefer-includes": "deny", + /** + * Enforces the use of `KeyboardEvent#key` over `KeyboardEvent#keyCode`, which is deprecated. + * + *The `.key` property is also more semantic and readable. + * + * The `keyCode,` `which`, and `charCode` properties are deprecated and should be avoided in favor of the `key` property. + */ + "unicorn/prefer-keyboard-event-key": "deny", + /** + * This rule finds ternary expressions that can be simplified to a logical operator. + * + * Using a logical operator is shorter and simpler than a ternary expression. + */ + "unicorn/prefer-logical-operator-over-ternary": "deny", + /** Prefers use of `Math.min()` and `Math.max()` instead of ternary expressions when performing simple comparisons. */ + "unicorn/prefer-math-min-max": "deny", + /** Prefers use of `Math.trunc()` instead of bitwise operations for clarity and more reliable results. */ + "unicorn/prefer-math-trunc": "deny", + /** + * Enforces the use of: + * + * - `childNode.replaceWith(newNode)` over `parentNode.replaceChild(newNode, oldNode)` ; + * - `referenceNode.before(newNode)` over `parentNode.insertBefore(newNode, referenceNode)` ; + * - `referenceNode.before('text')` over `referenceNode.insertAdjacentText('beforebegin', 'text')` ; + * - `referenceNode.before(newNode)` over `referenceNode.insertAdjacentElement('beforebegin', newNode)`. + */ + "unicorn/prefer-modern-dom-apis": "deny", + /** + * Checks for usage of legacy patterns for mathematical operations. + * + * Modern JavaScript provides more concise and readable alternatives to legacy patterns. + * + * Currently, the following cases are checked: + * + * - Prefer `Math.log10(x)` over alternatives + * - Prefer `Math.hypot(…)` over alternatives + */ + "unicorn/prefer-modern-math-apis": "deny", + /** + * Prefer JavaScript modules (ESM) over CommonJS. + * + * CommonJS globals and patterns (`require`, `module`, `exports`, `__filename`, `__dirname`) make code harder to + * migrate and can block ESM-only features. + */ + "unicorn/prefer-module": "deny", + /** Prefers built in functions, over custom ones with the same functionality. */ + "unicorn/prefer-native-coercion-functions": "deny", + /** + * Prefer using a negative index over `.length - index` when possible. + * + * Using a negative index with `at` or `slice` is generally more readable and concise than using `.length - index`. + */ + "unicorn/prefer-negative-index": "deny", + /** + * Prefer using the `node:protocol` when importing Node.js builtin modules. + * + * Node.js builtin modules should be imported using the `node:` protocol to avoid ambiguity with local modules. + */ + "unicorn/prefer-node-protocol": "deny", + /** + * Disallows use of parseInt(), parseFloat(), isNan(), isFinite(), Nan, Infinity and -Infinity as global variables. + * + * ECMAScript 2015 moved globals onto the Number constructor for consistency and to slightly improve them. This rule + * enforces their usage to limit the usage of globals: + * + * - `Number.parseInt()` over `parseInt()` + * - `Number.parseFloat()` over `parseFloat()` + * - `Number.isNaN()` over `isNaN()` (they have slightly different behavior) + * - `Number.isFinite()` over `isFinite()` (they have slightly different behavior) + * - `Number.NaN` over `NaN` + * - `Number.POSITIVE_INFINITY` over `Infinity` + * - `Number.NEGATIVE_INFINITY` over `-Infinity` + */ + "unicorn/prefer-number-properties": [ + "deny", + { + /** If set to `true`, checks for usage of `Infinity` and `-Infinity` as global variables. */ + checkInfinity: true, + /** If set to `true`, checks for usage of `NaN` as a global variable. */ + checkNaN: true, + }, + ], + /** + * Encourages using `Object.fromEntries` when converting an array of key-value pairs into an object. + * + * Manually constructing objects from key-value pairs using `reduce` or `forEach` is more verbose, error-prone, and harder to understand. The `Object.fromEntries` method is clearer, more declarative, and built for exactly this purpose. + */ + "unicorn/prefer-object-from-entries": "deny", + /** + * Prefers omitting the catch binding parameter if it is unused. + * + * It is unnecessary to bind the error to a variable if it is not used. + */ + "unicorn/prefer-optional-catch-binding": "deny", + /** + * “Borrowing” a method from an instance of `Array` or `Object` is less clear than getting it from the corresponding + * prototype. + */ + "unicorn/prefer-prototype-methods": "deny", + /** + * Prefer `.querySelector()` over `.getElementById().` And prefer `.querySelectorAll()` over + * `.getElementsByClassName()`, `.getElementsByTagName()`, and `.getElementsByName()`. + */ + "unicorn/prefer-query-selector": "deny", + /** + * Disallows the use of `Function.prototype.apply()` and suggests using `Reflect.apply()` instead. + * + * `Reflect.apply()` is arguably less verbose and easier to understand. In addition, when you accept arbitrary methods, it's not safe to assume `.apply()` exists or is not overridden. + */ + "unicorn/prefer-reflect-apply": "deny", + /** Prefers `RegExp#test()` over `String#match()` and `String#exec()`. */ + "unicorn/prefer-regexp-test": "deny", + /** + * Enforces the use of `Response.json()` over `new Response(JSON.stringify())`. + * + * `Response.json()` is a more concise and semantically clear way to create JSON responses. It automatically sets the correct `Content-Type` header (`application/json`) and handles serialization, making the code more maintainable and less error-prone. + */ + "unicorn/prefer-response-static-json": "deny", + /** Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence. */ + "unicorn/prefer-set-has": "deny", + /** Prefer `Set#size` over `Set#length` when the `Set` is converted to an array. */ + "unicorn/prefer-set-size": "deny", + /** + * Enforces the use of the spread operator (...) over outdated patterns. + * + * Using the spread operator is more concise and readable. + */ + "unicorn/prefer-spread": "deny", + /** + * Prefers use of `String.raw` to avoid escaping `\`. + * + * Excessive backslashes can make string values less readable which can be avoided by using `String.raw`. + */ + "unicorn/prefer-string-raw": "deny", + /** Prefers `String#replaceAll()` over `String#replace()` when using a regex with the global flag. */ + "unicorn/prefer-string-replace-all": "deny", + /** Prefer `String#slice()` over `String#substr()` and `String#substring()`. */ + "unicorn/prefer-string-slice": "deny", + /** Prefer `String#startsWith()` and `String#endsWith()` over using a regex with `/^foo/` or `/foo$/`. */ + "unicorn/prefer-string-starts-ends-with": "deny", + /** + * `String#trimLeft()` and `String#trimRight()` are aliases of `String#trimStart()` and `String#trimEnd()`. This is to ensure consistency and use direction-independent wording. + * + * The `trimLeft` and `trimRight` names are confusing and inconsistent with the rest of the language. + */ + "unicorn/prefer-string-trim-start-end": "deny", + /** + * Prefer using `structuredClone` to create a deep clone. + * + * `structuredClone` is the modern way to create a deep clone of a value. + */ + "unicorn/prefer-structured-clone": "deny", + /** + * Prefers ternary expressions over simple `if/else` statements. + * + * Simple `if/else` branches for the same operation are often shorter and clearer when expressed as a ternary. + * + * Je n'aime pas les ternaires. + */ + "unicorn/prefer-ternary": "allow", + /** Prefer top-level await over top-level promises and async function calls. */ + "unicorn/prefer-top-level-await": "deny", + /** Enforce throwing a `TypeError` instead of a generic `Error` after a type checking if-statement. */ + "unicorn/prefer-type-error": "deny", + /** + * Enforce consistent relative URL style. + * + * When using a relative URL in `new URL()`, the URL should either never or always use the `./` prefix consistently. + */ + "unicorn/relative-url-style": [ + "deny", + /* Always add a ./ prefix to the relative URL when possible. */ + "always", + ], + /** + * Enforce using the separator argument with `Array#join()`. + * + * It's better to make it clear what the separator is when calling `Array#join()`, instead of relying on the default comma (`','`) separator. + */ + "unicorn/require-array-join-separator": "deny", + /** + * This rule enforces non-empty attribute list in `import`/`export` statements and `import()` expressions. + * + * Import attributes are meant to provide metadata about how a module should be loaded (e.g., with `{ type: "json" + * }`). An empty attribute object provides no information and should be removed. + */ + "unicorn/require-module-attributes": "deny", + /** + * Enforce non-empty specifier list in `import` and `export` statements. + * + * Empty `import`/`export` specifiers add no value and can be confusing. If you want to import a module for side effects, use `import 'module'` instead. + */ + "unicorn/require-module-specifiers": "deny", + /** Enforce using the digits argument with `Number#toFixed()`. */ + "unicorn/require-number-to-fixed-digits-argument": "deny", + /** + * Enforce using the `targetOrigin` argument with `window.postMessage()`. + * + * Note that this rule may have false positives, as it is not capable of detecting all cases correctly without type information. As such, it may not be a good idea to enable in cases where `postMessage()` may be used with `BroadcastChannel` or worker/service worker contexts (for example, `WorkerGlobalScope#postMessage`, where the second argument is a transfer list or options object, not `targetOrigin`). + * + * When calling `window.postMessage()` without the `targetOrigin` argument, the message cannot be received by any window. + */ + "unicorn/require-post-message-target-origin": "deny", + /** + * Requires empty switch cases to omit braces, while non-empty cases must use braces. This reduces visual clutter for + * empty cases and enforces proper scoping for non-empty ones. + * + * Using braces unnecessarily for empty cases adds visual noise, while omitting braces in non-empty cases can lead to + * scoping issues. + */ + "unicorn/switch-case-braces": [ + "deny", + /* Allow braces only when needed for scoping (e.g., variable or function declarations). */ + "avoid", + ], + /** + * Enforce consistent `break`/`return`/`continue`/`throw` position in case clauses. + * + * Enforce that terminating statements (`break`, `return`, `continue`, `throw`) appear inside the block statement of a `case` clause, not after it. This can happen when refactoring — for example, removing an `if` wrapper but leaving the `break` outside the braces. + */ + "unicorn/switch-case-break-position": "deny", + /** + * This rule enforces consistent casing for text encoding identifiers, specifically: + * + * - `'utf8'` instead of `'UTF-8'` or `'utf-8'` (or `'utf-8'` if `withDash` is enabled) ; + * - `'ascii'` instead of `'ASCII'`. + * + * Inconsistent casing of encoding identifiers reduces code readability and can lead to subtle confusion across a + * codebase. Although casing is not strictly enforced by ECMAScript or Node.js, using lowercase is the conventional + * and widely recognized style. + */ + "unicorn/text-encoding-identifier-case": "deny", + /** + * This rule makes sure you always use new when throwing an error. + * + * In JavaScript, omitting `new` (e.g., `throw Error('message')`) is allowed, but it does not properly initialize the + * error object. This can lead to missing stack traces or incorrect prototype chains. Using `new` makes the intent + * clear, ensures consistent behavior, and helps avoid subtle bugs. + */ + "unicorn/throw-new-error": "deny", }; export default unicornRules;