From 5fa84e0b57d1bdedbf100cd7a8950373f1ca44f4 Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Sun, 7 Apr 2024 12:53:53 +0200 Subject: [PATCH 01/14] feat(eslint-config)!: update to eslint v9, flat config only BREAKING CHANGE: This package now only exports a flat config. For more information see the [eslint migration guide](https://eslint.org/blog/2024/04/eslint-v9.0.0-released) and [flat config guide](https://eslint.org/blog/2022/08/new-config-system-part-2/). The README of this package has instructions for how to use this package with the new flat config system. --- packages/eslint-config/README.md | 48 +- packages/eslint-config/package.json | 21 +- packages/eslint-config/src/index.ts | 693 +- .../tests/__snapshots__/eslint.test.ts.snap | 12707 +++++++++++++++- packages/eslint-config/tests/eslint.test.ts | 3 - packages/eslint-config/tsup.config.ts | 8 - yarn.lock | 169 +- 7 files changed, 12911 insertions(+), 738 deletions(-) diff --git a/packages/eslint-config/README.md b/packages/eslint-config/README.md index e4474f58c6..b12b12dfa9 100644 --- a/packages/eslint-config/README.md +++ b/packages/eslint-config/README.md @@ -21,46 +21,31 @@ You can use the following command to install this package, or replace `npm insta npm install --save-dev @sapphire/eslint-config ``` +It is important to note that this package only exports [ESLint Flat Config][]! This means that you _have_ to use `eslint.config.js`, `eslint.config.mjs`, or `eslint.config.cjs` to use this package. See the ESLint documentation on flat config for more information. + --- ## Usage -Add the ESLint config to your `package.json`: - -```json -{ - "name": "my-project", - "eslintConfig": { - "extends": "@sapphire" - } -} -``` - -Or to `eslintrc.js` / `.eslintrc.json`: +1. Create a file `eslint.config.mjs` in the root of your project. +2. Add the following content to the file: -```json -{ - "extends": "@sapphire" -} -``` - -Or to `eslint.config.js`: - -``` -const { FlatCompat } = require('@eslint/eslintrc') -const sapphireEslintConfig = require('@sapphire/eslint-config') +```js +import sapphireEslintConfig from '@sapphire/eslint-config'; -const compat = new FlatCompat() +/** + * @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigArray} + */ +const config = [ + // Additional config here + ...sapphireEslintConfig + // or here +]; -module.exports = [ - ...compat.config(sapphireEslintConfig), - { - // other configs - } -] +export default config; ``` -Create `tsconfig.eslint.json` next to the eslint config file, for example with content: +3. Create `tsconfig.eslint.json` next to the eslint config file, for example with content: ```json { @@ -93,3 +78,4 @@ Thank you to all the people who already contributed to Sapphire! [contributing]: https://github.com/sapphiredev/.github/blob/main/.github/CONTRIBUTING.md +[ESLint Flat Config]: https://eslint.org/blog/2022/08/new-config-system-part-2/ diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 95ed8e2b7e..1d39c3ceae 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -6,11 +6,14 @@ "license": "MIT", "main": "dist/cjs/index.cjs", "module": "dist/esm/index.mjs", + "types": "dist/cjs/index.d.cts", "exports": { "import": { + "types": "./dist/esm/index.d.mts", "default": "./dist/esm/index.mjs" }, "require": { + "types": "./dist/cjs/index.d.cts", "default": "./dist/cjs/index.cjs" } }, @@ -19,19 +22,26 @@ "scripts": { "test": "vitest run", "prelint": "yarn test && yarn build", - "build": "tsup", + "build": "tsup && yarn build:rename-cjs-index", + "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", "prepack": "yarn build", "bump": "cliff-jumper", "check-update": "cliff-jumper --dry-run" }, "dependencies": { + "@eslint/js": "^9.0.0", + "@types/eslint-config-prettier": "^6.11.3", + "@types/eslint__js": "^8.42.3", "@typescript-eslint/eslint-plugin": "^7.10.0", "@typescript-eslint/parser": "^7.10.0", - "eslint": "^8.57.0", + "@typescript-eslint/utils": "^7.5.0", + "eslint": "^9.0.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.3", + "globals": "^15.0.0", "prettier": "^3.2.5", - "typescript": "^5.4.5" + "typescript": "^5.4.5", + "typescript-eslint": "^7.5.0" }, "repository": { "type": "git", @@ -42,8 +52,8 @@ "dist/" ], "engines": { - "node": ">=v14.0.0", - "npm": ">=7.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0", + "npm": ">=10.0.0" }, "keywords": [ "sapphiredev", @@ -65,6 +75,7 @@ "@favware/cliff-jumper": "^3.0.3", "@vitest/coverage-v8": "^1.6.0", "tsup": "^8.0.2", + "tsx": "^4.7.2", "typedoc-json-parser": "^10.0.0", "vitest": "^1.6.0" } diff --git a/packages/eslint-config/src/index.ts b/packages/eslint-config/src/index.ts index ceaa97742e..ec87fe84b9 100644 --- a/packages/eslint-config/src/index.ts +++ b/packages/eslint-config/src/index.ts @@ -1,344 +1,365 @@ +import eslint from '@eslint/js'; +import type { TSESLint } from '@typescript-eslint/utils'; +import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; +import globals from 'globals'; +import tseslint from 'typescript-eslint'; + /** * Standard ESLint config for the Sapphire Community + * * @example - * ```json - * { - * "extends": "@sapphire" - * } + * file: `eslint.config.mjs` + * ```js + * const sapphireEslintConfig = require('./packages/eslint-config'); + * + * const config = [ + * ...sapphireEslintConfig, + * ]; + * + * export default config; + * ``` + * + * Optionally, you can type the config object as + * ``` + * import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigArray * ``` + * with a JSDoc `@type` comment to enable type checking. */ -const eslintConfig = { - root: true, - parser: '@typescript-eslint/parser', - parserOptions: { - project: './tsconfig.eslint.json', - sourceType: 'module', - ecmaVersion: 2020, - warnOnUnsupportedTypeScriptVersion: false - }, - extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'], - env: { - node: true, - es6: true, - es2017: true, - es2020: true, - jest: true, - browser: true, - commonjs: true - }, - rules: { - '@typescript-eslint/adjacent-overload-signatures': 'error', - '@typescript-eslint/array-type': 'off', - '@typescript-eslint/await-thenable': 'off', - '@typescript-eslint/ban-ts-comment': [ - 'error', - { - minimumDescriptionLength: 3, - 'ts-check': true, - 'ts-expect-error': 'allow-with-description', - 'ts-ignore': 'allow-with-description', - 'ts-nocheck': true - } - ], - '@typescript-eslint/class-literal-property-style': 'error', - '@typescript-eslint/consistent-type-definitions': 'error', - '@typescript-eslint/default-param-last': 'error', - '@typescript-eslint/dot-notation': [ - 'error', - { - allowKeywords: true, - allowPattern: '(^[A-Z])|(^[a-z]+(_[a-z]+)+$)', - allowPrivateClassPropertyAccess: true - } - ], - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/explicit-member-accessibility': 'error', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/init-declarations': 'off', - '@typescript-eslint/member-ordering': [ - 'error', - { - default: [ - 'signature', - 'public-instance-field', - 'protected-instance-field', - 'private-instance-field', - 'instance-field', - 'public-constructor', - 'protected-constructor', - 'private-constructor', - 'constructor', - 'public-instance-method', - 'protected-instance-method', - 'private-instance-method', - 'instance-method', - 'public-static-field', - 'protected-static-field', - 'private-static-field', - 'static-field', - 'public-static-method', - 'protected-static-method', - 'private-static-method', - 'static-method' - ] - } - ], - '@typescript-eslint/no-base-to-string': 'error', - '@typescript-eslint/no-dupe-class-members': 'error', - '@typescript-eslint/no-empty-interface': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@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-invalid-this': 'error', - '@typescript-eslint/no-invalid-void-type': 'error', - '@typescript-eslint/no-misused-new': 'error', - '@typescript-eslint/no-namespace': 'off', - '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', - '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/no-throw-literal': 'error', - '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error', - '@typescript-eslint/no-unnecessary-qualifier': 'error', - '@typescript-eslint/no-unsafe-assignment': 'off', - '@typescript-eslint/no-unsafe-call': 'off', - '@typescript-eslint/no-unsafe-declaration-merging': 'off', - '@typescript-eslint/no-unsafe-member-access': 'off', - '@typescript-eslint/no-unsafe-return': 'off', - '@typescript-eslint/no-unused-vars': 'off', - '@typescript-eslint/no-use-before-define': 'off', - '@typescript-eslint/no-useless-constructor': 'error', - '@typescript-eslint/no-var-requires': 'error', - '@typescript-eslint/prefer-as-const': 'error', - '@typescript-eslint/prefer-for-of': 'error', - '@typescript-eslint/prefer-includes': 'error', - '@typescript-eslint/prefer-literal-enum-member': 'off', - '@typescript-eslint/prefer-reduce-type-parameter': 'error', - '@typescript-eslint/prefer-string-starts-ends-with': 'error', - '@typescript-eslint/promise-function-async': 'off', - '@typescript-eslint/require-await': 'error', - '@typescript-eslint/restrict-plus-operands': 'off', - '@typescript-eslint/switch-exhaustiveness-check': 'warn', - '@typescript-eslint/unbound-method': 'error', - '@typescript-eslint/unified-signatures': 'error', - 'accessor-pairs': 'off', - 'array-callback-return': 'error', - 'block-scoped-var': 'error', - 'callback-return': 'off', - 'capitalized-comments': 'off', - 'class-methods-use-this': 'off', - complexity: 'off', - 'consistent-return': 'off', - 'consistent-this': ['error', 'self'], - 'constructor-super': 'off', - 'default-case': 'off', - 'dot-notation': 'off', - eqeqeq: ['error', 'smart'], - 'for-direction': 'off', - 'func-name-matching': ['warn', 'always'], - 'func-names': ['warn', 'as-needed'], - 'func-style': 'off', - 'global-require': 'off', - 'guard-for-in': 'warn', - 'handle-callback-err': 'off', - 'id-blacklist': 'off', - 'id-length': 'off', - 'id-match': 'off', - 'init-declarations': 'off', - 'line-comment-position': 'off', - 'lines-between-class-members': [ - 'error', - 'always', - { - exceptAfterSingleLine: true - } - ], - 'max-depth': 'off', - 'max-lines': 'off', - 'max-nested-callbacks': 'off', - 'max-params': 'off', - 'max-statements': 'off', - 'max-statements-per-line': [ - 'error', - { - max: 1 - } - ], - 'multiline-comment-style': 'off', - 'new-cap': 'off', - 'no-alert': 'error', - 'no-array-constructor': 'off', - 'no-await-in-loop': 'off', - 'no-bitwise': 'off', - 'no-buffer-constructor': 'error', - 'no-caller': 'error', - 'no-case-declarations': 'error', - 'no-catch-shadow': 'error', - 'no-class-assign': 'warn', - 'no-compare-neg-zero': 'error', - 'no-cond-assign': 'warn', - 'no-console': 'off', - 'no-const-assign': 'error', - 'no-constant-condition': 'off', - 'no-control-regex': 'off', - 'no-debugger': 'error', - 'no-delete-var': 'error', - 'no-div-regex': 'off', - 'no-dupe-args': 'error', - 'no-dupe-class-members': 'off', - 'no-dupe-keys': 'error', - 'no-duplicate-case': 'error', - 'no-duplicate-imports': 'off', - 'no-else-return': 'warn', - 'no-empty': 'off', - 'no-empty-character-class': 'error', - 'no-empty-function': 'off', - 'no-empty-pattern': 'off', - 'no-eq-null': 'warn', - 'no-eval': 'warn', - 'no-ex-assign': 'off', - 'no-extend-native': 'warn', - 'no-extra-bind': 'off', - 'no-extra-boolean-cast': 'off', - 'no-extra-label': 'warn', - 'no-fallthrough': 'off', - 'no-func-assign': 'off', - 'no-global-assign': 'off', - 'no-implicit-coercion': 'error', - 'no-implicit-globals': 'off', - 'no-implied-eval': 'off', - 'no-import-assign': 'warn', - 'no-inline-comments': 'off', - 'no-inner-declarations': 'off', - 'no-invalid-regexp': 'warn', - 'no-invalid-this': 'off', - 'no-irregular-whitespace': [ - 'error', - { - skipComments: true, - skipRegExps: true, - skipStrings: true, - skipTemplates: true +const eslintConfig: TSESLint.FlatConfig.ConfigArray = tseslint.config( + eslint.configs.recommended, + ...tseslint.configs.recommended, + { + languageOptions: { + globals: { + ...globals.node, + ...globals.es2017, + ...globals.es2020, + ...globals.browser, + ...globals.jest, + ...globals.commonjs + }, + parserOptions: { + project: './tsconfig.eslint.json', + sourceType: 'module', + ecmaVersion: 2020, + warnOnUnsupportedTypeScriptVersion: false } - ], - 'no-iterator': 'off', - 'no-label-var': 'error', - 'no-labels': 'off', - 'no-lone-blocks': 'off', - 'no-lonely-if': 'error', - 'no-loop-func': 'off', - 'no-magic-numbers': 'off', - 'no-mixed-requires': 'error', - 'no-multi-assign': 'warn', - 'no-multi-str': 'error', - 'no-negated-condition': 'warn', - 'no-nested-ternary': 'off', - 'no-new': 'off', - 'no-new-func': 'warn', - 'no-new-object': 'error', - 'no-new-require': 'error', - 'no-new-symbol': 'warn', - 'no-new-wrappers': 'warn', - 'no-obj-calls': 'warn', - 'no-octal': 'error', - 'no-octal-escape': 'error', - 'no-param-reassign': 'off', - 'no-path-concat': 'warn', - 'no-plusplus': 'off', - 'no-process-env': 'off', - 'no-process-exit': 'off', - 'no-proto': 'off', - 'no-prototype-builtins': 'off', - 'no-redeclare': 'off', - 'no-regex-spaces': 'warn', - 'no-restricted-globals': 'off', - 'no-restricted-imports': 'off', - 'no-restricted-modules': 'off', - 'no-restricted-properties': 'off', - 'no-restricted-syntax': 'off', - 'no-return-assign': 'off', - 'no-return-await': 'warn', - 'no-script-url': 'off', - 'no-self-assign': 'error', - 'no-self-compare': 'warn', - 'no-setter-return': 'warn', - 'no-shadow': 'off', - 'no-shadow-restricted-names': 'error', - 'no-sparse-arrays': 'warn', - 'no-sync': 'off', - 'no-template-curly-in-string': 'error', - 'no-ternary': 'off', - 'no-this-before-super': 'error', - 'no-throw-literal': 'off', - 'no-undef': 'off', - 'no-undef-init': 'off', - 'no-undefined': 'off', - 'no-underscore-dangle': 'off', - 'no-unmodified-loop-condition': 'off', - 'no-unneeded-ternary': 'off', - 'no-unreachable': 'warn', - 'no-unsafe-finally': 'warn', - 'no-unsafe-negation': 'error', - 'no-unused-expressions': 'off', - 'no-unused-labels': 'error', - 'no-unused-vars': 'off', - 'no-use-before-define': 'off', - 'no-useless-call': 'off', - 'no-useless-computed-key': 'error', - 'no-useless-concat': 'warn', - 'no-useless-constructor': 'off', - 'no-useless-escape': 'off', - 'no-useless-rename': 'error', - 'no-useless-return': 'warn', - 'no-var': 'error', - 'no-void': 'off', - 'no-warning-comments': 'off', - 'no-with': 'error', - 'object-shorthand': ['error', 'always'], - 'one-var': ['error', 'never'], - 'operator-assignment': ['error', 'always'], - 'padding-line-between-statements': 'off', - 'prefer-const': [ - 'error', - { - destructuring: 'all' - } - ], - 'prefer-destructuring': [ - 'error', - { - AssignmentExpression: { - array: true, - object: false - }, - VariableDeclarator: { - array: false, - object: true + }, + rules: { + '@typescript-eslint/adjacent-overload-signatures': 'error', + '@typescript-eslint/array-type': 'off', + '@typescript-eslint/await-thenable': 'off', + '@typescript-eslint/ban-ts-comment': [ + 'error', + { + minimumDescriptionLength: 3, + 'ts-check': true, + 'ts-expect-error': 'allow-with-description', + 'ts-ignore': 'allow-with-description', + 'ts-nocheck': true } - } - ], - 'prefer-numeric-literals': 'off', - 'prefer-promise-reject-errors': 'error', - 'prefer-rest-params': 'warn', - 'prefer-spread': 'error', - 'prefer-template': 'warn', - radix: 'error', - 'require-await': 'off', - 'require-jsdoc': 'off', - 'require-yield': 'warn', - 'sort-imports': 'off', - 'sort-keys': 'off', - 'sort-vars': 'off', - 'spaced-comment': ['error', 'always'], - strict: ['error', 'never'], - 'symbol-description': 'warn', - 'use-isnan': 'error', - 'valid-jsdoc': 'off', - 'valid-typeof': 'error', - 'vars-on-top': 'off', - yoda: 'error' - } -}; + ], + '@typescript-eslint/class-literal-property-style': 'error', + '@typescript-eslint/consistent-type-definitions': 'error', + '@typescript-eslint/default-param-last': 'error', + '@typescript-eslint/dot-notation': [ + 'error', + { + allowKeywords: true, + allowPattern: '(^[A-Z])|(^[a-z]+(_[a-z]+)+$)', + allowPrivateClassPropertyAccess: true + } + ], + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/explicit-member-accessibility': 'error', + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/init-declarations': 'off', + '@typescript-eslint/member-ordering': [ + 'error', + { + default: [ + 'signature', + 'public-instance-field', + 'protected-instance-field', + 'private-instance-field', + 'instance-field', + 'public-constructor', + 'protected-constructor', + 'private-constructor', + 'constructor', + 'public-instance-method', + 'protected-instance-method', + 'private-instance-method', + 'instance-method', + 'public-static-field', + 'protected-static-field', + 'private-static-field', + 'static-field', + 'public-static-method', + 'protected-static-method', + 'private-static-method', + 'static-method' + ] + } + ], + '@typescript-eslint/no-base-to-string': 'error', + '@typescript-eslint/no-dupe-class-members': 'error', + '@typescript-eslint/no-empty-interface': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@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-invalid-this': 'error', + '@typescript-eslint/no-invalid-void-type': 'error', + '@typescript-eslint/no-misused-new': 'error', + '@typescript-eslint/no-namespace': 'off', + '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', + '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/no-throw-literal': 'error', + '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error', + '@typescript-eslint/no-unnecessary-qualifier': 'error', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-declaration-merging': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/no-unused-vars': 'off', + '@typescript-eslint/no-use-before-define': 'off', + '@typescript-eslint/no-useless-constructor': 'error', + '@typescript-eslint/no-var-requires': 'error', + '@typescript-eslint/prefer-as-const': 'error', + '@typescript-eslint/prefer-for-of': 'error', + '@typescript-eslint/prefer-includes': 'error', + '@typescript-eslint/prefer-literal-enum-member': 'off', + '@typescript-eslint/prefer-reduce-type-parameter': 'error', + '@typescript-eslint/prefer-string-starts-ends-with': 'error', + '@typescript-eslint/promise-function-async': 'off', + '@typescript-eslint/require-await': 'error', + '@typescript-eslint/restrict-plus-operands': 'off', + '@typescript-eslint/switch-exhaustiveness-check': 'warn', + '@typescript-eslint/unbound-method': 'error', + '@typescript-eslint/unified-signatures': 'error', + 'accessor-pairs': 'off', + 'array-callback-return': 'error', + 'block-scoped-var': 'error', + 'callback-return': 'off', + 'capitalized-comments': 'off', + 'class-methods-use-this': 'off', + complexity: 'off', + 'consistent-return': 'off', + 'consistent-this': ['error', 'self'], + 'constructor-super': 'off', + 'default-case': 'off', + 'dot-notation': 'off', + eqeqeq: ['error', 'smart'], + 'for-direction': 'off', + 'func-name-matching': ['warn', 'always'], + 'func-names': ['warn', 'as-needed'], + 'func-style': 'off', + 'global-require': 'off', + 'guard-for-in': 'warn', + 'handle-callback-err': 'off', + 'id-blacklist': 'off', + 'id-length': 'off', + 'id-match': 'off', + 'init-declarations': 'off', + 'line-comment-position': 'off', + 'lines-between-class-members': [ + 'error', + 'always', + { + exceptAfterSingleLine: true + } + ], + 'max-depth': 'off', + 'max-lines': 'off', + 'max-nested-callbacks': 'off', + 'max-params': 'off', + 'max-statements': 'off', + 'max-statements-per-line': [ + 'error', + { + max: 1 + } + ], + 'multiline-comment-style': 'off', + 'new-cap': 'off', + 'no-alert': 'error', + 'no-array-constructor': 'off', + 'no-await-in-loop': 'off', + 'no-bitwise': 'off', + 'no-buffer-constructor': 'error', + 'no-caller': 'error', + 'no-case-declarations': 'error', + 'no-catch-shadow': 'error', + 'no-class-assign': 'warn', + 'no-compare-neg-zero': 'error', + 'no-cond-assign': 'warn', + 'no-console': 'off', + 'no-const-assign': 'error', + 'no-constant-condition': 'off', + 'no-control-regex': 'off', + 'no-debugger': 'error', + 'no-delete-var': 'error', + 'no-div-regex': 'off', + 'no-dupe-args': 'error', + 'no-dupe-class-members': 'off', + 'no-dupe-keys': 'error', + 'no-duplicate-case': 'error', + 'no-duplicate-imports': 'off', + 'no-else-return': 'warn', + 'no-empty': 'off', + 'no-empty-character-class': 'error', + 'no-empty-function': 'off', + 'no-empty-pattern': 'off', + 'no-eq-null': 'warn', + 'no-eval': 'warn', + 'no-ex-assign': 'off', + 'no-extend-native': 'warn', + 'no-extra-bind': 'off', + 'no-extra-boolean-cast': 'off', + 'no-extra-label': 'warn', + 'no-fallthrough': 'off', + 'no-func-assign': 'off', + 'no-global-assign': 'off', + 'no-implicit-coercion': 'error', + 'no-implicit-globals': 'off', + 'no-implied-eval': 'off', + 'no-import-assign': 'warn', + 'no-inline-comments': 'off', + 'no-inner-declarations': 'off', + 'no-invalid-regexp': 'warn', + 'no-invalid-this': 'off', + 'no-irregular-whitespace': [ + 'error', + { + skipComments: true, + skipRegExps: true, + skipStrings: true, + skipTemplates: true + } + ], + 'no-iterator': 'off', + 'no-label-var': 'error', + 'no-labels': 'off', + 'no-lone-blocks': 'off', + 'no-lonely-if': 'error', + 'no-loop-func': 'off', + 'no-magic-numbers': 'off', + 'no-mixed-requires': 'error', + 'no-multi-assign': 'warn', + 'no-multi-str': 'error', + 'no-negated-condition': 'warn', + 'no-nested-ternary': 'off', + 'no-new': 'off', + 'no-new-func': 'warn', + 'no-new-object': 'error', + 'no-new-require': 'error', + 'no-new-symbol': 'warn', + 'no-new-wrappers': 'warn', + 'no-obj-calls': 'warn', + 'no-octal': 'error', + 'no-octal-escape': 'error', + 'no-param-reassign': 'off', + 'no-path-concat': 'warn', + 'no-plusplus': 'off', + 'no-process-env': 'off', + 'no-process-exit': 'off', + 'no-proto': 'off', + 'no-prototype-builtins': 'off', + 'no-redeclare': 'off', + 'no-regex-spaces': 'warn', + 'no-restricted-globals': 'off', + 'no-restricted-imports': 'off', + 'no-restricted-modules': 'off', + 'no-restricted-properties': 'off', + 'no-restricted-syntax': 'off', + 'no-return-assign': 'off', + 'no-return-await': 'warn', + 'no-script-url': 'off', + 'no-self-assign': 'error', + 'no-self-compare': 'warn', + 'no-setter-return': 'warn', + 'no-shadow': 'off', + 'no-shadow-restricted-names': 'error', + 'no-sparse-arrays': 'warn', + 'no-sync': 'off', + 'no-template-curly-in-string': 'error', + 'no-ternary': 'off', + 'no-this-before-super': 'error', + 'no-throw-literal': 'off', + 'no-undef': 'off', + 'no-undef-init': 'off', + 'no-undefined': 'off', + 'no-underscore-dangle': 'off', + 'no-unmodified-loop-condition': 'off', + 'no-unneeded-ternary': 'off', + 'no-unreachable': 'warn', + 'no-unsafe-finally': 'warn', + 'no-unsafe-negation': 'error', + 'no-unused-expressions': 'off', + 'no-unused-labels': 'error', + 'no-unused-vars': 'off', + 'no-use-before-define': 'off', + 'no-useless-call': 'off', + 'no-useless-computed-key': 'error', + 'no-useless-concat': 'warn', + 'no-useless-constructor': 'off', + 'no-useless-escape': 'off', + 'no-useless-rename': 'error', + 'no-useless-return': 'warn', + 'no-var': 'error', + 'no-void': 'off', + 'no-warning-comments': 'off', + 'no-with': 'error', + 'object-shorthand': ['error', 'always'], + 'one-var': ['error', 'never'], + 'operator-assignment': ['error', 'always'], + 'padding-line-between-statements': 'off', + 'prefer-const': [ + 'error', + { + destructuring: 'all' + } + ], + 'prefer-destructuring': [ + 'error', + { + AssignmentExpression: { + array: true, + object: false + }, + VariableDeclarator: { + array: false, + object: true + } + } + ], + 'prefer-numeric-literals': 'off', + 'prefer-promise-reject-errors': 'error', + 'prefer-rest-params': 'warn', + 'prefer-spread': 'error', + 'prefer-template': 'warn', + radix: 'error', + 'require-await': 'off', + 'require-jsdoc': 'off', + 'require-yield': 'warn', + 'sort-imports': 'off', + 'sort-keys': 'off', + 'sort-vars': 'off', + 'spaced-comment': ['error', 'always'], + strict: ['error', 'never'], + 'symbol-description': 'warn', + 'use-isnan': 'error', + 'valid-jsdoc': 'off', + 'valid-typeof': 'error', + 'vars-on-top': 'off', + yoda: 'error' + } + }, + eslintPluginPrettierRecommended +); -module.exports = eslintConfig; +export default eslintConfig; diff --git a/packages/eslint-config/tests/__snapshots__/eslint.test.ts.snap b/packages/eslint-config/tests/__snapshots__/eslint.test.ts.snap index ce557ee95e..bcc918fdaa 100644 --- a/packages/eslint-config/tests/__snapshots__/eslint.test.ts.snap +++ b/packages/eslint-config/tests/__snapshots__/eslint.test.ts.snap @@ -1,367 +1,12368 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`ESLint Config > should export rules 1`] = ` -{ - "env": { - "browser": true, - "commonjs": true, - "es2017": true, - "es2020": true, - "es6": true, - "jest": true, - "node": true, +[ + { + "rules": { + "constructor-super": "error", + "for-direction": "error", + "getter-return": "error", + "no-async-promise-executor": "error", + "no-case-declarations": "error", + "no-class-assign": "error", + "no-compare-neg-zero": "error", + "no-cond-assign": "error", + "no-const-assign": "error", + "no-constant-binary-expression": "error", + "no-constant-condition": "error", + "no-control-regex": "error", + "no-debugger": "error", + "no-delete-var": "error", + "no-dupe-args": "error", + "no-dupe-class-members": "error", + "no-dupe-else-if": "error", + "no-dupe-keys": "error", + "no-duplicate-case": "error", + "no-empty": "error", + "no-empty-character-class": "error", + "no-empty-pattern": "error", + "no-empty-static-block": "error", + "no-ex-assign": "error", + "no-extra-boolean-cast": "error", + "no-fallthrough": "error", + "no-func-assign": "error", + "no-global-assign": "error", + "no-import-assign": "error", + "no-invalid-regexp": "error", + "no-irregular-whitespace": "error", + "no-loss-of-precision": "error", + "no-misleading-character-class": "error", + "no-new-native-nonconstructor": "error", + "no-nonoctal-decimal-escape": "error", + "no-obj-calls": "error", + "no-octal": "error", + "no-prototype-builtins": "error", + "no-redeclare": "error", + "no-regex-spaces": "error", + "no-self-assign": "error", + "no-setter-return": "error", + "no-shadow-restricted-names": "error", + "no-sparse-arrays": "error", + "no-this-before-super": "error", + "no-undef": "error", + "no-unexpected-multiline": "error", + "no-unreachable": "error", + "no-unsafe-finally": "error", + "no-unsafe-negation": "error", + "no-unsafe-optional-chaining": "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-escape": "error", + "no-with": "error", + "require-yield": "error", + "use-isnan": "error", + "valid-typeof": "error", + }, }, - "extends": [ - "plugin:@typescript-eslint/recommended", - "plugin:prettier/recommended", - ], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 2020, - "project": "./tsconfig.eslint.json", - "sourceType": "module", - "warnOnUnsupportedTypeScriptVersion": false, - }, - "root": true, - "rules": { - "@typescript-eslint/adjacent-overload-signatures": "error", - "@typescript-eslint/array-type": "off", - "@typescript-eslint/await-thenable": "off", - "@typescript-eslint/ban-ts-comment": [ - "error", - { - "minimumDescriptionLength": 3, - "ts-check": true, - "ts-expect-error": "allow-with-description", - "ts-ignore": "allow-with-description", - "ts-nocheck": true, - }, - ], - "@typescript-eslint/class-literal-property-style": "error", - "@typescript-eslint/consistent-type-definitions": "error", - "@typescript-eslint/default-param-last": "error", - "@typescript-eslint/dot-notation": [ - "error", - { - "allowKeywords": true, - "allowPattern": "(^[A-Z])|(^[a-z]+(_[a-z]+)+$)", - "allowPrivateClassPropertyAccess": true, - }, - ], - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/explicit-member-accessibility": "error", - "@typescript-eslint/explicit-module-boundary-types": "off", - "@typescript-eslint/init-declarations": "off", - "@typescript-eslint/member-ordering": [ - "error", - { - "default": [ - "signature", - "public-instance-field", - "protected-instance-field", - "private-instance-field", - "instance-field", - "public-constructor", - "protected-constructor", - "private-constructor", - "constructor", - "public-instance-method", - "protected-instance-method", - "private-instance-method", - "instance-method", - "public-static-field", - "protected-static-field", - "private-static-field", - "static-field", - "public-static-method", - "protected-static-method", - "private-static-method", - "static-method", - ], + { + "languageOptions": { + "parser": { + "meta": { + "name": "typescript-eslint/parser", + "version": "7.5.0", + }, + "parseForESLint": [Function], }, - ], - "@typescript-eslint/no-base-to-string": "error", - "@typescript-eslint/no-dupe-class-members": "error", - "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/no-explicit-any": "off", - "@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-invalid-this": "error", - "@typescript-eslint/no-invalid-void-type": "error", - "@typescript-eslint/no-misused-new": "error", - "@typescript-eslint/no-namespace": "off", - "@typescript-eslint/no-non-null-asserted-optional-chain": "error", - "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/no-throw-literal": "error", - "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", - "@typescript-eslint/no-unnecessary-qualifier": "error", - "@typescript-eslint/no-unsafe-assignment": "off", - "@typescript-eslint/no-unsafe-call": "off", - "@typescript-eslint/no-unsafe-declaration-merging": "off", - "@typescript-eslint/no-unsafe-member-access": "off", - "@typescript-eslint/no-unsafe-return": "off", - "@typescript-eslint/no-unused-vars": "off", - "@typescript-eslint/no-use-before-define": "off", - "@typescript-eslint/no-useless-constructor": "error", - "@typescript-eslint/no-var-requires": "error", - "@typescript-eslint/prefer-as-const": "error", - "@typescript-eslint/prefer-for-of": "error", - "@typescript-eslint/prefer-includes": "error", - "@typescript-eslint/prefer-literal-enum-member": "off", - "@typescript-eslint/prefer-reduce-type-parameter": "error", - "@typescript-eslint/prefer-string-starts-ends-with": "error", - "@typescript-eslint/promise-function-async": "off", - "@typescript-eslint/require-await": "error", - "@typescript-eslint/restrict-plus-operands": "off", - "@typescript-eslint/switch-exhaustiveness-check": "warn", - "@typescript-eslint/unbound-method": "error", - "@typescript-eslint/unified-signatures": "error", - "accessor-pairs": "off", - "array-callback-return": "error", - "block-scoped-var": "error", - "callback-return": "off", - "capitalized-comments": "off", - "class-methods-use-this": "off", - "complexity": "off", - "consistent-return": "off", - "consistent-this": [ - "error", - "self", - ], - "constructor-super": "off", - "default-case": "off", - "dot-notation": "off", - "eqeqeq": [ - "error", - "smart", - ], - "for-direction": "off", - "func-name-matching": [ - "warn", - "always", - ], - "func-names": [ - "warn", - "as-needed", - ], - "func-style": "off", - "global-require": "off", - "guard-for-in": "warn", - "handle-callback-err": "off", - "id-blacklist": "off", - "id-length": "off", - "id-match": "off", - "init-declarations": "off", - "line-comment-position": "off", - "lines-between-class-members": [ - "error", - "always", - { - "exceptAfterSingleLine": true, + "sourceType": "module", + }, + "plugins": { + "@typescript-eslint": { + "configs": { + "all": { + "extends": [ + "./configs/base", + "./configs/eslint-recommended", + ], + "rules": { + "@typescript-eslint/adjacent-overload-signatures": "error", + "@typescript-eslint/array-type": "error", + "@typescript-eslint/await-thenable": "error", + "@typescript-eslint/ban-ts-comment": "error", + "@typescript-eslint/ban-tslint-comment": "error", + "@typescript-eslint/ban-types": "error", + "@typescript-eslint/class-literal-property-style": "error", + "@typescript-eslint/class-methods-use-this": "error", + "@typescript-eslint/consistent-generic-constructors": "error", + "@typescript-eslint/consistent-indexed-object-style": "error", + "@typescript-eslint/consistent-return": "error", + "@typescript-eslint/consistent-type-assertions": "error", + "@typescript-eslint/consistent-type-definitions": "error", + "@typescript-eslint/consistent-type-exports": "error", + "@typescript-eslint/consistent-type-imports": "error", + "@typescript-eslint/default-param-last": "error", + "@typescript-eslint/dot-notation": "error", + "@typescript-eslint/explicit-function-return-type": "error", + "@typescript-eslint/explicit-member-accessibility": "error", + "@typescript-eslint/explicit-module-boundary-types": "error", + "@typescript-eslint/init-declarations": "error", + "@typescript-eslint/max-params": "error", + "@typescript-eslint/member-ordering": "error", + "@typescript-eslint/method-signature-style": "error", + "@typescript-eslint/naming-convention": "error", + "@typescript-eslint/no-array-constructor": "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-dupe-class-members": "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-function": "error", + "@typescript-eslint/no-empty-interface": "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-import-type-side-effects": "error", + "@typescript-eslint/no-inferrable-types": "error", + "@typescript-eslint/no-invalid-this": "error", + "@typescript-eslint/no-invalid-void-type": "error", + "@typescript-eslint/no-loop-func": "error", + "@typescript-eslint/no-loss-of-precision": "error", + "@typescript-eslint/no-magic-numbers": "error", + "@typescript-eslint/no-meaningless-void-operator": "error", + "@typescript-eslint/no-misused-new": "error", + "@typescript-eslint/no-misused-promises": "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-redeclare": "error", + "@typescript-eslint/no-redundant-type-constituents": "error", + "@typescript-eslint/no-require-imports": "error", + "@typescript-eslint/no-restricted-imports": "error", + "@typescript-eslint/no-shadow": "error", + "@typescript-eslint/no-this-alias": "error", + "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", + "@typescript-eslint/no-unnecessary-condition": "error", + "@typescript-eslint/no-unnecessary-qualifier": "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-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-member-access": "error", + "@typescript-eslint/no-unsafe-return": "error", + "@typescript-eslint/no-unsafe-unary-minus": "error", + "@typescript-eslint/no-unused-expressions": "error", + "@typescript-eslint/no-unused-vars": "error", + "@typescript-eslint/no-use-before-define": "error", + "@typescript-eslint/no-useless-constructor": "error", + "@typescript-eslint/no-useless-empty-export": "error", + "@typescript-eslint/no-useless-template-literals": "error", + "@typescript-eslint/no-var-requires": "error", + "@typescript-eslint/non-nullable-type-assertion-style": "error", + "@typescript-eslint/only-throw-error": "error", + "@typescript-eslint/parameter-properties": "error", + "@typescript-eslint/prefer-as-const": "error", + "@typescript-eslint/prefer-destructuring": "error", + "@typescript-eslint/prefer-enum-initializers": "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-readonly-parameter-types": "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/prefer-ts-expect-error": "error", + "@typescript-eslint/promise-function-async": "error", + "@typescript-eslint/require-array-sort-compare": "error", + "@typescript-eslint/require-await": "error", + "@typescript-eslint/restrict-plus-operands": "error", + "@typescript-eslint/restrict-template-expressions": "error", + "@typescript-eslint/return-await": "error", + "@typescript-eslint/sort-type-constituents": "error", + "@typescript-eslint/strict-boolean-expressions": "error", + "@typescript-eslint/switch-exhaustiveness-check": "error", + "@typescript-eslint/triple-slash-reference": "error", + "@typescript-eslint/typedef": "error", + "@typescript-eslint/unbound-method": "error", + "@typescript-eslint/unified-signatures": "error", + "@typescript-eslint/use-unknown-in-catch-callback-variable": "error", + "class-methods-use-this": "off", + "consistent-return": "off", + "default-param-last": "off", + "dot-notation": "off", + "init-declarations": "off", + "max-params": "off", + "no-array-constructor": "off", + "no-dupe-class-members": "off", + "no-empty-function": "off", + "no-implied-eval": "off", + "no-invalid-this": "off", + "no-loop-func": "off", + "no-loss-of-precision": "off", + "no-magic-numbers": "off", + "no-redeclare": "off", + "no-restricted-imports": "off", + "no-return-await": "off", + "no-shadow": "off", + "no-throw-literal": "off", + "no-unused-expressions": "off", + "no-unused-vars": "off", + "no-use-before-define": "off", + "no-useless-constructor": "off", + "prefer-destructuring": "off", + "prefer-promise-reject-errors": "off", + "require-await": "off", + }, + }, + "base": { + "parser": "@typescript-eslint/parser", + "parserOptions": { + "sourceType": "module", + }, + "plugins": [ + "@typescript-eslint", + ], + }, + "disable-type-checked": { + "parserOptions": { + "program": null, + "project": false, + }, + "rules": { + "@typescript-eslint/await-thenable": "off", + "@typescript-eslint/consistent-return": "off", + "@typescript-eslint/consistent-type-exports": "off", + "@typescript-eslint/dot-notation": "off", + "@typescript-eslint/naming-convention": "off", + "@typescript-eslint/no-array-delete": "off", + "@typescript-eslint/no-base-to-string": "off", + "@typescript-eslint/no-confusing-void-expression": "off", + "@typescript-eslint/no-duplicate-type-constituents": "off", + "@typescript-eslint/no-floating-promises": "off", + "@typescript-eslint/no-for-in-array": "off", + "@typescript-eslint/no-implied-eval": "off", + "@typescript-eslint/no-meaningless-void-operator": "off", + "@typescript-eslint/no-misused-promises": "off", + "@typescript-eslint/no-mixed-enums": "off", + "@typescript-eslint/no-redundant-type-constituents": "off", + "@typescript-eslint/no-throw-literal": "off", + "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off", + "@typescript-eslint/no-unnecessary-condition": "off", + "@typescript-eslint/no-unnecessary-qualifier": "off", + "@typescript-eslint/no-unnecessary-type-arguments": "off", + "@typescript-eslint/no-unnecessary-type-assertion": "off", + "@typescript-eslint/no-unsafe-argument": "off", + "@typescript-eslint/no-unsafe-assignment": "off", + "@typescript-eslint/no-unsafe-call": "off", + "@typescript-eslint/no-unsafe-enum-comparison": "off", + "@typescript-eslint/no-unsafe-member-access": "off", + "@typescript-eslint/no-unsafe-return": "off", + "@typescript-eslint/no-unsafe-unary-minus": "off", + "@typescript-eslint/no-useless-template-literals": "off", + "@typescript-eslint/non-nullable-type-assertion-style": "off", + "@typescript-eslint/only-throw-error": "off", + "@typescript-eslint/prefer-destructuring": "off", + "@typescript-eslint/prefer-find": "off", + "@typescript-eslint/prefer-includes": "off", + "@typescript-eslint/prefer-nullish-coalescing": "off", + "@typescript-eslint/prefer-optional-chain": "off", + "@typescript-eslint/prefer-promise-reject-errors": "off", + "@typescript-eslint/prefer-readonly": "off", + "@typescript-eslint/prefer-readonly-parameter-types": "off", + "@typescript-eslint/prefer-reduce-type-parameter": "off", + "@typescript-eslint/prefer-regexp-exec": "off", + "@typescript-eslint/prefer-return-this-type": "off", + "@typescript-eslint/prefer-string-starts-ends-with": "off", + "@typescript-eslint/promise-function-async": "off", + "@typescript-eslint/require-array-sort-compare": "off", + "@typescript-eslint/require-await": "off", + "@typescript-eslint/restrict-plus-operands": "off", + "@typescript-eslint/restrict-template-expressions": "off", + "@typescript-eslint/return-await": "off", + "@typescript-eslint/strict-boolean-expressions": "off", + "@typescript-eslint/switch-exhaustiveness-check": "off", + "@typescript-eslint/unbound-method": "off", + "@typescript-eslint/use-unknown-in-catch-callback-variable": "off", + }, + }, + "eslint-recommended": { + "overrides": [ + { + "files": [ + "*.ts", + "*.tsx", + "*.mts", + "*.cts", + ], + "rules": { + "constructor-super": "off", + "getter-return": "off", + "no-const-assign": "off", + "no-dupe-args": "off", + "no-dupe-class-members": "off", + "no-dupe-keys": "off", + "no-func-assign": "off", + "no-import-assign": "off", + "no-new-symbol": "off", + "no-obj-calls": "off", + "no-redeclare": "off", + "no-setter-return": "off", + "no-this-before-super": "off", + "no-undef": "off", + "no-unreachable": "off", + "no-unsafe-negation": "off", + "no-var": "error", + "prefer-const": "error", + "prefer-rest-params": "error", + "prefer-spread": "error", + }, + }, + ], + }, + "recommended": { + "extends": [ + "./configs/base", + "./configs/eslint-recommended", + ], + "rules": { + "@typescript-eslint/ban-ts-comment": "error", + "@typescript-eslint/ban-types": "error", + "@typescript-eslint/no-array-constructor": "error", + "@typescript-eslint/no-duplicate-enum-values": "error", + "@typescript-eslint/no-explicit-any": "error", + "@typescript-eslint/no-extra-non-null-assertion": "error", + "@typescript-eslint/no-loss-of-precision": "error", + "@typescript-eslint/no-misused-new": "error", + "@typescript-eslint/no-namespace": "error", + "@typescript-eslint/no-non-null-asserted-optional-chain": "error", + "@typescript-eslint/no-this-alias": "error", + "@typescript-eslint/no-unnecessary-type-constraint": "error", + "@typescript-eslint/no-unsafe-declaration-merging": "error", + "@typescript-eslint/no-unused-vars": "error", + "@typescript-eslint/no-var-requires": "error", + "@typescript-eslint/prefer-as-const": "error", + "@typescript-eslint/triple-slash-reference": "error", + "no-array-constructor": "off", + "no-loss-of-precision": "off", + "no-unused-vars": "off", + }, + }, + "recommended-requiring-type-checking": { + "extends": [ + "./configs/base", + "./configs/eslint-recommended", + ], + "rules": { + "@typescript-eslint/await-thenable": "error", + "@typescript-eslint/ban-ts-comment": "error", + "@typescript-eslint/ban-types": "error", + "@typescript-eslint/no-array-constructor": "error", + "@typescript-eslint/no-base-to-string": "error", + "@typescript-eslint/no-duplicate-enum-values": "error", + "@typescript-eslint/no-duplicate-type-constituents": "error", + "@typescript-eslint/no-explicit-any": "error", + "@typescript-eslint/no-extra-non-null-assertion": "error", + "@typescript-eslint/no-floating-promises": "error", + "@typescript-eslint/no-for-in-array": "error", + "@typescript-eslint/no-implied-eval": "error", + "@typescript-eslint/no-loss-of-precision": "error", + "@typescript-eslint/no-misused-new": "error", + "@typescript-eslint/no-misused-promises": "error", + "@typescript-eslint/no-namespace": "error", + "@typescript-eslint/no-non-null-asserted-optional-chain": "error", + "@typescript-eslint/no-redundant-type-constituents": "error", + "@typescript-eslint/no-this-alias": "error", + "@typescript-eslint/no-unnecessary-type-assertion": "error", + "@typescript-eslint/no-unnecessary-type-constraint": "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-member-access": "error", + "@typescript-eslint/no-unsafe-return": "error", + "@typescript-eslint/no-unused-vars": "error", + "@typescript-eslint/no-var-requires": "error", + "@typescript-eslint/prefer-as-const": "error", + "@typescript-eslint/require-await": "error", + "@typescript-eslint/restrict-plus-operands": "error", + "@typescript-eslint/restrict-template-expressions": "error", + "@typescript-eslint/triple-slash-reference": "error", + "@typescript-eslint/unbound-method": "error", + "no-array-constructor": "off", + "no-implied-eval": "off", + "no-loss-of-precision": "off", + "no-unused-vars": "off", + "require-await": "off", + }, + }, + "recommended-type-checked": { + "extends": [ + "./configs/base", + "./configs/eslint-recommended", + ], + "rules": { + "@typescript-eslint/await-thenable": "error", + "@typescript-eslint/ban-ts-comment": "error", + "@typescript-eslint/ban-types": "error", + "@typescript-eslint/no-array-constructor": "error", + "@typescript-eslint/no-base-to-string": "error", + "@typescript-eslint/no-duplicate-enum-values": "error", + "@typescript-eslint/no-duplicate-type-constituents": "error", + "@typescript-eslint/no-explicit-any": "error", + "@typescript-eslint/no-extra-non-null-assertion": "error", + "@typescript-eslint/no-floating-promises": "error", + "@typescript-eslint/no-for-in-array": "error", + "@typescript-eslint/no-implied-eval": "error", + "@typescript-eslint/no-loss-of-precision": "error", + "@typescript-eslint/no-misused-new": "error", + "@typescript-eslint/no-misused-promises": "error", + "@typescript-eslint/no-namespace": "error", + "@typescript-eslint/no-non-null-asserted-optional-chain": "error", + "@typescript-eslint/no-redundant-type-constituents": "error", + "@typescript-eslint/no-this-alias": "error", + "@typescript-eslint/no-unnecessary-type-assertion": "error", + "@typescript-eslint/no-unnecessary-type-constraint": "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-member-access": "error", + "@typescript-eslint/no-unsafe-return": "error", + "@typescript-eslint/no-unused-vars": "error", + "@typescript-eslint/no-var-requires": "error", + "@typescript-eslint/prefer-as-const": "error", + "@typescript-eslint/require-await": "error", + "@typescript-eslint/restrict-plus-operands": "error", + "@typescript-eslint/restrict-template-expressions": "error", + "@typescript-eslint/triple-slash-reference": "error", + "@typescript-eslint/unbound-method": "error", + "no-array-constructor": "off", + "no-implied-eval": "off", + "no-loss-of-precision": "off", + "no-unused-vars": "off", + "require-await": "off", + }, + }, + "recommended-type-checked-only": { + "extends": [ + "./configs/base", + "./configs/eslint-recommended", + ], + "rules": { + "@typescript-eslint/await-thenable": "error", + "@typescript-eslint/no-base-to-string": "error", + "@typescript-eslint/no-duplicate-type-constituents": "error", + "@typescript-eslint/no-floating-promises": "error", + "@typescript-eslint/no-for-in-array": "error", + "@typescript-eslint/no-implied-eval": "error", + "@typescript-eslint/no-misused-promises": "error", + "@typescript-eslint/no-redundant-type-constituents": "error", + "@typescript-eslint/no-unnecessary-type-assertion": "error", + "@typescript-eslint/no-unsafe-argument": "error", + "@typescript-eslint/no-unsafe-assignment": "error", + "@typescript-eslint/no-unsafe-call": "error", + "@typescript-eslint/no-unsafe-enum-comparison": "error", + "@typescript-eslint/no-unsafe-member-access": "error", + "@typescript-eslint/no-unsafe-return": "error", + "@typescript-eslint/require-await": "error", + "@typescript-eslint/restrict-plus-operands": "error", + "@typescript-eslint/restrict-template-expressions": "error", + "@typescript-eslint/unbound-method": "error", + "no-implied-eval": "off", + "require-await": "off", + }, + }, + "strict": { + "extends": [ + "./configs/base", + "./configs/eslint-recommended", + ], + "rules": { + "@typescript-eslint/ban-ts-comment": [ + "error", + { + "minimumDescriptionLength": 10, + }, + ], + "@typescript-eslint/ban-types": "error", + "@typescript-eslint/no-array-constructor": "error", + "@typescript-eslint/no-duplicate-enum-values": "error", + "@typescript-eslint/no-dynamic-delete": "error", + "@typescript-eslint/no-explicit-any": "error", + "@typescript-eslint/no-extra-non-null-assertion": "error", + "@typescript-eslint/no-extraneous-class": "error", + "@typescript-eslint/no-invalid-void-type": "error", + "@typescript-eslint/no-loss-of-precision": "error", + "@typescript-eslint/no-misused-new": "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-this-alias": "error", + "@typescript-eslint/no-unnecessary-type-constraint": "error", + "@typescript-eslint/no-unsafe-declaration-merging": "error", + "@typescript-eslint/no-unused-vars": "error", + "@typescript-eslint/no-useless-constructor": "error", + "@typescript-eslint/no-var-requires": "error", + "@typescript-eslint/prefer-as-const": "error", + "@typescript-eslint/prefer-literal-enum-member": "error", + "@typescript-eslint/prefer-ts-expect-error": "error", + "@typescript-eslint/triple-slash-reference": "error", + "@typescript-eslint/unified-signatures": "error", + "no-array-constructor": "off", + "no-loss-of-precision": "off", + "no-unused-vars": "off", + "no-useless-constructor": "off", + }, + }, + "strict-type-checked": { + "extends": [ + "./configs/base", + "./configs/eslint-recommended", + ], + "rules": { + "@typescript-eslint/await-thenable": "error", + "@typescript-eslint/ban-ts-comment": [ + "error", + { + "minimumDescriptionLength": 10, + }, + ], + "@typescript-eslint/ban-types": "error", + "@typescript-eslint/no-array-constructor": "error", + "@typescript-eslint/no-array-delete": "error", + "@typescript-eslint/no-base-to-string": "error", + "@typescript-eslint/no-confusing-void-expression": "error", + "@typescript-eslint/no-duplicate-enum-values": "error", + "@typescript-eslint/no-duplicate-type-constituents": "error", + "@typescript-eslint/no-dynamic-delete": "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-invalid-void-type": "error", + "@typescript-eslint/no-loss-of-precision": "error", + "@typescript-eslint/no-meaningless-void-operator": "error", + "@typescript-eslint/no-misused-new": "error", + "@typescript-eslint/no-misused-promises": "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-this-alias": "error", + "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", + "@typescript-eslint/no-unnecessary-condition": "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-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-member-access": "error", + "@typescript-eslint/no-unsafe-return": "error", + "@typescript-eslint/no-unused-vars": "error", + "@typescript-eslint/no-useless-constructor": "error", + "@typescript-eslint/no-useless-template-literals": "error", + "@typescript-eslint/no-var-requires": "error", + "@typescript-eslint/only-throw-error": "error", + "@typescript-eslint/prefer-as-const": "error", + "@typescript-eslint/prefer-includes": "error", + "@typescript-eslint/prefer-literal-enum-member": "error", + "@typescript-eslint/prefer-promise-reject-errors": "error", + "@typescript-eslint/prefer-reduce-type-parameter": "error", + "@typescript-eslint/prefer-return-this-type": "error", + "@typescript-eslint/prefer-ts-expect-error": "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/triple-slash-reference": "error", + "@typescript-eslint/unbound-method": "error", + "@typescript-eslint/unified-signatures": "error", + "@typescript-eslint/use-unknown-in-catch-callback-variable": "error", + "no-array-constructor": "off", + "no-implied-eval": "off", + "no-loss-of-precision": "off", + "no-throw-literal": "off", + "no-unused-vars": "off", + "no-useless-constructor": "off", + "prefer-promise-reject-errors": "off", + "require-await": "off", + }, + }, + "strict-type-checked-only": { + "extends": [ + "./configs/base", + "./configs/eslint-recommended", + ], + "rules": { + "@typescript-eslint/await-thenable": "error", + "@typescript-eslint/no-array-delete": "error", + "@typescript-eslint/no-base-to-string": "error", + "@typescript-eslint/no-confusing-void-expression": "error", + "@typescript-eslint/no-duplicate-type-constituents": "error", + "@typescript-eslint/no-floating-promises": "error", + "@typescript-eslint/no-for-in-array": "error", + "@typescript-eslint/no-implied-eval": "error", + "@typescript-eslint/no-meaningless-void-operator": "error", + "@typescript-eslint/no-misused-promises": "error", + "@typescript-eslint/no-mixed-enums": "error", + "@typescript-eslint/no-redundant-type-constituents": "error", + "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", + "@typescript-eslint/no-unnecessary-condition": "error", + "@typescript-eslint/no-unnecessary-type-arguments": "error", + "@typescript-eslint/no-unnecessary-type-assertion": "error", + "@typescript-eslint/no-unsafe-argument": "error", + "@typescript-eslint/no-unsafe-assignment": "error", + "@typescript-eslint/no-unsafe-call": "error", + "@typescript-eslint/no-unsafe-enum-comparison": "error", + "@typescript-eslint/no-unsafe-member-access": "error", + "@typescript-eslint/no-unsafe-return": "error", + "@typescript-eslint/no-useless-template-literals": "error", + "@typescript-eslint/only-throw-error": "error", + "@typescript-eslint/prefer-includes": "error", + "@typescript-eslint/prefer-promise-reject-errors": "error", + "@typescript-eslint/prefer-reduce-type-parameter": "error", + "@typescript-eslint/prefer-return-this-type": "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/unbound-method": "error", + "@typescript-eslint/use-unknown-in-catch-callback-variable": "error", + "no-implied-eval": "off", + "no-throw-literal": "off", + "prefer-promise-reject-errors": "off", + "require-await": "off", + }, + }, + "stylistic": { + "extends": [ + "./configs/base", + "./configs/eslint-recommended", + ], + "rules": { + "@typescript-eslint/adjacent-overload-signatures": "error", + "@typescript-eslint/array-type": "error", + "@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", + "@typescript-eslint/no-confusing-non-null-assertion": "error", + "@typescript-eslint/no-empty-function": "error", + "@typescript-eslint/no-empty-interface": "error", + "@typescript-eslint/no-inferrable-types": "error", + "@typescript-eslint/prefer-for-of": "error", + "@typescript-eslint/prefer-function-type": "error", + "@typescript-eslint/prefer-namespace-keyword": "error", + "no-empty-function": "off", + }, + }, + "stylistic-type-checked": { + "extends": [ + "./configs/base", + "./configs/eslint-recommended", + ], + "rules": { + "@typescript-eslint/adjacent-overload-signatures": "error", + "@typescript-eslint/array-type": "error", + "@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", + "@typescript-eslint/dot-notation": "error", + "@typescript-eslint/no-confusing-non-null-assertion": "error", + "@typescript-eslint/no-empty-function": "error", + "@typescript-eslint/no-empty-interface": "error", + "@typescript-eslint/no-inferrable-types": "error", + "@typescript-eslint/non-nullable-type-assertion-style": "error", + "@typescript-eslint/prefer-for-of": "error", + "@typescript-eslint/prefer-function-type": "error", + "@typescript-eslint/prefer-namespace-keyword": "error", + "@typescript-eslint/prefer-nullish-coalescing": "error", + "@typescript-eslint/prefer-optional-chain": "error", + "@typescript-eslint/prefer-string-starts-ends-with": "error", + "dot-notation": "off", + "no-empty-function": "off", + }, + }, + "stylistic-type-checked-only": { + "extends": [ + "./configs/base", + "./configs/eslint-recommended", + ], + "rules": { + "@typescript-eslint/dot-notation": "error", + "@typescript-eslint/non-nullable-type-assertion-style": "error", + "@typescript-eslint/prefer-nullish-coalescing": "error", + "@typescript-eslint/prefer-optional-chain": "error", + "@typescript-eslint/prefer-string-starts-ends-with": "error", + "dot-notation": "off", + }, + }, + }, + "meta": { + "name": "@typescript-eslint/eslint-plugin", + "version": "7.5.0", + }, + "rules": { + "adjacent-overload-signatures": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Require that function overload signatures be consecutive", + "recommended": "stylistic", + "url": "https://typescript-eslint.io/rules/adjacent-overload-signatures", + }, + "messages": { + "adjacentSignature": "All {{name}} signatures should be adjacent.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "array-type": { + "create": [Function], + "defaultOptions": [ + { + "default": "array", + }, + ], + "meta": { + "docs": { + "description": "Require consistently using either \`T[]\` or \`Array\` for arrays", + "recommended": "stylistic", + "url": "https://typescript-eslint.io/rules/array-type", + }, + "fixable": "code", + "messages": { + "errorStringArray": "Array type using '{{className}}<{{type}}>' is forbidden. Use '{{readonlyPrefix}}{{type}}[]' instead.", + "errorStringArraySimple": "Array type using '{{className}}<{{type}}>' is forbidden for simple types. Use '{{readonlyPrefix}}{{type}}[]' instead.", + "errorStringGeneric": "Array type using '{{readonlyPrefix}}{{type}}[]' is forbidden. Use '{{className}}<{{type}}>' instead.", + "errorStringGenericSimple": "Array type using '{{readonlyPrefix}}{{type}}[]' is forbidden for non-simple types. Use '{{className}}<{{type}}>' instead.", + }, + "schema": [ + { + "$defs": { + "arrayOption": { + "enum": [ + "array", + "generic", + "array-simple", + ], + "type": "string", + }, + }, + "additionalProperties": false, + "properties": { + "default": { + "$ref": "#/items/0/$defs/arrayOption", + "description": "The array type expected for mutable cases.", + }, + "readonly": { + "$ref": "#/items/0/$defs/arrayOption", + "description": "The array type expected for readonly cases. If omitted, the value for \`default\` will be used.", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "await-thenable": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow awaiting a value that is not a Thenable", + "recommended": "recommended", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/await-thenable", + }, + "hasSuggestions": true, + "messages": { + "await": "Unexpected \`await\` of a non-Promise (non-"Thenable") value.", + "removeAwait": "Remove unnecessary \`await\`.", + }, + "schema": [], + "type": "problem", + }, + }, + "ban-ts-comment": { + "create": [Function], + "defaultOptions": [ + { + "minimumDescriptionLength": 3, + "ts-check": false, + "ts-expect-error": "allow-with-description", + "ts-ignore": true, + "ts-nocheck": true, + }, + ], + "meta": { + "docs": { + "description": "Disallow \`@ts-\` comments or require descriptions after directives", + "recommended": { + "recommended": true, + "strict": [ + { + "minimumDescriptionLength": 10, + }, + ], + }, + "url": "https://typescript-eslint.io/rules/ban-ts-comment", + }, + "hasSuggestions": true, + "messages": { + "replaceTsIgnoreWithTsExpectError": "Replace "@ts-ignore" with "@ts-expect-error".", + "tsDirectiveComment": "Do not use "@ts-{{directive}}" because it alters compilation errors.", + "tsDirectiveCommentDescriptionNotMatchPattern": "The description for the "@ts-{{directive}}" directive must match the {{format}} format.", + "tsDirectiveCommentRequiresDescription": "Include a description after the "@ts-{{directive}}" directive to explain why the @ts-{{directive}} is necessary. The description must be {{minimumDescriptionLength}} characters or longer.", + "tsIgnoreInsteadOfExpectError": "Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free.", + }, + "schema": [ + { + "$defs": { + "directiveConfigSchema": { + "oneOf": [ + { + "default": true, + "type": "boolean", + }, + { + "enum": [ + "allow-with-description", + ], + "type": "string", + }, + { + "additionalProperties": false, + "properties": { + "descriptionFormat": { + "type": "string", + }, + }, + "type": "object", + }, + ], + }, + }, + "additionalProperties": false, + "properties": { + "minimumDescriptionLength": { + "default": 3, + "type": "number", + }, + "ts-check": { + "$ref": "#/items/0/$defs/directiveConfigSchema", + }, + "ts-expect-error": { + "$ref": "#/items/0/$defs/directiveConfigSchema", + }, + "ts-ignore": { + "$ref": "#/items/0/$defs/directiveConfigSchema", + }, + "ts-nocheck": { + "$ref": "#/items/0/$defs/directiveConfigSchema", + }, + }, + "type": "object", + }, + ], + "type": "problem", + }, + }, + "ban-tslint-comment": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow \`// tslint:\` comments", + "recommended": "stylistic", + "url": "https://typescript-eslint.io/rules/ban-tslint-comment", + }, + "fixable": "code", + "messages": { + "commentDetected": "tslint comment detected: "{{ text }}"", + }, + "schema": [], + "type": "suggestion", + }, + }, + "ban-types": { + "create": [Function], + "defaultOptions": [ + {}, + ], + "meta": { + "docs": { + "description": "Disallow certain types", + "recommended": "recommended", + "url": "https://typescript-eslint.io/rules/ban-types", + }, + "fixable": "code", + "hasSuggestions": true, + "messages": { + "bannedTypeMessage": "Don't use \`{{name}}\` as a type.{{customMessage}}", + "bannedTypeReplacement": "Replace \`{{name}}\` with \`{{replacement}}\`.", + }, + "schema": [ + { + "$defs": { + "banConfig": { + "oneOf": [ + { + "description": "Bans the type with the default message", + "type": "null", + }, + { + "description": "Un-bans the type (useful when paired with \`extendDefaults\`)", + "enum": [ + false, + ], + "type": "boolean", + }, + { + "description": "Bans the type with the default message", + "enum": [ + true, + ], + "type": "boolean", + }, + { + "description": "Bans the type with a custom message", + "type": "string", + }, + { + "additionalProperties": false, + "description": "Bans a type", + "properties": { + "fixWith": { + "description": "Type to autofix replace with. Note that autofixers can be applied automatically - so you need to be careful with this option.", + "type": "string", + }, + "message": { + "description": "Custom error message", + "type": "string", + }, + "suggest": { + "additionalItems": false, + "description": "Types to suggest replacing with.", + "items": { + "type": "string", + }, + "type": "array", + }, + }, + "type": "object", + }, + ], + }, + }, + "additionalProperties": false, + "properties": { + "extendDefaults": { + "type": "boolean", + }, + "types": { + "additionalProperties": { + "$ref": "#/items/0/$defs/banConfig", + }, + "type": "object", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "block-spacing": { + "create": [Function], + "defaultOptions": [ + "always", + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Disallow or enforce spaces inside of blocks after opening block and before closing block", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/block-spacing", + }, + "fixable": "whitespace", + "hasSuggestions": undefined, + "messages": { + "extra": "Unexpected space(s) {{location}} '{{token}}'.", + "missing": "Requires a space {{location}} '{{token}}'.", + }, + "replacedBy": [ + "@stylistic/ts/block-spacing", + ], + "schema": [ + { + "enum": [ + "always", + "never", + ], + }, + ], + "type": "layout", + }, + }, + "brace-style": { + "create": [Function], + "defaultOptions": [ + "1tbs", + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Enforce consistent brace style for blocks", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/brace-style", + }, + "fixable": "whitespace", + "hasSuggestions": undefined, + "messages": { + "blockSameLine": "Statement inside of curly braces should be on next line.", + "nextLineClose": "Closing curly brace does not appear on the same line as the subsequent block.", + "nextLineOpen": "Opening curly brace does not appear on the same line as controlling statement.", + "sameLineClose": "Closing curly brace appears on the same line as the subsequent block.", + "sameLineOpen": "Opening curly brace appears on the same line as controlling statement.", + "singleLineClose": "Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.", + }, + "replacedBy": [ + "@stylistic/ts/brace-style", + ], + "schema": [ + { + "enum": [ + "1tbs", + "stroustrup", + "allman", + ], + }, + { + "additionalProperties": false, + "properties": { + "allowSingleLine": { + "default": false, + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "layout", + }, + }, + "class-literal-property-style": { + "create": [Function], + "defaultOptions": [ + "fields", + ], + "meta": { + "docs": { + "description": "Enforce that literals on classes are exposed in a consistent style", + "recommended": "stylistic", + "url": "https://typescript-eslint.io/rules/class-literal-property-style", + }, + "hasSuggestions": true, + "messages": { + "preferFieldStyle": "Literals should be exposed using readonly fields.", + "preferFieldStyleSuggestion": "Replace the literals with readonly fields.", + "preferGetterStyle": "Literals should be exposed using getters.", + "preferGetterStyleSuggestion": "Replace the literals with getters.", + }, + "schema": [ + { + "enum": [ + "fields", + "getters", + ], + "type": "string", + }, + ], + "type": "problem", + }, + }, + "class-methods-use-this": { + "create": [Function], + "defaultOptions": [ + { + "enforceForClassFields": true, + "exceptMethods": [], + "ignoreClassesThatImplementAnInterface": false, + "ignoreOverrideMethods": false, + }, + ], + "meta": { + "docs": { + "description": "Enforce that class methods utilize \`this\`", + "extendsBaseRule": true, + "requiresTypeChecking": false, + "url": "https://typescript-eslint.io/rules/class-methods-use-this", + }, + "messages": { + "missingThis": "Expected 'this' to be used by class {{name}}.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "enforceForClassFields": { + "default": true, + "description": "Enforces that functions used as instance field initializers utilize \`this\`", + "type": "boolean", + }, + "exceptMethods": { + "description": "Allows specified method names to be ignored with this rule", + "items": { + "type": "string", + }, + "type": "array", + }, + "ignoreClassesThatImplementAnInterface": { + "description": "Ignore classes that specifically implement some interface", + "oneOf": [ + { + "description": "Ignore all classes that implement an interface", + "type": "boolean", + }, + { + "description": "Ignore only the public fields of classes that implement an interface", + "enum": [ + "public-fields", + ], + "type": "string", + }, + ], + }, + "ignoreOverrideMethods": { + "description": "Ignore members marked with the \`override\` modifier", + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "comma-dangle": { + "create": [Function], + "defaultOptions": [ + "never", + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Require or disallow trailing commas", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/comma-dangle", + }, + "fixable": "code", + "hasSuggestions": undefined, + "messages": { + "missing": "Missing trailing comma.", + "unexpected": "Unexpected trailing comma.", + }, + "replacedBy": [ + "@stylistic/ts/comma-dangle", + ], + "schema": { + "$defs": { + "value": { + "enum": [ + "always-multiline", + "always", + "never", + "only-multiline", + ], + "type": "string", + }, + "valueWithIgnore": { + "enum": [ + "always-multiline", + "always", + "never", + "only-multiline", + "ignore", + ], + "type": "string", + }, + }, + "additionalItems": false, + "items": [ + { + "oneOf": [ + { + "$ref": "#/$defs/value", + }, + { + "additionalProperties": false, + "properties": { + "arrays": { + "$ref": "#/$defs/valueWithIgnore", + }, + "enums": { + "$ref": "#/$defs/valueWithIgnore", + }, + "exports": { + "$ref": "#/$defs/valueWithIgnore", + }, + "functions": { + "$ref": "#/$defs/valueWithIgnore", + }, + "generics": { + "$ref": "#/$defs/valueWithIgnore", + }, + "imports": { + "$ref": "#/$defs/valueWithIgnore", + }, + "objects": { + "$ref": "#/$defs/valueWithIgnore", + }, + "tuples": { + "$ref": "#/$defs/valueWithIgnore", + }, + }, + "type": "object", + }, + ], + }, + ], + "type": "array", + }, + "type": "layout", + }, + }, + "comma-spacing": { + "create": [Function], + "defaultOptions": [ + { + "after": true, + "before": false, + }, + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Enforce consistent spacing before and after commas", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/comma-spacing", + }, + "fixable": "whitespace", + "messages": { + "missing": "A space is required {{loc}} ','.", + "unexpected": "There should be no space {{loc}} ','.", + }, + "replacedBy": [ + "@stylistic/ts/comma-spacing", + ], + "schema": [ + { + "additionalProperties": false, + "properties": { + "after": { + "default": true, + "type": "boolean", + }, + "before": { + "default": false, + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "layout", + }, + }, + "consistent-generic-constructors": { + "create": [Function], + "defaultOptions": [ + "constructor", + ], + "meta": { + "docs": { + "description": "Enforce specifying generic type arguments on type annotation or constructor name of a constructor call", + "recommended": "stylistic", + "url": "https://typescript-eslint.io/rules/consistent-generic-constructors", + }, + "fixable": "code", + "messages": { + "preferConstructor": "The generic type arguments should be specified as part of the constructor type arguments.", + "preferTypeAnnotation": "The generic type arguments should be specified as part of the type annotation.", + }, + "schema": [ + { + "enum": [ + "type-annotation", + "constructor", + ], + "type": "string", + }, + ], + "type": "suggestion", + }, + }, + "consistent-indexed-object-style": { + "create": [Function], + "defaultOptions": [ + "record", + ], + "meta": { + "docs": { + "description": "Require or disallow the \`Record\` type", + "recommended": "stylistic", + "url": "https://typescript-eslint.io/rules/consistent-indexed-object-style", + }, + "fixable": "code", + "messages": { + "preferIndexSignature": "An index signature is preferred over a record.", + "preferRecord": "A record is preferred over an index signature.", + }, + "schema": [ + { + "enum": [ + "record", + "index-signature", + ], + "type": "string", + }, + ], + "type": "suggestion", + }, + }, + "consistent-return": { + "create": [Function], + "defaultOptions": [ + { + "treatUndefinedAsUnspecified": false, + }, + ], + "meta": { + "docs": { + "description": "Require \`return\` statements to either always or never specify values", + "extendsBaseRule": true, + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/consistent-return", + }, + "hasSuggestions": undefined, + "messages": { + "missingReturn": "Expected to return a value at the end of {{name}}.", + "missingReturnValue": "{{name}} expected a return value.", + "unexpectedReturnValue": "{{name}} expected no return value.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "treatUndefinedAsUnspecified": { + "default": false, + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "consistent-type-assertions": { + "create": [Function], + "defaultOptions": [ + { + "assertionStyle": "as", + "objectLiteralTypeAssertions": "allow", + }, + ], + "meta": { + "docs": { + "description": "Enforce consistent usage of type assertions", + "recommended": "stylistic", + "url": "https://typescript-eslint.io/rules/consistent-type-assertions", + }, + "fixable": "code", + "hasSuggestions": true, + "messages": { + "angle-bracket": "Use '<{{cast}}>' instead of 'as {{cast}}'.", + "as": "Use 'as {{cast}}' instead of '<{{cast}}>'.", + "never": "Do not use any type assertions.", + "replaceObjectTypeAssertionWithAnnotation": "Use const x: {{cast}} = { ... } instead.", + "replaceObjectTypeAssertionWithSatisfies": "Use const x = { ... } satisfies {{cast}} instead.", + "unexpectedObjectTypeAssertion": "Always prefer const x: T = { ... }.", + }, + "schema": [ + { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "assertionStyle": { + "enum": [ + "never", + ], + "type": "string", + }, + }, + "required": [ + "assertionStyle", + ], + "type": "object", + }, + { + "additionalProperties": false, + "properties": { + "assertionStyle": { + "enum": [ + "as", + "angle-bracket", + ], + "type": "string", + }, + "objectLiteralTypeAssertions": { + "enum": [ + "allow", + "allow-as-parameter", + "never", + ], + "type": "string", + }, + }, + "required": [ + "assertionStyle", + ], + "type": "object", + }, + ], + }, + ], + "type": "suggestion", + }, + }, + "consistent-type-definitions": { + "create": [Function], + "defaultOptions": [ + "interface", + ], + "meta": { + "docs": { + "description": "Enforce type definitions to consistently use either \`interface\` or \`type\`", + "recommended": "stylistic", + "url": "https://typescript-eslint.io/rules/consistent-type-definitions", + }, + "fixable": "code", + "messages": { + "interfaceOverType": "Use an \`interface\` instead of a \`type\`.", + "typeOverInterface": "Use a \`type\` instead of an \`interface\`.", + }, + "schema": [ + { + "enum": [ + "interface", + "type", + ], + "type": "string", + }, + ], + "type": "suggestion", + }, + }, + "consistent-type-exports": { + "create": [Function], + "defaultOptions": [ + { + "fixMixedExportsWithInlineTypeSpecifier": false, + }, + ], + "meta": { + "docs": { + "description": "Enforce consistent usage of type exports", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/consistent-type-exports", + }, + "fixable": "code", + "messages": { + "multipleExportsAreTypes": "Type exports {{exportNames}} are not values and should be exported using \`export type\`.", + "singleExportIsType": "Type export {{exportNames}} is not a value and should be exported using \`export type\`.", + "typeOverValue": "All exports in the declaration are only used as types. Use \`export type\`.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "fixMixedExportsWithInlineTypeSpecifier": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "consistent-type-imports": { + "create": [Function], + "defaultOptions": [ + { + "disallowTypeAnnotations": true, + "fixStyle": "separate-type-imports", + "prefer": "type-imports", + }, + ], + "meta": { + "docs": { + "description": "Enforce consistent usage of type imports", + "url": "https://typescript-eslint.io/rules/consistent-type-imports", + }, + "fixable": "code", + "messages": { + "avoidImportType": "Use an \`import\` instead of an \`import type\`.", + "noImportTypeAnnotations": "\`import()\` type annotations are forbidden.", + "someImportsAreOnlyTypes": "Imports {{typeImports}} are only used as type.", + "typeOverValue": "All imports in the declaration are only used as types. Use \`import type\`.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "disallowTypeAnnotations": { + "type": "boolean", + }, + "fixStyle": { + "enum": [ + "separate-type-imports", + "inline-type-imports", + ], + "type": "string", + }, + "prefer": { + "enum": [ + "type-imports", + "no-type-imports", + ], + "type": "string", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "default-param-last": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Enforce default parameters to be last", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/default-param-last", + }, + "messages": { + "shouldBeLast": "Default parameters should be last.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "dot-notation": { + "create": [Function], + "defaultOptions": [ + { + "allowIndexSignaturePropertyAccess": false, + "allowKeywords": true, + "allowPattern": "", + "allowPrivateClassPropertyAccess": false, + "allowProtectedClassPropertyAccess": false, + }, + ], + "meta": { + "docs": { + "description": "Enforce dot notation whenever possible", + "extendsBaseRule": true, + "recommended": "stylistic", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/dot-notation", + }, + "fixable": "code", + "hasSuggestions": undefined, + "messages": { + "useBrackets": ".{{key}} is a syntax error.", + "useDot": "[{{key}}] is better written in dot notation.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowIndexSignaturePropertyAccess": { + "default": false, + "type": "boolean", + }, + "allowKeywords": { + "default": true, + "type": "boolean", + }, + "allowPattern": { + "default": "", + "type": "string", + }, + "allowPrivateClassPropertyAccess": { + "default": false, + "type": "boolean", + }, + "allowProtectedClassPropertyAccess": { + "default": false, + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "explicit-function-return-type": { + "create": [Function], + "defaultOptions": [ + { + "allowConciseArrowFunctionExpressionsStartingWithVoid": false, + "allowDirectConstAssertionInArrowFunctions": true, + "allowExpressions": false, + "allowFunctionsWithoutTypeParameters": false, + "allowHigherOrderFunctions": true, + "allowIIFEs": false, + "allowTypedFunctionExpressions": true, + "allowedNames": [], + }, + ], + "meta": { + "docs": { + "description": "Require explicit return types on functions and class methods", + "url": "https://typescript-eslint.io/rules/explicit-function-return-type", + }, + "messages": { + "missingReturnType": "Missing return type on function.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowConciseArrowFunctionExpressionsStartingWithVoid": { + "description": "Whether to allow arrow functions that start with the \`void\` keyword.", + "type": "boolean", + }, + "allowDirectConstAssertionInArrowFunctions": { + "description": "Whether to ignore arrow functions immediately returning a \`as const\` value.", + "type": "boolean", + }, + "allowExpressions": { + "description": "Whether to ignore function expressions (functions which are not part of a declaration).", + "type": "boolean", + }, + "allowFunctionsWithoutTypeParameters": { + "description": "Whether to ignore functions that don't have generic type parameters.", + "type": "boolean", + }, + "allowHigherOrderFunctions": { + "description": "Whether to ignore functions immediately returning another function expression.", + "type": "boolean", + }, + "allowIIFEs": { + "description": "Whether to ignore immediately invoked function expressions (IIFEs).", + "type": "boolean", + }, + "allowTypedFunctionExpressions": { + "description": "Whether to ignore type annotations on the variable of function expressions.", + "type": "boolean", + }, + "allowedNames": { + "description": "An array of function/method names that will not have their arguments or return values checked.", + "items": { + "type": "string", + }, + "type": "array", + }, + }, + "type": "object", + }, + ], + "type": "problem", + }, + }, + "explicit-member-accessibility": { + "create": [Function], + "defaultOptions": [ + { + "accessibility": "explicit", + }, + ], + "meta": { + "docs": { + "description": "Require explicit accessibility modifiers on class properties and methods", + "url": "https://typescript-eslint.io/rules/explicit-member-accessibility", + }, + "fixable": "code", + "hasSuggestions": true, + "messages": { + "addExplicitAccessibility": "Add '{{ type }}' accessibility modifier", + "missingAccessibility": "Missing accessibility modifier on {{type}} {{name}}.", + "unwantedPublicAccessibility": "Public accessibility modifier on {{type}} {{name}}.", + }, + "schema": [ + { + "$defs": { + "accessibilityLevel": { + "oneOf": [ + { + "description": "Always require an accessor.", + "enum": [ + "explicit", + ], + "type": "string", + }, + { + "description": "Require an accessor except when public.", + "enum": [ + "no-public", + ], + "type": "string", + }, + { + "description": "Never check whether there is an accessor.", + "enum": [ + "off", + ], + "type": "string", + }, + ], + }, + }, + "additionalProperties": false, + "properties": { + "accessibility": { + "$ref": "#/items/0/$defs/accessibilityLevel", + }, + "ignoredMethodNames": { + "items": { + "type": "string", + }, + "type": "array", + }, + "overrides": { + "additionalProperties": false, + "properties": { + "accessors": { + "$ref": "#/items/0/$defs/accessibilityLevel", + }, + "constructors": { + "$ref": "#/items/0/$defs/accessibilityLevel", + }, + "methods": { + "$ref": "#/items/0/$defs/accessibilityLevel", + }, + "parameterProperties": { + "$ref": "#/items/0/$defs/accessibilityLevel", + }, + "properties": { + "$ref": "#/items/0/$defs/accessibilityLevel", + }, + }, + "type": "object", + }, + }, + "type": "object", + }, + ], + "type": "problem", + }, + }, + "explicit-module-boundary-types": { + "create": [Function], + "defaultOptions": [ + { + "allowArgumentsExplicitlyTypedAsAny": false, + "allowDirectConstAssertionInArrowFunctions": true, + "allowHigherOrderFunctions": true, + "allowTypedFunctionExpressions": true, + "allowedNames": [], + }, + ], + "meta": { + "docs": { + "description": "Require explicit return and argument types on exported functions' and classes' public class methods", + "url": "https://typescript-eslint.io/rules/explicit-module-boundary-types", + }, + "messages": { + "anyTypedArg": "Argument '{{name}}' should be typed with a non-any type.", + "anyTypedArgUnnamed": "{{type}} argument should be typed with a non-any type.", + "missingArgType": "Argument '{{name}}' should be typed.", + "missingArgTypeUnnamed": "{{type}} argument should be typed.", + "missingReturnType": "Missing return type on function.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowArgumentsExplicitlyTypedAsAny": { + "description": "Whether to ignore arguments that are explicitly typed as \`any\`.", + "type": "boolean", + }, + "allowDirectConstAssertionInArrowFunctions": { + "description": "Whether to ignore return type annotations on body-less arrow functions that return an \`as const\` type assertion. +You must still type the parameters of the function.", + "type": "boolean", + }, + "allowHigherOrderFunctions": { + "description": "Whether to ignore return type annotations on functions immediately returning another function expression. +You must still type the parameters of the function.", + "type": "boolean", + }, + "allowTypedFunctionExpressions": { + "description": "Whether to ignore type annotations on the variable of a function expression.", + "type": "boolean", + }, + "allowedNames": { + "description": "An array of function/method names that will not have their arguments or return values checked.", + "items": { + "type": "string", + }, + "type": "array", + }, + }, + "type": "object", + }, + ], + "type": "problem", + }, + }, + "func-call-spacing": { + "create": [Function], + "defaultOptions": [ + "never", + {}, + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Require or disallow spacing between function identifiers and their invocations", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/func-call-spacing", + }, + "fixable": "whitespace", + "messages": { + "missing": "Missing space between function name and paren.", + "unexpectedNewline": "Unexpected newline between function name and paren.", + "unexpectedWhitespace": "Unexpected whitespace between function name and paren.", + }, + "replacedBy": [ + "@stylistic/ts/func-call-spacing", + ], + "schema": { + "anyOf": [ + { + "items": [ + { + "enum": [ + "never", + ], + "type": "string", + }, + ], + "maxItems": 1, + "minItems": 0, + "type": "array", + }, + { + "items": [ + { + "enum": [ + "always", + ], + "type": "string", + }, + { + "additionalProperties": false, + "properties": { + "allowNewlines": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "maxItems": 2, + "minItems": 0, + "type": "array", + }, + ], + }, + "type": "layout", + }, + }, + "indent": { + "create": [Function], + "defaultOptions": [ + 4, + { + "SwitchCase": 1, + "flatTernaryExpressions": false, + "ignoredNodes": [], + }, + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Enforce consistent indentation", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/indent", + }, + "fixable": "whitespace", + "hasSuggestions": undefined, + "messages": { + "wrongIndentation": "Expected indentation of {{expected}} but found {{actual}}.", + }, + "replacedBy": [ + "@stylistic/ts/indent", + ], + "schema": [ + { + "oneOf": [ + { + "enum": [ + "tab", + ], + }, + { + "minimum": 0, + "type": "integer", + }, + ], + }, + { + "additionalProperties": false, + "properties": { + "ArrayExpression": { + "oneOf": [ + { + "minimum": 0, + "type": "integer", + }, + { + "enum": [ + "first", + "off", + ], + }, + ], + }, + "CallExpression": { + "additionalProperties": false, + "properties": { + "arguments": { + "oneOf": [ + { + "minimum": 0, + "type": "integer", + }, + { + "enum": [ + "first", + "off", + ], + }, + ], + }, + }, + "type": "object", + }, + "FunctionDeclaration": { + "additionalProperties": false, + "properties": { + "body": { + "minimum": 0, + "type": "integer", + }, + "parameters": { + "oneOf": [ + { + "minimum": 0, + "type": "integer", + }, + { + "enum": [ + "first", + "off", + ], + }, + ], + }, + }, + "type": "object", + }, + "FunctionExpression": { + "additionalProperties": false, + "properties": { + "body": { + "minimum": 0, + "type": "integer", + }, + "parameters": { + "oneOf": [ + { + "minimum": 0, + "type": "integer", + }, + { + "enum": [ + "first", + "off", + ], + }, + ], + }, + }, + "type": "object", + }, + "ImportDeclaration": { + "oneOf": [ + { + "minimum": 0, + "type": "integer", + }, + { + "enum": [ + "first", + "off", + ], + }, + ], + }, + "MemberExpression": { + "oneOf": [ + { + "minimum": 0, + "type": "integer", + }, + { + "enum": [ + "off", + ], + }, + ], + }, + "ObjectExpression": { + "oneOf": [ + { + "minimum": 0, + "type": "integer", + }, + { + "enum": [ + "first", + "off", + ], + }, + ], + }, + "StaticBlock": { + "additionalProperties": false, + "properties": { + "body": { + "minimum": 0, + "type": "integer", + }, + }, + "type": "object", + }, + "SwitchCase": { + "default": 0, + "minimum": 0, + "type": "integer", + }, + "VariableDeclarator": { + "oneOf": [ + { + "oneOf": [ + { + "minimum": 0, + "type": "integer", + }, + { + "enum": [ + "first", + "off", + ], + }, + ], + }, + { + "additionalProperties": false, + "properties": { + "const": { + "oneOf": [ + { + "minimum": 0, + "type": "integer", + }, + { + "enum": [ + "first", + "off", + ], + }, + ], + }, + "let": { + "oneOf": [ + { + "minimum": 0, + "type": "integer", + }, + { + "enum": [ + "first", + "off", + ], + }, + ], + }, + "var": { + "oneOf": [ + { + "minimum": 0, + "type": "integer", + }, + { + "enum": [ + "first", + "off", + ], + }, + ], + }, + }, + "type": "object", + }, + ], + }, + "flatTernaryExpressions": { + "default": false, + "type": "boolean", + }, + "ignoreComments": { + "default": false, + "type": "boolean", + }, + "ignoredNodes": { + "items": { + "not": { + "pattern": ":exit$", + }, + "type": "string", + }, + "type": "array", + }, + "offsetTernaryExpressions": { + "default": false, + "type": "boolean", + }, + "outerIIFEBody": { + "oneOf": [ + { + "minimum": 0, + "type": "integer", + }, + { + "enum": [ + "off", + ], + }, + ], + }, + }, + "type": "object", + }, + ], + "type": "layout", + }, + }, + "init-declarations": { + "create": [Function], + "defaultOptions": [ + "always", + ], + "meta": { + "docs": { + "description": "Require or disallow initialization in variable declarations", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/init-declarations", + }, + "hasSuggestions": undefined, + "messages": { + "initialized": "Variable '{{idName}}' should be initialized on declaration.", + "notInitialized": "Variable '{{idName}}' should not be initialized on declaration.", + }, + "schema": { + "anyOf": [ + { + "items": [ + { + "enum": [ + "always", + ], + }, + ], + "maxItems": 1, + "minItems": 0, + "type": "array", + }, + { + "items": [ + { + "enum": [ + "never", + ], + }, + { + "additionalProperties": false, + "properties": { + "ignoreForLoopInit": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "maxItems": 2, + "minItems": 0, + "type": "array", + }, + ], + }, + "type": "suggestion", + }, + }, + "key-spacing": { + "create": [Function], + "defaultOptions": [ + {}, + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Enforce consistent spacing between property names and type annotations in types and interfaces", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/key-spacing", + }, + "fixable": "whitespace", + "hasSuggestions": undefined, + "messages": { + "extraKey": "Extra space after {{computed}}key '{{key}}'.", + "extraValue": "Extra space before value for {{computed}}key '{{key}}'.", + "missingKey": "Missing space after {{computed}}key '{{key}}'.", + "missingValue": "Missing space before value for {{computed}}key '{{key}}'.", + }, + "replacedBy": [ + "@stylistic/ts/key-spacing", + ], + "schema": [ + { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "afterColon": { + "type": "boolean", + }, + "align": { + "anyOf": [ + { + "enum": [ + "colon", + "value", + ], + }, + { + "additionalProperties": false, + "properties": { + "afterColon": { + "type": "boolean", + }, + "beforeColon": { + "type": "boolean", + }, + "mode": { + "enum": [ + "strict", + "minimum", + ], + }, + "on": { + "enum": [ + "colon", + "value", + ], + }, + }, + "type": "object", + }, + ], + }, + "beforeColon": { + "type": "boolean", + }, + "mode": { + "enum": [ + "strict", + "minimum", + ], + }, + }, + "type": "object", + }, + { + "additionalProperties": false, + "properties": { + "multiLine": { + "additionalProperties": false, + "properties": { + "afterColon": { + "type": "boolean", + }, + "align": { + "anyOf": [ + { + "enum": [ + "colon", + "value", + ], + }, + { + "additionalProperties": false, + "properties": { + "afterColon": { + "type": "boolean", + }, + "beforeColon": { + "type": "boolean", + }, + "mode": { + "enum": [ + "strict", + "minimum", + ], + }, + "on": { + "enum": [ + "colon", + "value", + ], + }, + }, + "type": "object", + }, + ], + }, + "beforeColon": { + "type": "boolean", + }, + "mode": { + "enum": [ + "strict", + "minimum", + ], + }, + }, + "type": "object", + }, + "singleLine": { + "additionalProperties": false, + "properties": { + "afterColon": { + "type": "boolean", + }, + "beforeColon": { + "type": "boolean", + }, + "mode": { + "enum": [ + "strict", + "minimum", + ], + }, + }, + "type": "object", + }, + }, + "type": "object", + }, + { + "additionalProperties": false, + "properties": { + "align": { + "additionalProperties": false, + "properties": { + "afterColon": { + "type": "boolean", + }, + "beforeColon": { + "type": "boolean", + }, + "mode": { + "enum": [ + "strict", + "minimum", + ], + }, + "on": { + "enum": [ + "colon", + "value", + ], + }, + }, + "type": "object", + }, + "multiLine": { + "additionalProperties": false, + "properties": { + "afterColon": { + "type": "boolean", + }, + "beforeColon": { + "type": "boolean", + }, + "mode": { + "enum": [ + "strict", + "minimum", + ], + }, + }, + "type": "object", + }, + "singleLine": { + "additionalProperties": false, + "properties": { + "afterColon": { + "type": "boolean", + }, + "beforeColon": { + "type": "boolean", + }, + "mode": { + "enum": [ + "strict", + "minimum", + ], + }, + }, + "type": "object", + }, + }, + "type": "object", + }, + ], + }, + ], + "type": "layout", + }, + }, + "keyword-spacing": { + "create": [Function], + "defaultOptions": [ + {}, + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Enforce consistent spacing before and after keywords", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/keyword-spacing", + }, + "fixable": "whitespace", + "hasSuggestions": undefined, + "messages": { + "expectedAfter": "Expected space(s) after "{{value}}".", + "expectedBefore": "Expected space(s) before "{{value}}".", + "unexpectedAfter": "Unexpected space(s) after "{{value}}".", + "unexpectedBefore": "Unexpected space(s) before "{{value}}".", + }, + "replacedBy": [ + "@stylistic/ts/keyword-spacing", + ], + "schema": [ + { + "additionalProperties": false, + "properties": { + "after": { + "default": true, + "type": "boolean", + }, + "before": { + "default": true, + "type": "boolean", + }, + "overrides": { + "additionalProperties": false, + "properties": { + "abstract": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "as": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "async": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "await": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "boolean": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "break": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "byte": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "case": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "catch": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "char": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "class": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "const": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "continue": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "debugger": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "default": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "delete": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "do": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "double": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "else": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "enum": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "export": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "extends": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "false": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "final": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "finally": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "float": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "for": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "from": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "function": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "get": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "goto": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "if": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "implements": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "import": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "in": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "instanceof": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "int": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "interface": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "let": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "long": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "native": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "new": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "null": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "of": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "package": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "private": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "protected": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "public": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "return": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "set": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "short": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "static": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "super": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "switch": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "synchronized": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "this": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "throw": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "throws": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "transient": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "true": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "try": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "type": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "typeof": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "var": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "void": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "volatile": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "while": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "with": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + "yield": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + }, + "type": "object", + }, + }, + "type": "object", + }, + ], + "type": "layout", + }, + }, + "lines-around-comment": { + "create": [Function], + "defaultOptions": [ + { + "beforeBlockComment": true, + }, + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Require empty lines around comments", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/lines-around-comment", + }, + "fixable": "whitespace", + "hasSuggestions": undefined, + "messages": { + "after": "Expected line after comment.", + "before": "Expected line before comment.", + }, + "replacedBy": [ + "@stylistic/ts/lines-around-comment", + ], + "schema": [ + { + "additionalProperties": false, + "properties": { + "afterBlockComment": { + "default": false, + "type": "boolean", + }, + "afterLineComment": { + "default": false, + "type": "boolean", + }, + "allowArrayEnd": { + "type": "boolean", + }, + "allowArrayStart": { + "type": "boolean", + }, + "allowBlockEnd": { + "default": false, + "type": "boolean", + }, + "allowBlockStart": { + "default": false, + "type": "boolean", + }, + "allowClassEnd": { + "type": "boolean", + }, + "allowClassStart": { + "type": "boolean", + }, + "allowEnumEnd": { + "type": "boolean", + }, + "allowEnumStart": { + "type": "boolean", + }, + "allowInterfaceEnd": { + "type": "boolean", + }, + "allowInterfaceStart": { + "type": "boolean", + }, + "allowModuleEnd": { + "type": "boolean", + }, + "allowModuleStart": { + "type": "boolean", + }, + "allowObjectEnd": { + "type": "boolean", + }, + "allowObjectStart": { + "type": "boolean", + }, + "allowTypeEnd": { + "type": "boolean", + }, + "allowTypeStart": { + "type": "boolean", + }, + "applyDefaultIgnorePatterns": { + "type": "boolean", + }, + "beforeBlockComment": { + "default": true, + "type": "boolean", + }, + "beforeLineComment": { + "default": false, + "type": "boolean", + }, + "ignorePattern": { + "type": "string", + }, + }, + "type": "object", + }, + ], + "type": "layout", + }, + }, + "lines-between-class-members": { + "create": [Function], + "defaultOptions": [ + "always", + { + "exceptAfterOverload": true, + "exceptAfterSingleLine": false, + }, + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Require or disallow an empty line between class members", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/lines-between-class-members", + }, + "fixable": "whitespace", + "hasSuggestions": undefined, + "messages": { + "always": "Expected blank line between class members.", + "never": "Unexpected blank line between class members.", + }, + "replacedBy": [ + "@stylistic/ts/lines-between-class-members", + ], + "schema": [ + { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "enforce": { + "items": { + "additionalProperties": false, + "properties": { + "blankLine": { + "enum": [ + "always", + "never", + ], + }, + "next": { + "enum": [ + "method", + "field", + "*", + ], + }, + "prev": { + "enum": [ + "method", + "field", + "*", + ], + }, + }, + "required": [ + "blankLine", + "prev", + "next", + ], + "type": "object", + }, + "minItems": 1, + "type": "array", + }, + }, + "required": [ + "enforce", + ], + "type": "object", + }, + { + "enum": [ + "always", + "never", + ], + }, + ], + }, + { + "additionalProperties": false, + "properties": { + "exceptAfterOverload": { + "default": true, + "type": "boolean", + }, + "exceptAfterSingleLine": { + "default": false, + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "layout", + }, + }, + "max-params": { + "create": [Function], + "defaultOptions": [ + { + "countVoidThis": false, + "max": 3, + }, + ], + "meta": { + "docs": { + "description": "Enforce a maximum number of parameters in function definitions", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/max-params", + }, + "messages": { + "exceed": "{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "countVoidThis": { + "type": "boolean", + }, + "max": { + "minimum": 0, + "type": "integer", + }, + "maximum": { + "minimum": 0, + "type": "integer", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "member-delimiter-style": { + "create": [Function], + "defaultOptions": [ + { + "multiline": { + "delimiter": "semi", + "requireLast": true, + }, + "multilineDetection": "brackets", + "singleline": { + "delimiter": "semi", + "requireLast": false, + }, + }, + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Require a specific member delimiter style for interfaces and type literals", + "url": "https://typescript-eslint.io/rules/member-delimiter-style", + }, + "fixable": "whitespace", + "messages": { + "expectedComma": "Expected a comma.", + "expectedSemi": "Expected a semicolon.", + "unexpectedComma": "Unexpected separator (,).", + "unexpectedSemi": "Unexpected separator (;).", + }, + "replacedBy": [ + "@stylistic/ts/member-delimiter-style", + ], + "schema": [ + { + "$defs": { + "delimiterConfig": { + "additionalProperties": false, + "properties": { + "multiline": { + "additionalProperties": false, + "properties": { + "delimiter": { + "$ref": "#/items/0/$defs/multiLineOption", + }, + "requireLast": { + "type": "boolean", + }, + }, + "type": "object", + }, + "singleline": { + "additionalProperties": false, + "properties": { + "delimiter": { + "$ref": "#/items/0/$defs/singleLineOption", + }, + "requireLast": { + "type": "boolean", + }, + }, + "type": "object", + }, + }, + "type": "object", + }, + "multiLineOption": { + "enum": [ + "none", + "semi", + "comma", + ], + "type": "string", + }, + "singleLineOption": { + "enum": [ + "semi", + "comma", + ], + "type": "string", + }, + }, + "additionalProperties": false, + "properties": { + "multiline": { + "additionalProperties": false, + "properties": { + "delimiter": { + "$ref": "#/items/0/$defs/multiLineOption", + }, + "requireLast": { + "type": "boolean", + }, + }, + "type": "object", + }, + "multilineDetection": { + "enum": [ + "brackets", + "last-member", + ], + "type": "string", + }, + "overrides": { + "additionalProperties": false, + "properties": { + "interface": { + "$ref": "#/items/0/$defs/delimiterConfig", + }, + "typeLiteral": { + "$ref": "#/items/0/$defs/delimiterConfig", + }, + }, + "type": "object", + }, + "singleline": { + "additionalProperties": false, + "properties": { + "delimiter": { + "$ref": "#/items/0/$defs/singleLineOption", + }, + "requireLast": { + "type": "boolean", + }, + }, + "type": "object", + }, + }, + "type": "object", + }, + ], + "type": "layout", + }, + }, + "member-ordering": { + "create": [Function], + "defaultOptions": [ + { + "default": { + "memberTypes": [ + "signature", + "call-signature", + "public-static-field", + "protected-static-field", + "private-static-field", + "#private-static-field", + "public-decorated-field", + "protected-decorated-field", + "private-decorated-field", + "public-instance-field", + "protected-instance-field", + "private-instance-field", + "#private-instance-field", + "public-abstract-field", + "protected-abstract-field", + "public-field", + "protected-field", + "private-field", + "#private-field", + "static-field", + "instance-field", + "abstract-field", + "decorated-field", + "field", + "static-initialization", + "public-constructor", + "protected-constructor", + "private-constructor", + "constructor", + "public-static-accessor", + "protected-static-accessor", + "private-static-accessor", + "#private-static-accessor", + "public-decorated-accessor", + "protected-decorated-accessor", + "private-decorated-accessor", + "public-instance-accessor", + "protected-instance-accessor", + "private-instance-accessor", + "#private-instance-accessor", + "public-abstract-accessor", + "protected-abstract-accessor", + "public-accessor", + "protected-accessor", + "private-accessor", + "#private-accessor", + "static-accessor", + "instance-accessor", + "abstract-accessor", + "decorated-accessor", + "accessor", + "public-static-get", + "protected-static-get", + "private-static-get", + "#private-static-get", + "public-decorated-get", + "protected-decorated-get", + "private-decorated-get", + "public-instance-get", + "protected-instance-get", + "private-instance-get", + "#private-instance-get", + "public-abstract-get", + "protected-abstract-get", + "public-get", + "protected-get", + "private-get", + "#private-get", + "static-get", + "instance-get", + "abstract-get", + "decorated-get", + "get", + "public-static-set", + "protected-static-set", + "private-static-set", + "#private-static-set", + "public-decorated-set", + "protected-decorated-set", + "private-decorated-set", + "public-instance-set", + "protected-instance-set", + "private-instance-set", + "#private-instance-set", + "public-abstract-set", + "protected-abstract-set", + "public-set", + "protected-set", + "private-set", + "#private-set", + "static-set", + "instance-set", + "abstract-set", + "decorated-set", + "set", + "public-static-method", + "protected-static-method", + "private-static-method", + "#private-static-method", + "public-decorated-method", + "protected-decorated-method", + "private-decorated-method", + "public-instance-method", + "protected-instance-method", + "private-instance-method", + "#private-instance-method", + "public-abstract-method", + "protected-abstract-method", + "public-method", + "protected-method", + "private-method", + "#private-method", + "static-method", + "instance-method", + "abstract-method", + "decorated-method", + "method", + ], + }, + }, + ], + "meta": { + "docs": { + "description": "Require a consistent member declaration order", + "url": "https://typescript-eslint.io/rules/member-ordering", + }, + "messages": { + "incorrectGroupOrder": "Member {{name}} should be declared before all {{rank}} definitions.", + "incorrectOrder": "Member {{member}} should be declared before member {{beforeMember}}.", + "incorrectRequiredMembersOrder": "Member {{member}} should be declared after all {{optionalOrRequired}} members.", + }, + "schema": [ + { + "$defs": { + "allItems": { + "enum": [ + "readonly-signature", + "signature", + "readonly-field", + "public-readonly-field", + "public-decorated-readonly-field", + "decorated-readonly-field", + "static-readonly-field", + "public-static-readonly-field", + "instance-readonly-field", + "public-instance-readonly-field", + "abstract-readonly-field", + "public-abstract-readonly-field", + "protected-readonly-field", + "protected-decorated-readonly-field", + "protected-static-readonly-field", + "protected-instance-readonly-field", + "protected-abstract-readonly-field", + "private-readonly-field", + "private-decorated-readonly-field", + "private-static-readonly-field", + "private-instance-readonly-field", + "#private-readonly-field", + "#private-static-readonly-field", + "#private-instance-readonly-field", + "field", + "public-field", + "public-decorated-field", + "decorated-field", + "static-field", + "public-static-field", + "instance-field", + "public-instance-field", + "abstract-field", + "public-abstract-field", + "protected-field", + "protected-decorated-field", + "protected-static-field", + "protected-instance-field", + "protected-abstract-field", + "private-field", + "private-decorated-field", + "private-static-field", + "private-instance-field", + "#private-field", + "#private-static-field", + "#private-instance-field", + "method", + "public-method", + "public-decorated-method", + "decorated-method", + "static-method", + "public-static-method", + "instance-method", + "public-instance-method", + "abstract-method", + "public-abstract-method", + "protected-method", + "protected-decorated-method", + "protected-static-method", + "protected-instance-method", + "protected-abstract-method", + "private-method", + "private-decorated-method", + "private-static-method", + "private-instance-method", + "#private-method", + "#private-static-method", + "#private-instance-method", + "call-signature", + "constructor", + "public-constructor", + "protected-constructor", + "private-constructor", + "accessor", + "public-accessor", + "public-decorated-accessor", + "decorated-accessor", + "static-accessor", + "public-static-accessor", + "instance-accessor", + "public-instance-accessor", + "abstract-accessor", + "public-abstract-accessor", + "protected-accessor", + "protected-decorated-accessor", + "protected-static-accessor", + "protected-instance-accessor", + "protected-abstract-accessor", + "private-accessor", + "private-decorated-accessor", + "private-static-accessor", + "private-instance-accessor", + "#private-accessor", + "#private-static-accessor", + "#private-instance-accessor", + "get", + "public-get", + "public-decorated-get", + "decorated-get", + "static-get", + "public-static-get", + "instance-get", + "public-instance-get", + "abstract-get", + "public-abstract-get", + "protected-get", + "protected-decorated-get", + "protected-static-get", + "protected-instance-get", + "protected-abstract-get", + "private-get", + "private-decorated-get", + "private-static-get", + "private-instance-get", + "#private-get", + "#private-static-get", + "#private-instance-get", + "set", + "public-set", + "public-decorated-set", + "decorated-set", + "static-set", + "public-static-set", + "instance-set", + "public-instance-set", + "abstract-set", + "public-abstract-set", + "protected-set", + "protected-decorated-set", + "protected-static-set", + "protected-instance-set", + "protected-abstract-set", + "private-set", + "private-decorated-set", + "private-static-set", + "private-instance-set", + "#private-set", + "#private-static-set", + "#private-instance-set", + "static-initialization", + "static-static-initialization", + "public-static-static-initialization", + "instance-static-initialization", + "public-instance-static-initialization", + "abstract-static-initialization", + "public-abstract-static-initialization", + "protected-static-static-initialization", + "protected-instance-static-initialization", + "protected-abstract-static-initialization", + "private-static-static-initialization", + "private-instance-static-initialization", + "#private-static-static-initialization", + "#private-instance-static-initialization", + ], + "type": "string", + }, + "baseConfig": { + "oneOf": [ + { + "enum": [ + "never", + ], + "type": "string", + }, + { + "items": { + "oneOf": [ + { + "$ref": "#/items/0/$defs/allItems", + }, + { + "items": { + "$ref": "#/items/0/$defs/allItems", + }, + "type": "array", + }, + ], + }, + "type": "array", + }, + { + "additionalProperties": false, + "properties": { + "memberTypes": { + "oneOf": [ + { + "items": { + "oneOf": [ + { + "$ref": "#/items/0/$defs/allItems", + }, + { + "items": { + "$ref": "#/items/0/$defs/allItems", + }, + "type": "array", + }, + ], + }, + "type": "array", + }, + { + "enum": [ + "never", + ], + "type": "string", + }, + ], + }, + "optionalityOrder": { + "$ref": "#/items/0/$defs/optionalityOrderOptions", + }, + "order": { + "$ref": "#/items/0/$defs/orderOptions", + }, + }, + "type": "object", + }, + ], + }, + "optionalityOrderOptions": { + "enum": [ + "optional-first", + "required-first", + ], + "type": "string", + }, + "orderOptions": { + "enum": [ + "alphabetically", + "alphabetically-case-insensitive", + "as-written", + "natural", + "natural-case-insensitive", + ], + "type": "string", + }, + "typeItems": { + "enum": [ + "readonly-signature", + "signature", + "readonly-field", + "field", + "method", + "constructor", + ], + "type": "string", + }, + "typesConfig": { + "oneOf": [ + { + "enum": [ + "never", + ], + "type": "string", + }, + { + "items": { + "oneOf": [ + { + "$ref": "#/items/0/$defs/typeItems", + }, + { + "items": { + "$ref": "#/items/0/$defs/typeItems", + }, + "type": "array", + }, + ], + }, + "type": "array", + }, + { + "additionalProperties": false, + "properties": { + "memberTypes": { + "oneOf": [ + { + "items": { + "oneOf": [ + { + "$ref": "#/items/0/$defs/typeItems", + }, + { + "items": { + "$ref": "#/items/0/$defs/typeItems", + }, + "type": "array", + }, + ], + }, + "type": "array", + }, + { + "enum": [ + "never", + ], + "type": "string", + }, + ], + }, + "optionalityOrder": { + "$ref": "#/items/0/$defs/optionalityOrderOptions", + }, + "order": { + "$ref": "#/items/0/$defs/orderOptions", + }, + }, + "type": "object", + }, + ], + }, + }, + "additionalProperties": false, + "properties": { + "classExpressions": { + "$ref": "#/items/0/$defs/baseConfig", + }, + "classes": { + "$ref": "#/items/0/$defs/baseConfig", + }, + "default": { + "$ref": "#/items/0/$defs/baseConfig", + }, + "interfaces": { + "$ref": "#/items/0/$defs/typesConfig", + }, + "typeLiterals": { + "$ref": "#/items/0/$defs/typesConfig", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "method-signature-style": { + "create": [Function], + "defaultOptions": [ + "property", + ], + "meta": { + "docs": { + "description": "Enforce using a particular method signature syntax", + "url": "https://typescript-eslint.io/rules/method-signature-style", + }, + "fixable": "code", + "messages": { + "errorMethod": "Shorthand method signature is forbidden. Use a function property instead.", + "errorProperty": "Function property signature is forbidden. Use a method shorthand instead.", + }, + "schema": [ + { + "enum": [ + "property", + "method", + ], + "type": "string", + }, + ], + "type": "suggestion", + }, + }, + "naming-convention": { + "create": [Function], + "defaultOptions": [ + { + "format": [ + "camelCase", + ], + "leadingUnderscore": "allow", + "selector": "default", + "trailingUnderscore": "allow", + }, + { + "format": [ + "camelCase", + "PascalCase", + ], + "selector": "import", + }, + { + "format": [ + "camelCase", + "UPPER_CASE", + ], + "leadingUnderscore": "allow", + "selector": "variable", + "trailingUnderscore": "allow", + }, + { + "format": [ + "PascalCase", + ], + "selector": "typeLike", + }, + ], + "meta": { + "docs": { + "description": "Enforce naming conventions for everything across a codebase", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/naming-convention", + }, + "messages": { + "doesNotMatchFormat": "{{type}} name \`{{name}}\` must match one of the following formats: {{formats}}", + "doesNotMatchFormatTrimmed": "{{type}} name \`{{name}}\` trimmed as \`{{processedName}}\` must match one of the following formats: {{formats}}", + "missingAffix": "{{type}} name \`{{name}}\` must have one of the following {{position}}es: {{affixes}}", + "missingUnderscore": "{{type}} name \`{{name}}\` must have {{count}} {{position}} underscore(s).", + "satisfyCustom": "{{type}} name \`{{name}}\` must {{regexMatch}} the RegExp: {{regex}}", + "unexpectedUnderscore": "{{type}} name \`{{name}}\` must not have a {{position}} underscore.", + }, + "schema": { + "$defs": { + "formatOptionsConfig": { + "oneOf": [ + { + "additionalItems": false, + "items": { + "$ref": "#/$defs/predefinedFormats", + }, + "type": "array", + }, + { + "type": "null", + }, + ], + }, + "matchRegexConfig": { + "additionalProperties": false, + "properties": { + "match": { + "type": "boolean", + }, + "regex": { + "type": "string", + }, + }, + "required": [ + "match", + "regex", + ], + "type": "object", + }, + "predefinedFormats": { + "enum": [ + "camelCase", + "strictCamelCase", + "PascalCase", + "StrictPascalCase", + "snake_case", + "UPPER_CASE", + ], + "type": "string", + }, + "prefixSuffixConfig": { + "additionalItems": false, + "items": { + "minLength": 1, + "type": "string", + }, + "type": "array", + }, + "typeModifiers": { + "enum": [ + "boolean", + "string", + "number", + "function", + "array", + ], + "type": "string", + }, + "underscoreOptions": { + "enum": [ + "forbid", + "allow", + "require", + "requireDouble", + "allowDouble", + "allowSingleOrDouble", + ], + "type": "string", + }, + }, + "additionalItems": false, + "items": { + "oneOf": [ + { + "additionalProperties": false, + "description": "Multiple selectors in one config", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "const", + "readonly", + "static", + "public", + "protected", + "private", + "#private", + "abstract", + "destructured", + "global", + "exported", + "unused", + "requiresQuotes", + "override", + "async", + "default", + "namespace", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "additionalItems": false, + "items": { + "enum": [ + "default", + "variableLike", + "memberLike", + "typeLike", + "method", + "property", + "accessor", + "variable", + "function", + "parameter", + "parameterProperty", + "classicAccessor", + "enumMember", + "classMethod", + "objectLiteralMethod", + "typeMethod", + "classProperty", + "objectLiteralProperty", + "typeProperty", + "autoAccessor", + "class", + "interface", + "typeAlias", + "enum", + "typeParameter", + "import", + ], + "type": "string", + }, + "type": "array", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "types": { + "additionalItems": false, + "items": { + "$ref": "#/$defs/typeModifiers", + }, + "type": "array", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'default'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "const", + "readonly", + "static", + "public", + "protected", + "private", + "#private", + "abstract", + "destructured", + "global", + "exported", + "unused", + "requiresQuotes", + "override", + "async", + "default", + "namespace", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "default", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'variableLike'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "unused", + "async", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "variableLike", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'variable'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "const", + "destructured", + "exported", + "global", + "unused", + "async", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "variable", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "types": { + "additionalItems": false, + "items": { + "$ref": "#/$defs/typeModifiers", + }, + "type": "array", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'function'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "exported", + "global", + "unused", + "async", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "function", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'parameter'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "destructured", + "unused", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "parameter", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "types": { + "additionalItems": false, + "items": { + "$ref": "#/$defs/typeModifiers", + }, + "type": "array", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'memberLike'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "abstract", + "private", + "#private", + "protected", + "public", + "readonly", + "requiresQuotes", + "static", + "override", + "async", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "memberLike", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'classProperty'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "abstract", + "private", + "#private", + "protected", + "public", + "readonly", + "requiresQuotes", + "static", + "override", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "classProperty", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "types": { + "additionalItems": false, + "items": { + "$ref": "#/$defs/typeModifiers", + }, + "type": "array", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'objectLiteralProperty'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "public", + "requiresQuotes", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "objectLiteralProperty", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "types": { + "additionalItems": false, + "items": { + "$ref": "#/$defs/typeModifiers", + }, + "type": "array", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'typeProperty'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "public", + "readonly", + "requiresQuotes", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "typeProperty", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "types": { + "additionalItems": false, + "items": { + "$ref": "#/$defs/typeModifiers", + }, + "type": "array", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'parameterProperty'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "private", + "protected", + "public", + "readonly", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "parameterProperty", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "types": { + "additionalItems": false, + "items": { + "$ref": "#/$defs/typeModifiers", + }, + "type": "array", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'property'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "abstract", + "private", + "#private", + "protected", + "public", + "readonly", + "requiresQuotes", + "static", + "override", + "async", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "property", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "types": { + "additionalItems": false, + "items": { + "$ref": "#/$defs/typeModifiers", + }, + "type": "array", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'classMethod'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "abstract", + "private", + "#private", + "protected", + "public", + "requiresQuotes", + "static", + "override", + "async", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "classMethod", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'objectLiteralMethod'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "public", + "requiresQuotes", + "async", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "objectLiteralMethod", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'typeMethod'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "public", + "requiresQuotes", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "typeMethod", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'method'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "abstract", + "private", + "#private", + "protected", + "public", + "requiresQuotes", + "static", + "override", + "async", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "method", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'classicAccessor'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "abstract", + "private", + "protected", + "public", + "requiresQuotes", + "static", + "override", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "classicAccessor", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "types": { + "additionalItems": false, + "items": { + "$ref": "#/$defs/typeModifiers", + }, + "type": "array", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'autoAccessor'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "abstract", + "private", + "protected", + "public", + "requiresQuotes", + "static", + "override", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "autoAccessor", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "types": { + "additionalItems": false, + "items": { + "$ref": "#/$defs/typeModifiers", + }, + "type": "array", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'accessor'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "abstract", + "private", + "protected", + "public", + "requiresQuotes", + "static", + "override", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "accessor", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "types": { + "additionalItems": false, + "items": { + "$ref": "#/$defs/typeModifiers", + }, + "type": "array", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'enumMember'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "requiresQuotes", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "enumMember", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'typeLike'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "abstract", + "exported", + "unused", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "typeLike", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'class'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "abstract", + "exported", + "unused", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "class", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'interface'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "exported", + "unused", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "interface", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'typeAlias'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "exported", + "unused", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "typeAlias", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'enum'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "exported", + "unused", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "enum", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'typeParameter'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "unused", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "typeParameter", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + { + "additionalProperties": false, + "description": "Selector 'import'", + "properties": { + "custom": { + "$ref": "#/$defs/matchRegexConfig", + }, + "failureMessage": { + "type": "string", + }, + "filter": { + "oneOf": [ + { + "minLength": 1, + "type": "string", + }, + { + "$ref": "#/$defs/matchRegexConfig", + }, + ], + }, + "format": { + "$ref": "#/$defs/formatOptionsConfig", + }, + "leadingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + "modifiers": { + "additionalItems": false, + "items": { + "enum": [ + "default", + "namespace", + ], + "type": "string", + }, + "type": "array", + }, + "prefix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "selector": { + "enum": [ + "import", + ], + "type": "string", + }, + "suffix": { + "$ref": "#/$defs/prefixSuffixConfig", + }, + "trailingUnderscore": { + "$ref": "#/$defs/underscoreOptions", + }, + }, + "required": [ + "selector", + "format", + ], + "type": "object", + }, + ], + }, + "type": "array", + }, + "type": "suggestion", + }, + }, + "no-array-constructor": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow generic \`Array\` constructors", + "extendsBaseRule": true, + "recommended": "recommended", + "url": "https://typescript-eslint.io/rules/no-array-constructor", + }, + "fixable": "code", + "messages": { + "useLiteral": "The array literal notation [] is preferable.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "no-array-delete": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow using the \`delete\` operator on array values", + "recommended": "strict", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-array-delete", + }, + "hasSuggestions": true, + "messages": { + "noArrayDelete": "Using the \`delete\` operator with an array expression is unsafe.", + "useSplice": "Use \`array.splice()\` instead.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-base-to-string": { + "create": [Function], + "defaultOptions": [ + { + "ignoredTypeNames": [ + "Error", + "RegExp", + "URL", + "URLSearchParams", + ], + }, + ], + "meta": { + "docs": { + "description": "Require \`.toString()\` to only be called on objects which provide useful information when stringified", + "recommended": "recommended", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-base-to-string", + }, + "messages": { + "baseToString": "'{{name}}' {{certainty}} evaluate to '[object Object]' when stringified.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "ignoredTypeNames": { + "items": { + "type": "string", + }, + "type": "array", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-confusing-non-null-assertion": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow non-null assertion in locations that may be confusing", + "recommended": "stylistic", + "url": "https://typescript-eslint.io/rules/no-confusing-non-null-assertion", + }, + "hasSuggestions": true, + "messages": { + "confusingAssign": "Confusing combinations of non-null assertion and equal test like "a! = b", which looks very similar to not equal "a != b".", + "confusingEqual": "Confusing combinations of non-null assertion and equal test like "a! == b", which looks very similar to not equal "a !== b".", + "notNeedInAssign": "Unnecessary non-null assertion (!) in assignment left hand.", + "notNeedInEqualTest": "Unnecessary non-null assertion (!) in equal test.", + "wrapUpLeft": "Wrap up left hand to avoid putting non-null assertion "!" and "=" together.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-confusing-void-expression": { + "create": [Function], + "defaultOptions": [ + { + "ignoreArrowShorthand": false, + "ignoreVoidOperator": false, + }, + ], + "meta": { + "docs": { + "description": "Require expressions of type void to appear in statement position", + "recommended": "strict", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-confusing-void-expression", + }, + "fixable": "code", + "hasSuggestions": true, + "messages": { + "invalidVoidExpr": "Placing a void expression inside another expression is forbidden. Move it to its own statement instead.", + "invalidVoidExprArrow": "Returning a void expression from an arrow function shorthand is forbidden. Please add braces to the arrow function.", + "invalidVoidExprArrowWrapVoid": "Void expressions returned from an arrow function shorthand must be marked explicitly with the \`void\` operator.", + "invalidVoidExprReturn": "Returning a void expression from a function is forbidden. Please move it before the \`return\` statement.", + "invalidVoidExprReturnLast": "Returning a void expression from a function is forbidden. Please remove the \`return\` statement.", + "invalidVoidExprReturnWrapVoid": "Void expressions returned from a function must be marked explicitly with the \`void\` operator.", + "invalidVoidExprWrapVoid": "Void expressions used inside another expression must be moved to its own statement or marked explicitly with the \`void\` operator.", + "voidExprWrapVoid": "Mark with an explicit \`void\` operator.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "ignoreArrowShorthand": { + "type": "boolean", + }, + "ignoreVoidOperator": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "problem", + }, + }, + "no-dupe-class-members": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow duplicate class members", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/no-dupe-class-members", + }, + "hasSuggestions": undefined, + "messages": { + "unexpected": "Duplicate name '{{name}}'.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-duplicate-enum-values": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow duplicate enum member values", + "recommended": "recommended", + "url": "https://typescript-eslint.io/rules/no-duplicate-enum-values", + }, + "hasSuggestions": false, + "messages": { + "duplicateValue": "Duplicate enum member value {{value}}.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-duplicate-type-constituents": { + "create": [Function], + "defaultOptions": [ + { + "ignoreIntersections": false, + "ignoreUnions": false, + }, + ], + "meta": { + "docs": { + "description": "Disallow duplicate constituents of union or intersection types", + "recommended": "recommended", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-duplicate-type-constituents", + }, + "fixable": "code", + "messages": { + "duplicate": "{{type}} type constituent is duplicated with {{previous}}.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "ignoreIntersections": { + "type": "boolean", + }, + "ignoreUnions": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-dynamic-delete": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow using the \`delete\` operator on computed key expressions", + "recommended": "strict", + "url": "https://typescript-eslint.io/rules/no-dynamic-delete", + }, + "fixable": "code", + "messages": { + "dynamicDelete": "Do not delete dynamically computed property keys.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "no-empty-function": { + "create": [Function], + "defaultOptions": [ + { + "allow": [], + }, + ], + "meta": { + "docs": { + "description": "Disallow empty functions", + "extendsBaseRule": true, + "recommended": "stylistic", + "url": "https://typescript-eslint.io/rules/no-empty-function", + }, + "hasSuggestions": undefined, + "messages": { + "unexpected": "Unexpected empty {{name}}.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allow": { + "items": { + "enum": [ + "functions", + "arrowFunctions", + "generatorFunctions", + "methods", + "generatorMethods", + "getters", + "setters", + "constructors", + "private-constructors", + "protected-constructors", + "asyncFunctions", + "asyncMethods", + "decoratedFunctions", + "overrideMethods", + ], + "type": "string", + }, + "type": "array", + "uniqueItems": true, + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-empty-interface": { + "create": [Function], + "defaultOptions": [ + { + "allowSingleExtends": false, + }, + ], + "meta": { + "docs": { + "description": "Disallow the declaration of empty interfaces", + "recommended": "stylistic", + "url": "https://typescript-eslint.io/rules/no-empty-interface", + }, + "fixable": "code", + "hasSuggestions": true, + "messages": { + "noEmpty": "An empty interface is equivalent to \`{}\`.", + "noEmptyWithSuper": "An interface declaring no members is equivalent to its supertype.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowSingleExtends": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-explicit-any": { + "create": [Function], + "defaultOptions": [ + { + "fixToUnknown": false, + "ignoreRestArgs": false, + }, + ], + "meta": { + "docs": { + "description": "Disallow the \`any\` type", + "recommended": "recommended", + "url": "https://typescript-eslint.io/rules/no-explicit-any", + }, + "fixable": "code", + "hasSuggestions": true, + "messages": { + "suggestNever": "Use \`never\` instead, this is useful when instantiating generic type parameters that you don't need to know the type of.", + "suggestUnknown": "Use \`unknown\` instead, this will force you to explicitly, and safely assert the type is correct.", + "unexpectedAny": "Unexpected any. Specify a different type.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "fixToUnknown": { + "description": "Whether to enable auto-fixing in which the \`any\` type is converted to the \`unknown\` type.", + "type": "boolean", + }, + "ignoreRestArgs": { + "description": "Whether to ignore rest parameter arrays.", + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-extra-non-null-assertion": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow extra non-null assertions", + "recommended": "recommended", + "url": "https://typescript-eslint.io/rules/no-extra-non-null-assertion", + }, + "fixable": "code", + "messages": { + "noExtraNonNullAssertion": "Forbidden extra non-null assertion.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-extra-parens": { + "create": [Function], + "defaultOptions": [ + "all", + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Disallow unnecessary parentheses", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/no-extra-parens", + }, + "fixable": "code", + "hasSuggestions": undefined, + "messages": { + "unexpected": "Unnecessary parentheses around expression.", + }, + "replacedBy": [ + "@stylistic/ts/no-extra-parens", + ], + "schema": { + "anyOf": [ + { + "items": [ + { + "enum": [ + "functions", + ], + }, + ], + "maxItems": 1, + "minItems": 0, + "type": "array", + }, + { + "items": [ + { + "enum": [ + "all", + ], + }, + { + "additionalProperties": false, + "properties": { + "allowParensAfterCommentPattern": { + "type": "string", + }, + "conditionalAssign": { + "type": "boolean", + }, + "enforceForArrowConditionals": { + "type": "boolean", + }, + "enforceForFunctionPrototypeMethods": { + "type": "boolean", + }, + "enforceForNewInMemberExpressions": { + "type": "boolean", + }, + "enforceForSequenceExpressions": { + "type": "boolean", + }, + "ignoreJSX": { + "enum": [ + "none", + "all", + "single-line", + "multi-line", + ], + }, + "nestedBinaryExpressions": { + "type": "boolean", + }, + "returnAssign": { + "type": "boolean", + }, + "ternaryOperandBinaryExpressions": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "maxItems": 2, + "minItems": 0, + "type": "array", + }, + ], + }, + "type": "layout", + }, + }, + "no-extra-semi": { + "create": [Function], + "defaultOptions": [], + "meta": { + "deprecated": true, + "docs": { + "description": "Disallow unnecessary semicolons", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/no-extra-semi", + }, + "fixable": "code", + "hasSuggestions": undefined, + "messages": { + "unexpected": "Unnecessary semicolon.", + }, + "replacedBy": [ + "@stylistic/ts/no-extra-semi", + ], + "schema": [], + "type": "suggestion", + }, + }, + "no-extraneous-class": { + "create": [Function], + "defaultOptions": [ + { + "allowConstructorOnly": false, + "allowEmpty": false, + "allowStaticOnly": false, + "allowWithDecorator": false, + }, + ], + "meta": { + "docs": { + "description": "Disallow classes used as namespaces", + "recommended": "strict", + "url": "https://typescript-eslint.io/rules/no-extraneous-class", + }, + "messages": { + "empty": "Unexpected empty class.", + "onlyConstructor": "Unexpected class with only a constructor.", + "onlyStatic": "Unexpected class with only static properties.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowConstructorOnly": { + "description": "Whether to allow extraneous classes that contain only a constructor.", + "type": "boolean", + }, + "allowEmpty": { + "description": "Whether to allow extraneous classes that have no body (i.e. are empty).", + "type": "boolean", + }, + "allowStaticOnly": { + "description": "Whether to allow extraneous classes that only contain static members.", + "type": "boolean", + }, + "allowWithDecorator": { + "description": "Whether to allow extraneous classes that include a decorator.", + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-floating-promises": { + "create": [Function], + "defaultOptions": [ + { + "ignoreIIFE": false, + "ignoreVoid": true, + }, + ], + "meta": { + "docs": { + "description": "Require Promise-like statements to be handled appropriately", + "recommended": "recommended", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-floating-promises", + }, + "hasSuggestions": true, + "messages": { + "floating": "Promises must be awaited, end with a call to .catch, or end with a call to .then with a rejection handler.", + "floatingFixAwait": "Add await operator.", + "floatingFixVoid": "Add void operator to ignore.", + "floatingPromiseArray": "An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar.", + "floatingPromiseArrayVoid": "An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar, or explicitly marking the expression as ignored with the \`void\` operator.", + "floatingUselessRejectionHandler": "Promises must be awaited, end with a call to .catch, or end with a call to .then with a rejection handler. A rejection handler that is not a function will be ignored.", + "floatingUselessRejectionHandlerVoid": "Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the \`void\` operator. A rejection handler that is not a function will be ignored.", + "floatingVoid": "Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the \`void\` operator.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "ignoreIIFE": { + "description": "Whether to ignore async IIFEs (Immediately Invoked Function Expressions).", + "type": "boolean", + }, + "ignoreVoid": { + "description": "Whether to ignore \`void\` expressions.", + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "problem", + }, + }, + "no-for-in-array": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow iterating over an array with a for-in loop", + "recommended": "recommended", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-for-in-array", + }, + "messages": { + "forInViolation": "For-in loops over arrays skips holes, returns indices as strings, and may visit the prototype chain or other enumerable properties. Use a more robust iteration method such as for-of or array.forEach instead.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-implied-eval": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow the use of \`eval()\`-like methods", + "extendsBaseRule": true, + "recommended": "recommended", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-implied-eval", + }, + "messages": { + "noFunctionConstructor": "Implied eval. Do not use the Function constructor to create functions.", + "noImpliedEvalError": "Implied eval. Consider passing a function.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "no-import-type-side-effects": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers", + "url": "https://typescript-eslint.io/rules/no-import-type-side-effects", + }, + "fixable": "code", + "messages": { + "useTopLevelQualifier": "TypeScript will only remove the inline type specifiers which will leave behind a side effect import at runtime. Convert this to a top-level type qualifier to properly remove the entire import.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-inferrable-types": { + "create": [Function], + "defaultOptions": [ + { + "ignoreParameters": false, + "ignoreProperties": false, + }, + ], + "meta": { + "docs": { + "description": "Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean", + "recommended": "stylistic", + "url": "https://typescript-eslint.io/rules/no-inferrable-types", + }, + "fixable": "code", + "messages": { + "noInferrableType": "Type {{type}} trivially inferred from a {{type}} literal, remove type annotation.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "ignoreParameters": { + "type": "boolean", + }, + "ignoreProperties": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-invalid-this": { + "create": [Function], + "defaultOptions": [ + { + "capIsConstructor": true, + }, + ], + "meta": { + "docs": { + "description": "Disallow \`this\` keywords outside of classes or class-like objects", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/no-invalid-this", + }, + "hasSuggestions": undefined, + "messages": { + "unexpectedThis": "Unexpected 'this'.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "capIsConstructor": { + "default": true, + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-invalid-void-type": { + "create": [Function], + "defaultOptions": [ + { + "allowAsThisParameter": false, + "allowInGenericTypeArguments": true, + }, + ], + "meta": { + "docs": { + "description": "Disallow \`void\` type outside of generic or return types", + "recommended": "strict", + "url": "https://typescript-eslint.io/rules/no-invalid-void-type", + }, + "messages": { + "invalidVoidForGeneric": "{{ generic }} may not have void as a type argument.", + "invalidVoidNotReturn": "void is only valid as a return type.", + "invalidVoidNotReturnOrGeneric": "void is only valid as a return type or generic type argument.", + "invalidVoidNotReturnOrThisParam": "void is only valid as return type or type of \`this\` parameter.", + "invalidVoidNotReturnOrThisParamOrGeneric": "void is only valid as a return type or generic type argument or the type of a \`this\` parameter.", + "invalidVoidUnionConstituent": "void is not valid as a constituent in a union type", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowAsThisParameter": { + "type": "boolean", + }, + "allowInGenericTypeArguments": { + "oneOf": [ + { + "type": "boolean", + }, + { + "items": { + "type": "string", + }, + "minItems": 1, + "type": "array", + }, + ], + }, + }, + "type": "object", + }, + ], + "type": "problem", + }, + }, + "no-loop-func": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow function declarations that contain unsafe references inside loop statements", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/no-loop-func", + }, + "hasSuggestions": undefined, + "messages": { + "unsafeRefs": "Function declared in a loop contains unsafe references to variable(s) {{ varNames }}.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "no-loss-of-precision": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow literal numbers that lose precision", + "extendsBaseRule": true, + "recommended": "recommended", + "url": "https://typescript-eslint.io/rules/no-loss-of-precision", + }, + "hasSuggestions": undefined, + "messages": { + "noLossOfPrecision": "This number literal will lose precision at runtime.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-magic-numbers": { + "create": [Function], + "defaultOptions": [ + { + "detectObjects": false, + "enforceConst": false, + "ignore": [], + "ignoreArrayIndexes": false, + "ignoreEnums": false, + "ignoreNumericLiteralTypes": false, + "ignoreReadonlyClassProperties": false, + }, + ], + "meta": { + "docs": { + "description": "Disallow magic numbers", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/no-magic-numbers", + }, + "messages": { + "noMagic": "No magic number: {{raw}}.", + "useConst": "Number constants declarations must use 'const'.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "detectObjects": { + "default": false, + "type": "boolean", + }, + "enforceConst": { + "default": false, + "type": "boolean", + }, + "ignore": { + "items": { + "anyOf": [ + { + "type": "number", + }, + { + "pattern": "^[+-]?(?:0|[1-9][0-9]*)n$", + "type": "string", + }, + ], + }, + "type": "array", + "uniqueItems": true, + }, + "ignoreArrayIndexes": { + "default": false, + "type": "boolean", + }, + "ignoreClassFieldInitialValues": { + "default": false, + "type": "boolean", + }, + "ignoreDefaultValues": { + "default": false, + "type": "boolean", + }, + "ignoreEnums": { + "type": "boolean", + }, + "ignoreNumericLiteralTypes": { + "type": "boolean", + }, + "ignoreReadonlyClassProperties": { + "type": "boolean", + }, + "ignoreTypeIndexes": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-meaningless-void-operator": { + "create": [Function], + "defaultOptions": [ + { + "checkNever": false, + }, + ], + "meta": { + "docs": { + "description": "Disallow the \`void\` operator except when used to discard a value", + "recommended": "strict", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-meaningless-void-operator", + }, + "fixable": "code", + "hasSuggestions": true, + "messages": { + "meaninglessVoidOperator": "void operator shouldn't be used on {{type}}; it should convey that a return value is being ignored", + "removeVoid": "Remove 'void'", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "checkNever": { + "default": false, + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-misused-new": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Enforce valid definition of \`new\` and \`constructor\`", + "recommended": "recommended", + "url": "https://typescript-eslint.io/rules/no-misused-new", + }, + "messages": { + "errorMessageClass": "Class cannot have method named \`new\`.", + "errorMessageInterface": "Interfaces cannot be constructed, only classes.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-misused-promises": { + "create": [Function], + "defaultOptions": [ + { + "checksConditionals": true, + "checksSpreads": true, + "checksVoidReturn": true, + }, + ], + "meta": { + "docs": { + "description": "Disallow Promises in places not designed to handle them", + "recommended": "recommended", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-misused-promises", + }, + "messages": { + "conditional": "Expected non-Promise value in a boolean conditional.", + "spread": "Expected a non-Promise value to be spreaded in an object.", + "voidReturnArgument": "Promise returned in function argument where a void return was expected.", + "voidReturnAttribute": "Promise-returning function provided to attribute where a void return was expected.", + "voidReturnProperty": "Promise-returning function provided to property where a void return was expected.", + "voidReturnReturnValue": "Promise-returning function provided to return value where a void return was expected.", + "voidReturnVariable": "Promise-returning function provided to variable where a void return was expected.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "checksConditionals": { + "type": "boolean", + }, + "checksSpreads": { + "type": "boolean", + }, + "checksVoidReturn": { + "oneOf": [ + { + "type": "boolean", + }, + { + "additionalProperties": false, + "properties": { + "arguments": { + "type": "boolean", + }, + "attributes": { + "type": "boolean", + }, + "properties": { + "type": "boolean", + }, + "returns": { + "type": "boolean", + }, + "variables": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + }, + }, + "type": "object", + }, + ], + "type": "problem", + }, + }, + "no-mixed-enums": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow enums from having both number and string members", + "recommended": "strict", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-mixed-enums", + }, + "messages": { + "mixed": "Mixing number and string enums can be confusing.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-namespace": { + "create": [Function], + "defaultOptions": [ + { + "allowDeclarations": false, + "allowDefinitionFiles": true, + }, + ], + "meta": { + "docs": { + "description": "Disallow TypeScript namespaces", + "recommended": "recommended", + "url": "https://typescript-eslint.io/rules/no-namespace", + }, + "messages": { + "moduleSyntaxIsPreferred": "ES2015 module syntax is preferred over namespaces.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowDeclarations": { + "description": "Whether to allow \`declare\` with custom TypeScript namespaces.", + "type": "boolean", + }, + "allowDefinitionFiles": { + "description": "Whether to allow \`declare\` with custom TypeScript namespaces inside definition files.", + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-non-null-asserted-nullish-coalescing": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow non-null assertions in the left operand of a nullish coalescing operator", + "recommended": "strict", + "url": "https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing", + }, + "hasSuggestions": true, + "messages": { + "noNonNullAssertedNullishCoalescing": "The nullish coalescing operator is designed to handle undefined and null - using a non-null assertion is not needed.", + "suggestRemovingNonNull": "Remove the non-null assertion.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-non-null-asserted-optional-chain": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow non-null assertions after an optional chain expression", + "recommended": "recommended", + "url": "https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain", + }, + "hasSuggestions": true, + "messages": { + "noNonNullOptionalChain": "Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong.", + "suggestRemovingNonNull": "You should remove the non-null assertion.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-non-null-assertion": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow non-null assertions using the \`!\` postfix operator", + "recommended": "strict", + "url": "https://typescript-eslint.io/rules/no-non-null-assertion", + }, + "hasSuggestions": true, + "messages": { + "noNonNull": "Forbidden non-null assertion.", + "suggestOptionalChain": "Consider using the optional chain operator \`?.\` instead. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-redeclare": { + "create": [Function], + "defaultOptions": [ + { + "builtinGlobals": true, + "ignoreDeclarationMerge": true, + }, + ], + "meta": { + "docs": { + "description": "Disallow variable redeclaration", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/no-redeclare", + }, + "messages": { + "redeclared": "'{{id}}' is already defined.", + "redeclaredAsBuiltin": "'{{id}}' is already defined as a built-in global variable.", + "redeclaredBySyntax": "'{{id}}' is already defined by a variable declaration.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "builtinGlobals": { + "type": "boolean", + }, + "ignoreDeclarationMerge": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-redundant-type-constituents": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow members of unions and intersections that do nothing or override type information", + "recommended": "recommended", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-redundant-type-constituents", + }, + "messages": { + "literalOverridden": "{{literal}} is overridden by {{primitive}} in this union type.", + "overridden": "'{{typeName}}' is overridden by other types in this {{container}} type.", + "overrides": "'{{typeName}}' overrides all other types in this {{container}} type.", + "primitiveOverridden": "{{primitive}} is overridden by the {{literal}} in this intersection type.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "no-require-imports": { + "create": [Function], + "defaultOptions": [ + { + "allow": [], + }, + ], + "meta": { + "docs": { + "description": "Disallow invocation of \`require()\`", + "url": "https://typescript-eslint.io/rules/no-require-imports", + }, + "messages": { + "noRequireImports": "A \`require()\` style import is forbidden.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allow": { + "description": "Patterns of import paths to allow requiring from.", + "items": { + "type": "string", + }, + "type": "array", + }, + }, + "type": "object", + }, + ], + "type": "problem", + }, + }, + "no-restricted-imports": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow specified modules when loaded by \`import\`", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/no-restricted-imports", + }, + "fixable": undefined, + "messages": { + "allowedImportName": "'{{importName}}' import from '{{importSource}}' is restricted because only '{{allowedImportNames}}' import(s) is/are allowed.", + "allowedImportNamePattern": "'{{importName}}' import from '{{importSource}}' is restricted because only imports that match the pattern '{{allowedImportNamePattern}}' are allowed from '{{importSource}}'.", + "allowedImportNamePatternWithCustomMessage": "'{{importName}}' import from '{{importSource}}' is restricted because only imports that match the pattern '{{allowedImportNamePattern}}' are allowed from '{{importSource}}'. {{customMessage}}", + "allowedImportNameWithCustomMessage": "'{{importName}}' import from '{{importSource}}' is restricted because only '{{allowedImportNames}}' import(s) is/are allowed. {{customMessage}}", + "everything": "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted.", + "everythingWithAllowImportNames": "* import is invalid because only '{{allowedImportNames}}' from '{{importSource}}' is/are allowed.", + "everythingWithAllowImportNamesAndCustomMessage": "* import is invalid because only '{{allowedImportNames}}' from '{{importSource}}' is/are allowed. {{customMessage}}", + "everythingWithAllowedImportNamePattern": "* import is invalid because only imports that match the pattern '{{allowedImportNamePattern}}' from '{{importSource}}' are allowed.", + "everythingWithAllowedImportNamePatternWithCustomMessage": "* import is invalid because only imports that match the pattern '{{allowedImportNamePattern}}' from '{{importSource}}' are allowed. {{customMessage}}", + "everythingWithCustomMessage": "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted. {{customMessage}}", + "importName": "'{{importName}}' import from '{{importSource}}' is restricted.", + "importNameWithCustomMessage": "'{{importName}}' import from '{{importSource}}' is restricted. {{customMessage}}", + "path": "'{{importSource}}' import is restricted from being used.", + "pathWithCustomMessage": "'{{importSource}}' import is restricted from being used. {{customMessage}}", + "patternAndEverything": "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern.", + "patternAndEverythingWithCustomMessage": "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}", + "patternAndEverythingWithRegexImportName": "* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used.", + "patternAndEverythingWithRegexImportNameAndCustomMessage": "* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used. {{customMessage}}", + "patternAndImportName": "'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern.", + "patternAndImportNameWithCustomMessage": "'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}", + "patternWithCustomMessage": "'{{importSource}}' import is restricted from being used by a pattern. {{customMessage}}", + "patterns": "'{{importSource}}' import is restricted from being used by a pattern.", + }, + "schema": { + "anyOf": [ + { + "items": { + "anyOf": [ + { + "type": "string", + }, + { + "additionalProperties": false, + "properties": { + "allowImportNames": { + "items": { + "type": "string", + }, + "type": "array", + }, + "allowTypeImports": { + "description": "Disallow value imports, but allow type-only imports.", + "type": "boolean", + }, + "importNames": { + "items": { + "type": "string", + }, + "type": "array", + }, + "message": { + "minLength": 1, + "type": "string", + }, + "name": { + "type": "string", + }, + }, + "required": [ + "name", + ], + "type": "object", + }, + ], + }, + "type": "array", + "uniqueItems": true, + }, + { + "additionalItems": false, + "items": [ + { + "additionalProperties": false, + "properties": { + "paths": { + "items": { + "anyOf": [ + { + "type": "string", + }, + { + "additionalProperties": false, + "properties": { + "allowImportNames": { + "items": { + "type": "string", + }, + "type": "array", + }, + "allowTypeImports": { + "description": "Disallow value imports, but allow type-only imports.", + "type": "boolean", + }, + "importNames": { + "items": { + "type": "string", + }, + "type": "array", + }, + "message": { + "minLength": 1, + "type": "string", + }, + "name": { + "type": "string", + }, + }, + "required": [ + "name", + ], + "type": "object", + }, + ], + }, + "type": "array", + "uniqueItems": true, + }, + "patterns": { + "anyOf": [ + { + "items": { + "type": "string", + }, + "type": "array", + "uniqueItems": true, + }, + { + "items": { + "additionalProperties": false, + "properties": { + "allowImportNamePattern": { + "type": "string", + }, + "allowImportNames": { + "items": { + "type": "string", + }, + "minItems": 1, + "type": "array", + "uniqueItems": true, + }, + "allowTypeImports": { + "description": "Disallow value imports, but allow type-only imports.", + "type": "boolean", + }, + "caseSensitive": { + "type": "boolean", + }, + "group": { + "items": { + "type": "string", + }, + "minItems": 1, + "type": "array", + "uniqueItems": true, + }, + "importNamePattern": { + "type": "string", + }, + "importNames": { + "items": { + "type": "string", + }, + "minItems": 1, + "type": "array", + "uniqueItems": true, + }, + "message": { + "minLength": 1, + "type": "string", + }, + }, + "required": [ + "group", + ], + "type": "object", + }, + "type": "array", + "uniqueItems": true, + }, + ], + }, + }, + "type": "object", + }, + ], + "type": "array", + }, + ], + }, + "type": "suggestion", + }, + }, + "no-shadow": { + "create": [Function], + "defaultOptions": [ + { + "allow": [], + "builtinGlobals": false, + "hoist": "functions", + "ignoreFunctionTypeParameterNameValueShadow": true, + "ignoreOnInitialization": false, + "ignoreTypeValueShadow": true, + }, + ], + "meta": { + "docs": { + "description": "Disallow variable declarations from shadowing variables declared in the outer scope", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/no-shadow", + }, + "messages": { + "noShadow": "'{{name}}' is already declared in the upper scope on line {{shadowedLine}} column {{shadowedColumn}}.", + "noShadowGlobal": "'{{name}}' is already a global variable.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allow": { + "items": { + "type": "string", + }, + "type": "array", + }, + "builtinGlobals": { + "type": "boolean", + }, + "hoist": { + "enum": [ + "all", + "functions", + "never", + ], + "type": "string", + }, + "ignoreFunctionTypeParameterNameValueShadow": { + "type": "boolean", + }, + "ignoreOnInitialization": { + "type": "boolean", + }, + "ignoreTypeValueShadow": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-this-alias": { + "create": [Function], + "defaultOptions": [ + { + "allowDestructuring": true, + "allowedNames": [], + }, + ], + "meta": { + "docs": { + "description": "Disallow aliasing \`this\`", + "recommended": "recommended", + "url": "https://typescript-eslint.io/rules/no-this-alias", + }, + "messages": { + "thisAssignment": "Unexpected aliasing of 'this' to local variable.", + "thisDestructure": "Unexpected aliasing of members of 'this' to local variables.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowDestructuring": { + "description": "Whether to ignore destructurings, such as \`const { props, state } = this\`.", + "type": "boolean", + }, + "allowedNames": { + "description": "Names to ignore, such as ["self"] for \`const self = this;\`.", + "items": { + "type": "string", + }, + "type": "array", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-throw-literal": { + "create": [Function], + "defaultOptions": [ + { + "allowThrowingAny": true, + "allowThrowingUnknown": true, + }, + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Disallow throwing literals as exceptions", + "extendsBaseRule": true, + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-throw-literal", + }, + "messages": { + "object": "Expected an error object to be thrown.", + "undef": "Do not throw undefined.", + }, + "replacedBy": [ + "@typescript-eslint/only-throw-error", + ], + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowThrowingAny": { + "type": "boolean", + }, + "allowThrowingUnknown": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "problem", + }, + }, + "no-type-alias": { + "create": [Function], + "defaultOptions": [ + { + "allowAliases": "never", + "allowCallbacks": "never", + "allowConditionalTypes": "never", + "allowConstructors": "never", + "allowGenerics": "never", + "allowLiterals": "never", + "allowMappedTypes": "never", + "allowTupleTypes": "never", + }, + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Disallow type aliases", + "url": "https://typescript-eslint.io/rules/no-type-alias", + }, + "messages": { + "noCompositionAlias": "{{typeName}} in {{compositionType}} types are not allowed.", + "noTypeAlias": "Type {{alias}} are not allowed.", + }, + "schema": [ + { + "$defs": { + "expandedOptions": { + "enum": [ + "always", + "never", + "in-unions", + "in-intersections", + "in-unions-and-intersections", + ], + "type": "string", + }, + "simpleOptions": { + "enum": [ + "always", + "never", + ], + "type": "string", + }, + }, + "additionalProperties": false, + "properties": { + "allowAliases": { + "$ref": "#/items/0/$defs/expandedOptions", + "description": "Whether to allow direct one-to-one type aliases.", + }, + "allowCallbacks": { + "$ref": "#/items/0/$defs/simpleOptions", + "description": "Whether to allow type aliases for callbacks.", + }, + "allowConditionalTypes": { + "$ref": "#/items/0/$defs/simpleOptions", + "description": "Whether to allow type aliases for conditional types.", + }, + "allowConstructors": { + "$ref": "#/items/0/$defs/simpleOptions", + "description": "Whether to allow type aliases with constructors.", + }, + "allowGenerics": { + "$ref": "#/items/0/$defs/simpleOptions", + "description": "Whether to allow type aliases with generic types.", + }, + "allowLiterals": { + "$ref": "#/items/0/$defs/expandedOptions", + "description": "Whether to allow type aliases with object literal types.", + }, + "allowMappedTypes": { + "$ref": "#/items/0/$defs/expandedOptions", + "description": "Whether to allow type aliases with mapped types.", + }, + "allowTupleTypes": { + "$ref": "#/items/0/$defs/expandedOptions", + "description": "Whether to allow type aliases with tuple types.", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-unnecessary-boolean-literal-compare": { + "create": [Function], + "defaultOptions": [ + { + "allowComparingNullableBooleansToFalse": true, + "allowComparingNullableBooleansToTrue": true, + }, + ], + "meta": { + "docs": { + "description": "Disallow unnecessary equality comparisons against boolean literals", + "recommended": "strict", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare", + }, + "fixable": "code", + "messages": { + "comparingNullableToFalse": "This expression unnecessarily compares a nullable boolean value to false instead of using the ?? operator to provide a default.", + "comparingNullableToTrueDirect": "This expression unnecessarily compares a nullable boolean value to true instead of using it directly.", + "comparingNullableToTrueNegated": "This expression unnecessarily compares a nullable boolean value to true instead of negating it.", + "direct": "This expression unnecessarily compares a boolean value to a boolean instead of using it directly.", + "negated": "This expression unnecessarily compares a boolean value to a boolean instead of negating it.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowComparingNullableBooleansToFalse": { + "description": "Whether to allow comparisons between nullable boolean variables and \`false\`.", + "type": "boolean", + }, + "allowComparingNullableBooleansToTrue": { + "description": "Whether to allow comparisons between nullable boolean variables and \`true\`.", + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-unnecessary-condition": { + "create": [Function], + "defaultOptions": [ + { + "allowConstantLoopConditions": false, + "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": false, + }, + ], + "meta": { + "docs": { + "description": "Disallow conditionals where the type is always truthy or always falsy", + "recommended": "strict", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-unnecessary-condition", + }, + "fixable": "code", + "messages": { + "alwaysFalsy": "Unnecessary conditional, value is always falsy.", + "alwaysFalsyFunc": "This callback should return a conditional, but return is always falsy.", + "alwaysNullish": "Unnecessary conditional, left-hand side of \`??\` operator is always \`null\` or \`undefined\`.", + "alwaysTruthy": "Unnecessary conditional, value is always truthy.", + "alwaysTruthyFunc": "This callback should return a conditional, but return is always truthy.", + "literalBooleanExpression": "Unnecessary conditional, both sides of the expression are literal values.", + "never": "Unnecessary conditional, value is \`never\`.", + "neverNullish": "Unnecessary conditional, expected left-hand side of \`??\` operator to be possibly null or undefined.", + "neverOptionalChain": "Unnecessary optional chain on a non-nullish value.", + "noOverlapBooleanExpression": "Unnecessary conditional, the types have no overlap.", + "noStrictNullCheck": "This rule requires the \`strictNullChecks\` compiler option to be turned on to function correctly.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowConstantLoopConditions": { + "description": "Whether to ignore constant loop conditions, such as \`while (true)\`.", + "type": "boolean", + }, + "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": { + "description": "Whether to not error when running with a tsconfig that has strictNullChecks turned.", + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-unnecessary-qualifier": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow unnecessary namespace qualifiers", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-unnecessary-qualifier", + }, + "fixable": "code", + "messages": { + "unnecessaryQualifier": "Qualifier is unnecessary since '{{ name }}' is in scope.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "no-unnecessary-type-arguments": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow type arguments that are equal to the default", + "recommended": "strict", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-unnecessary-type-arguments", + }, + "fixable": "code", + "messages": { + "unnecessaryTypeParameter": "This is the default value for this type parameter, so it can be omitted.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "no-unnecessary-type-assertion": { + "create": [Function], + "defaultOptions": [ + {}, + ], + "meta": { + "docs": { + "description": "Disallow type assertions that do not change the type of an expression", + "recommended": "recommended", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-unnecessary-type-assertion", + }, + "fixable": "code", + "messages": { + "contextuallyUnnecessary": "This assertion is unnecessary since the receiver accepts the original type of the expression.", + "unnecessaryAssertion": "This assertion is unnecessary since it does not change the type of the expression.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "typesToIgnore": { + "description": "A list of type names to ignore.", + "items": { + "type": "string", + }, + "type": "array", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-unnecessary-type-constraint": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow unnecessary constraints on generic types", + "recommended": "recommended", + "url": "https://typescript-eslint.io/rules/no-unnecessary-type-constraint", + }, + "hasSuggestions": true, + "messages": { + "removeUnnecessaryConstraint": "Remove the unnecessary \`{{constraint}}\` constraint.", + "unnecessaryConstraint": "Constraining the generic type \`{{name}}\` to \`{{constraint}}\` does nothing and is unnecessary.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "no-unsafe-argument": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow calling a function with a value with type \`any\`", + "recommended": "recommended", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-unsafe-argument", + }, + "messages": { + "unsafeArgument": "Unsafe argument of type \`{{sender}}\` assigned to a parameter of type \`{{receiver}}\`.", + "unsafeArraySpread": "Unsafe spread of an \`any\` array type.", + "unsafeSpread": "Unsafe spread of an \`any\` type.", + "unsafeTupleSpread": "Unsafe spread of a tuple type. The argument is of type \`{{sender}}\` and is assigned to a parameter of type \`{{receiver}}\`.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-unsafe-assignment": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow assigning a value with type \`any\` to variables and properties", + "recommended": "recommended", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-unsafe-assignment", + }, + "messages": { + "anyAssignment": "Unsafe assignment of an \`any\` value.", + "anyAssignmentThis": "Unsafe assignment of an \`any\` value. \`this\` is typed as \`any\`. +You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.", + "unsafeArrayPattern": "Unsafe array destructuring of an \`any\` array value.", + "unsafeArrayPatternFromTuple": "Unsafe array destructuring of a tuple element with an \`any\` value.", + "unsafeArraySpread": "Unsafe spread of an \`any\` value in an array.", + "unsafeAssignment": "Unsafe assignment of type {{sender}} to a variable of type {{receiver}}.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-unsafe-call": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow calling a value with type \`any\`", + "recommended": "recommended", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-unsafe-call", + }, + "messages": { + "unsafeCall": "Unsafe call of an \`any\` typed value.", + "unsafeCallThis": "Unsafe call of an \`any\` typed value. \`this\` is typed as \`any\`. +You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.", + "unsafeNew": "Unsafe construction of an any type value.", + "unsafeTemplateTag": "Unsafe any typed template tag.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-unsafe-declaration-merging": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow unsafe declaration merging", + "recommended": "recommended", + "requiresTypeChecking": false, + "url": "https://typescript-eslint.io/rules/no-unsafe-declaration-merging", + }, + "messages": { + "unsafeMerging": "Unsafe declaration merging between classes and interfaces.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-unsafe-enum-comparison": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow comparing an enum value with a non-enum value", + "recommended": "recommended", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-unsafe-enum-comparison", + }, + "hasSuggestions": true, + "messages": { + "mismatchedCase": "The case statement does not have a shared enum type with the switch predicate.", + "mismatchedCondition": "The two values in this comparison do not have a shared enum type.", + "replaceValueWithEnum": "Replace with an enum value comparison.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "no-unsafe-member-access": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow member access on a value with type \`any\`", + "recommended": "recommended", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-unsafe-member-access", + }, + "messages": { + "unsafeComputedMemberAccess": "Computed name {{property}} resolves to an any value.", + "unsafeMemberExpression": "Unsafe member access {{property}} on an \`any\` value.", + "unsafeThisMemberExpression": "Unsafe member access {{property}} on an \`any\` value. \`this\` is typed as \`any\`. +You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-unsafe-return": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow returning a value with type \`any\` from a function", + "recommended": "recommended", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-unsafe-return", + }, + "messages": { + "unsafeReturn": "Unsafe return of an \`{{type}}\` typed value.", + "unsafeReturnAssignment": "Unsafe return of type \`{{sender}}\` from function with return type \`{{receiver}}\`.", + "unsafeReturnThis": "Unsafe return of an \`{{type}}\` typed value. \`this\` is typed as \`any\`. +You can try to fix this by turning on the \`noImplicitThis\` compiler option, or adding a \`this\` parameter to the function.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-unsafe-unary-minus": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Require unary negation to take a number", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-unsafe-unary-minus", + }, + "messages": { + "unaryMinus": "Argument of unary negation should be assignable to number | bigint but is {{type}} instead.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-unused-expressions": { + "create": [Function], + "defaultOptions": [ + { + "allowShortCircuit": false, + "allowTaggedTemplates": false, + "allowTernary": false, + }, + ], + "meta": { + "docs": { + "description": "Disallow unused expressions", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/no-unused-expressions", + }, + "hasSuggestions": undefined, + "messages": { + "unusedExpression": "Expected an assignment or function call and instead saw an expression.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowShortCircuit": { + "default": false, + "type": "boolean", + }, + "allowTaggedTemplates": { + "default": false, + "type": "boolean", + }, + "allowTernary": { + "default": false, + "type": "boolean", + }, + "enforceForJSX": { + "default": false, + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-unused-vars": { + "create": [Function], + "defaultOptions": [ + {}, + ], + "meta": { + "docs": { + "description": "Disallow unused variables", + "extendsBaseRule": true, + "recommended": "recommended", + "url": "https://typescript-eslint.io/rules/no-unused-vars", + }, + "messages": { + "unusedVar": "'{{varName}}' is {{action}} but never used{{additional}}.", + }, + "schema": [ + { + "oneOf": [ + { + "enum": [ + "all", + "local", + ], + "type": "string", + }, + { + "additionalProperties": false, + "properties": { + "args": { + "enum": [ + "all", + "after-used", + "none", + ], + "type": "string", + }, + "argsIgnorePattern": { + "type": "string", + }, + "caughtErrors": { + "enum": [ + "all", + "none", + ], + "type": "string", + }, + "caughtErrorsIgnorePattern": { + "type": "string", + }, + "destructuredArrayIgnorePattern": { + "type": "string", + }, + "ignoreRestSiblings": { + "type": "boolean", + }, + "vars": { + "enum": [ + "all", + "local", + ], + "type": "string", + }, + "varsIgnorePattern": { + "type": "string", + }, + }, + "type": "object", + }, + ], + }, + ], + "type": "problem", + }, + }, + "no-use-before-define": { + "create": [Function], + "defaultOptions": [ + { + "allowNamedExports": false, + "classes": true, + "enums": true, + "functions": true, + "ignoreTypeReferences": true, + "typedefs": true, + "variables": true, + }, + ], + "meta": { + "docs": { + "description": "Disallow the use of variables before they are defined", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/no-use-before-define", + }, + "messages": { + "noUseBeforeDefine": "'{{name}}' was used before it was defined.", + }, + "schema": [ + { + "oneOf": [ + { + "enum": [ + "nofunc", + ], + "type": "string", + }, + { + "additionalProperties": false, + "properties": { + "allowNamedExports": { + "type": "boolean", + }, + "classes": { + "type": "boolean", + }, + "enums": { + "type": "boolean", + }, + "functions": { + "type": "boolean", + }, + "ignoreTypeReferences": { + "type": "boolean", + }, + "typedefs": { + "type": "boolean", + }, + "variables": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + }, + ], + "type": "problem", + }, + }, + "no-useless-constructor": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow unnecessary constructors", + "extendsBaseRule": true, + "recommended": "strict", + "url": "https://typescript-eslint.io/rules/no-useless-constructor", + }, + "hasSuggestions": undefined, + "messages": { + "noUselessConstructor": "Useless constructor.", + }, + "schema": [], + "type": "problem", + }, + }, + "no-useless-empty-export": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow empty exports that don't change anything in a module file", + "url": "https://typescript-eslint.io/rules/no-useless-empty-export", + }, + "fixable": "code", + "hasSuggestions": false, + "messages": { + "uselessExport": "Empty export does nothing and can be removed.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "no-useless-template-literals": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow unnecessary template literals", + "recommended": "strict", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/no-useless-template-literals", + }, + "fixable": "code", + "messages": { + "noUselessTemplateLiteral": "Template literal expression is unnecessary and can be simplified.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "no-var-requires": { + "create": [Function], + "defaultOptions": [ + { + "allow": [], + }, + ], + "meta": { + "docs": { + "description": "Disallow \`require\` statements except in import statements", + "recommended": "recommended", + "url": "https://typescript-eslint.io/rules/no-var-requires", + }, + "messages": { + "noVarReqs": "Require statement not part of import statement.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allow": { + "description": "Patterns of import paths to allow requiring from.", + "items": { + "type": "string", + }, + "type": "array", + }, + }, + "type": "object", + }, + ], + "type": "problem", + }, + }, + "non-nullable-type-assertion-style": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Enforce non-null assertions over explicit type casts", + "recommended": "stylistic", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/non-nullable-type-assertion-style", + }, + "fixable": "code", + "messages": { + "preferNonNullAssertion": "Use a ! assertion to more succinctly remove null and undefined from the type.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "object-curly-spacing": { + "create": [Function], + "defaultOptions": [ + "never", + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Enforce consistent spacing inside braces", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/object-curly-spacing", + }, + "fixable": "whitespace", + "messages": { + "requireSpaceAfter": "A space is required after '{{token}}'.", + "requireSpaceBefore": "A space is required before '{{token}}'.", + "unexpectedSpaceAfter": "There should be no space after '{{token}}'.", + "unexpectedSpaceBefore": "There should be no space before '{{token}}'.", + }, + "replacedBy": [ + "@stylistic/ts/object-curly-spacing", + ], + "schema": [ + { + "enum": [ + "always", + "never", + ], + }, + { + "additionalProperties": false, + "properties": { + "arraysInObjects": { + "type": "boolean", + }, + "objectsInObjects": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "layout", + }, + }, + "only-throw-error": { + "create": [Function], + "defaultOptions": [ + { + "allowThrowingAny": true, + "allowThrowingUnknown": true, + }, + ], + "meta": { + "docs": { + "description": "Disallow throwing non-\`Error\` values as exceptions", + "extendsBaseRule": "no-throw-literal", + "recommended": "strict", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/only-throw-error", + }, + "messages": { + "object": "Expected an error object to be thrown.", + "undef": "Do not throw undefined.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowThrowingAny": { + "type": "boolean", + }, + "allowThrowingUnknown": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "problem", + }, + }, + "padding-line-between-statements": { + "create": [Function], + "defaultOptions": [], + "meta": { + "deprecated": true, + "docs": { + "description": "Require or disallow padding lines between statements", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/padding-line-between-statements", + }, + "fixable": "whitespace", + "hasSuggestions": false, + "messages": { + "expectedBlankLine": "Expected blank line before this statement.", + "unexpectedBlankLine": "Unexpected blank line before this statement.", + }, + "replacedBy": [ + "@stylistic/ts/padding-line-between-statements", + ], + "schema": { + "$defs": { + "paddingType": { + "enum": [ + "any", + "never", + "always", + ], + "type": "string", + }, + "statementType": { + "anyOf": [ + { + "enum": [ + "*", + "block-like", + "exports", + "require", + "directive", + "expression", + "iife", + "multiline-block-like", + "multiline-expression", + "multiline-const", + "multiline-let", + "multiline-var", + "singleline-const", + "singleline-let", + "singleline-var", + "block", + "empty", + "function", + "break", + "case", + "class", + "const", + "continue", + "debugger", + "default", + "do", + "export", + "for", + "if", + "import", + "let", + "return", + "switch", + "throw", + "try", + "var", + "while", + "with", + "interface", + "type", + ], + "type": "string", + }, + { + "additionalItems": false, + "items": { + "enum": [ + "*", + "block-like", + "exports", + "require", + "directive", + "expression", + "iife", + "multiline-block-like", + "multiline-expression", + "multiline-const", + "multiline-let", + "multiline-var", + "singleline-const", + "singleline-let", + "singleline-var", + "block", + "empty", + "function", + "break", + "case", + "class", + "const", + "continue", + "debugger", + "default", + "do", + "export", + "for", + "if", + "import", + "let", + "return", + "switch", + "throw", + "try", + "var", + "while", + "with", + "interface", + "type", + ], + "type": "string", + }, + "minItems": 1, + "type": "array", + "uniqueItems": true, + }, + ], + }, + }, + "additionalItems": false, + "items": { + "additionalProperties": false, + "properties": { + "blankLine": { + "$ref": "#/$defs/paddingType", + }, + "next": { + "$ref": "#/$defs/statementType", + }, + "prev": { + "$ref": "#/$defs/statementType", + }, + }, + "required": [ + "blankLine", + "prev", + "next", + ], + "type": "object", + }, + "type": "array", + }, + "type": "layout", + }, + }, + "parameter-properties": { + "create": [Function], + "defaultOptions": [ + { + "allow": [], + "prefer": "class-property", + }, + ], + "meta": { + "docs": { + "description": "Require or disallow parameter properties in class constructors", + "url": "https://typescript-eslint.io/rules/parameter-properties", + }, + "messages": { + "preferClassProperty": "Property {{parameter}} should be declared as a class property.", + "preferParameterProperty": "Property {{parameter}} should be declared as a parameter property.", + }, + "schema": [ + { + "$defs": { + "modifier": { + "enum": [ + "readonly", + "private", + "protected", + "public", + "private readonly", + "protected readonly", + "public readonly", + ], + "type": "string", + }, + }, + "additionalProperties": false, + "properties": { + "allow": { + "items": { + "$ref": "#/items/0/$defs/modifier", + }, + "type": "array", + }, + "prefer": { + "enum": [ + "class-property", + "parameter-property", + ], + "type": "string", + }, + }, + "type": "object", + }, + ], + "type": "problem", + }, + }, + "prefer-as-const": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Enforce the use of \`as const\` over literal type", + "recommended": "recommended", + "url": "https://typescript-eslint.io/rules/prefer-as-const", + }, + "fixable": "code", + "hasSuggestions": true, + "messages": { + "preferConstAssertion": "Expected a \`const\` instead of a literal type assertion.", + "variableConstAssertion": "Expected a \`const\` assertion instead of a literal type annotation.", + "variableSuggest": "You should use \`as const\` instead of type annotation.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "prefer-destructuring": { + "create": [Function], + "defaultOptions": [ + { + "AssignmentExpression": { + "array": true, + "object": true, + }, + "VariableDeclarator": { + "array": true, + "object": true, + }, + }, + {}, + ], + "meta": { + "docs": { + "description": "Require destructuring from arrays and/or objects", + "extendsBaseRule": true, + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/prefer-destructuring", + }, + "fixable": "code", + "hasSuggestions": undefined, + "messages": { + "preferDestructuring": "Use {{type}} destructuring.", + }, + "schema": [ + { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "AssignmentExpression": { + "additionalProperties": false, + "properties": { + "array": { + "type": "boolean", + }, + "object": { + "type": "boolean", + }, + }, + "type": "object", + }, + "VariableDeclarator": { + "additionalProperties": false, + "properties": { + "array": { + "type": "boolean", + }, + "object": { + "type": "boolean", + }, + }, + "type": "object", + }, + }, + "type": "object", + }, + { + "additionalProperties": false, + "properties": { + "array": { + "type": "boolean", + }, + "object": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + }, + { + "properties": { + "enforceForDeclarationWithTypeAnnotation": { + "type": "boolean", + }, + "enforceForRenamedProperties": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "prefer-enum-initializers": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Require each enum member value to be explicitly initialized", + "url": "https://typescript-eslint.io/rules/prefer-enum-initializers", + }, + "hasSuggestions": true, + "messages": { + "defineInitializer": "The value of the member '{{ name }}' should be explicitly defined.", + "defineInitializerSuggestion": "Can be fixed to {{ name }} = {{ suggested }}", + }, + "schema": [], + "type": "suggestion", + }, + }, + "prefer-find": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/prefer-find", + }, + "hasSuggestions": true, + "messages": { + "preferFind": "Prefer .find(...) instead of .filter(...)[0].", + "preferFindSuggestion": "Use .find(...) instead of .filter(...)[0].", + }, + "schema": [], + "type": "suggestion", + }, + }, + "prefer-for-of": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Enforce the use of \`for-of\` loop over the standard \`for\` loop where possible", + "recommended": "stylistic", + "url": "https://typescript-eslint.io/rules/prefer-for-of", + }, + "messages": { + "preferForOf": "Expected a \`for-of\` loop instead of a \`for\` loop with this simple iteration.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "prefer-function-type": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Enforce using function types instead of interfaces with call signatures", + "recommended": "stylistic", + "url": "https://typescript-eslint.io/rules/prefer-function-type", + }, + "fixable": "code", + "messages": { + "functionTypeOverCallableType": "{{ literalOrInterface }} only has a call signature, you should use a function type instead.", + "unexpectedThisOnFunctionOnlyInterface": "\`this\` refers to the function type '{{ interfaceName }}', did you intend to use a generic \`this\` parameter like \`(this: Self, ...) => Self\` instead?", + }, + "schema": [], + "type": "suggestion", + }, + }, + "prefer-includes": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Enforce \`includes\` method over \`indexOf\` method", + "recommended": "strict", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/prefer-includes", + }, + "fixable": "code", + "messages": { + "preferIncludes": "Use 'includes()' method instead.", + "preferStringIncludes": "Use \`String#includes()\` method with a string instead.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "prefer-literal-enum-member": { + "create": [Function], + "defaultOptions": [ + { + "allowBitwiseExpressions": false, + }, + ], + "meta": { + "docs": { + "description": "Require all enum members to be literal values", + "recommended": "strict", + "requiresTypeChecking": false, + "url": "https://typescript-eslint.io/rules/prefer-literal-enum-member", + }, + "messages": { + "notLiteral": "Explicit enum value must only be a literal value (string, number, boolean, etc).", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowBitwiseExpressions": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "prefer-namespace-keyword": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Require using \`namespace\` keyword over \`module\` keyword to declare custom TypeScript modules", + "recommended": "stylistic", + "url": "https://typescript-eslint.io/rules/prefer-namespace-keyword", + }, + "fixable": "code", + "messages": { + "useNamespace": "Use 'namespace' instead of 'module' to declare custom TypeScript modules.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "prefer-nullish-coalescing": { + "create": [Function], + "defaultOptions": [ + { + "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": false, + "ignoreConditionalTests": false, + "ignoreMixedLogicalExpressions": false, + "ignorePrimitives": { + "bigint": false, + "boolean": false, + "number": false, + "string": false, + }, + "ignoreTernaryTests": false, + }, + ], + "meta": { + "docs": { + "description": "Enforce using the nullish coalescing operator instead of logical assignments or chaining", + "recommended": "stylistic", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/prefer-nullish-coalescing", + }, + "hasSuggestions": true, + "messages": { + "noStrictNullCheck": "This rule requires the \`strictNullChecks\` compiler option to be turned on to function correctly.", + "preferNullishOverOr": "Prefer using nullish coalescing operator (\`??\`) instead of a logical or (\`||\`), as it is a safer operator.", + "preferNullishOverTernary": "Prefer using nullish coalescing operator (\`??\`) instead of a ternary expression, as it is simpler to read.", + "suggestNullish": "Fix to nullish coalescing operator (\`??\`).", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": { + "type": "boolean", + }, + "ignoreConditionalTests": { + "type": "boolean", + }, + "ignoreMixedLogicalExpressions": { + "type": "boolean", + }, + "ignorePrimitives": { + "oneOf": [ + { + "properties": { + "bigint": { + "type": "boolean", + }, + "boolean": { + "type": "boolean", + }, + "number": { + "type": "boolean", + }, + "string": { + "type": "boolean", + }, + }, + "type": "object", + }, + { + "enum": [ + true, + ], + "type": "boolean", + }, + ], + }, + "ignoreTernaryTests": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "prefer-optional-chain": { + "create": [Function], + "defaultOptions": [ + { + "allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing": false, + "checkAny": true, + "checkBigInt": true, + "checkBoolean": true, + "checkNumber": true, + "checkString": true, + "checkUnknown": true, + "requireNullish": false, + }, + ], + "meta": { + "docs": { + "description": "Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects", + "recommended": "stylistic", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/prefer-optional-chain", + }, + "fixable": "code", + "hasSuggestions": true, + "messages": { + "optionalChainSuggest": "Change to an optional chain.", + "preferOptionalChain": "Prefer using an optional chain expression instead, as it's more concise and easier to read.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing": { + "description": "Allow autofixers that will change the return type of the expression. This option is considered unsafe as it may break the build.", + "type": "boolean", + }, + "checkAny": { + "description": "Check operands that are typed as \`any\` when inspecting "loose boolean" operands.", + "type": "boolean", + }, + "checkBigInt": { + "description": "Check operands that are typed as \`bigint\` when inspecting "loose boolean" operands.", + "type": "boolean", + }, + "checkBoolean": { + "description": "Check operands that are typed as \`boolean\` when inspecting "loose boolean" operands.", + "type": "boolean", + }, + "checkNumber": { + "description": "Check operands that are typed as \`number\` when inspecting "loose boolean" operands.", + "type": "boolean", + }, + "checkString": { + "description": "Check operands that are typed as \`string\` when inspecting "loose boolean" operands.", + "type": "boolean", + }, + "checkUnknown": { + "description": "Check operands that are typed as \`unknown\` when inspecting "loose boolean" operands.", + "type": "boolean", + }, + "requireNullish": { + "description": "Skip operands that are not typed with \`null\` and/or \`undefined\` when inspecting "loose boolean" operands.", + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "prefer-promise-reject-errors": { + "create": [Function], + "defaultOptions": [ + { + "allowEmptyReject": false, + }, + ], + "meta": { + "docs": { + "description": "Require using Error objects as Promise rejection reasons", + "extendsBaseRule": true, + "recommended": "strict", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/prefer-promise-reject-errors", + }, + "messages": { + "rejectAnError": "Expected the Promise rejection reason to be an Error.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowEmptyReject": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "prefer-readonly": { + "create": [Function], + "defaultOptions": [ + { + "onlyInlineLambdas": false, + }, + ], + "meta": { + "docs": { + "description": "Require private members to be marked as \`readonly\` if they're never modified outside of the constructor", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/prefer-readonly", + }, + "fixable": "code", + "messages": { + "preferReadonly": "Member '{{name}}' is never reassigned; mark it as \`readonly\`.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "onlyInlineLambdas": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "prefer-readonly-parameter-types": { + "create": [Function], + "defaultOptions": [ + { + "allow": [], + "checkParameterProperties": true, + "ignoreInferredTypes": false, + "treatMethodsAsReadonly": false, + }, + ], + "meta": { + "docs": { + "description": "Require function parameters to be typed as \`readonly\` to prevent accidental mutation of inputs", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/prefer-readonly-parameter-types", + }, + "messages": { + "shouldBeReadonly": "Parameter should be a read only type.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allow": { + "items": { + "oneOf": [ + { + "type": "string", + }, + { + "additionalProperties": false, + "properties": { + "from": { + "enum": [ + "file", + ], + "type": "string", + }, + "name": { + "oneOf": [ + { + "type": "string", + }, + { + "items": { + "type": "string", + }, + "minItems": 1, + "type": "array", + "uniqueItems": true, + }, + ], + }, + "path": { + "type": "string", + }, + }, + "required": [ + "from", + "name", + ], + "type": "object", + }, + { + "additionalProperties": false, + "properties": { + "from": { + "enum": [ + "lib", + ], + "type": "string", + }, + "name": { + "oneOf": [ + { + "type": "string", + }, + { + "items": { + "type": "string", + }, + "minItems": 1, + "type": "array", + "uniqueItems": true, + }, + ], + }, + }, + "required": [ + "from", + "name", + ], + "type": "object", + }, + { + "additionalProperties": false, + "properties": { + "from": { + "enum": [ + "package", + ], + "type": "string", + }, + "name": { + "oneOf": [ + { + "type": "string", + }, + { + "items": { + "type": "string", + }, + "minItems": 1, + "type": "array", + "uniqueItems": true, + }, + ], + }, + "package": { + "type": "string", + }, + }, + "required": [ + "from", + "name", + "package", + ], + "type": "object", + }, + ], + }, + "type": "array", + }, + "checkParameterProperties": { + "type": "boolean", + }, + "ignoreInferredTypes": { + "type": "boolean", + }, + "treatMethodsAsReadonly": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "prefer-reduce-type-parameter": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Enforce using type parameter when calling \`Array#reduce\` instead of casting", + "recommended": "strict", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/prefer-reduce-type-parameter", + }, + "fixable": "code", + "messages": { + "preferTypeParameter": "Unnecessary cast: Array#reduce accepts a type parameter for the default value.", + }, + "schema": [], + "type": "problem", + }, + }, + "prefer-regexp-exec": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Enforce \`RegExp#exec\` over \`String#match\` if no global flag is provided", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/prefer-regexp-exec", + }, + "fixable": "code", + "messages": { + "regExpExecOverStringMatch": "Use the \`RegExp#exec()\` method instead.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "prefer-return-this-type": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Enforce that \`this\` is used when only \`this\` type is returned", + "recommended": "strict", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/prefer-return-this-type", + }, + "fixable": "code", + "messages": { + "useThisType": "Use \`this\` type instead.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "prefer-string-starts-ends-with": { + "create": [Function], + "defaultOptions": [ + { + "allowSingleElementEquality": "never", + }, + ], + "meta": { + "docs": { + "description": "Enforce using \`String#startsWith\` and \`String#endsWith\` over other equivalent methods of checking substrings", + "recommended": "stylistic", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/prefer-string-starts-ends-with", + }, + "fixable": "code", + "messages": { + "preferEndsWith": "Use the 'String#endsWith' method instead.", + "preferStartsWith": "Use 'String#startsWith' method instead.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowSingleElementEquality": { + "description": "Whether to allow equality checks against the first or last element of a string.", + "enum": [ + "always", + "never", + ], + "type": "string", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "prefer-ts-expect-error": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Enforce using \`@ts-expect-error\` over \`@ts-ignore\`", + "recommended": "strict", + "url": "https://typescript-eslint.io/rules/prefer-ts-expect-error", + }, + "fixable": "code", + "messages": { + "preferExpectErrorComment": "Use "@ts-expect-error" to ensure an error is actually being suppressed.", + }, + "schema": [], + "type": "problem", + }, + }, + "promise-function-async": { + "create": [Function], + "defaultOptions": [ + { + "allowAny": true, + "allowedPromiseNames": [], + "checkArrowFunctions": true, + "checkFunctionDeclarations": true, + "checkFunctionExpressions": true, + "checkMethodDeclarations": true, + }, + ], + "meta": { + "docs": { + "description": "Require any function or method that returns a Promise to be marked async", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/promise-function-async", + }, + "fixable": "code", + "messages": { + "missingAsync": "Functions that return promises must be async.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowAny": { + "description": "Whether to consider \`any\` and \`unknown\` to be Promises.", + "type": "boolean", + }, + "allowedPromiseNames": { + "description": "Any extra names of classes or interfaces to be considered Promises.", + "items": { + "type": "string", + }, + "type": "array", + }, + "checkArrowFunctions": { + "type": "boolean", + }, + "checkFunctionDeclarations": { + "type": "boolean", + }, + "checkFunctionExpressions": { + "type": "boolean", + }, + "checkMethodDeclarations": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "quotes": { + "create": [Function], + "defaultOptions": [ + "double", + { + "allowTemplateLiterals": false, + "avoidEscape": false, + }, + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Enforce the consistent use of either backticks, double, or single quotes", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/quotes", + }, + "fixable": "code", + "hasSuggestions": undefined, + "messages": { + "wrongQuotes": "Strings must use {{description}}.", + }, + "replacedBy": [ + "@stylistic/ts/quotes", + ], + "schema": [ + { + "enum": [ + "single", + "double", + "backtick", + ], + }, + { + "anyOf": [ + { + "enum": [ + "avoid-escape", + ], + }, + { + "additionalProperties": false, + "properties": { + "allowTemplateLiterals": { + "type": "boolean", + }, + "avoidEscape": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + }, + ], + "type": "layout", + }, + }, + "require-array-sort-compare": { + "create": [Function], + "defaultOptions": [ + { + "ignoreStringArrays": true, + }, + ], + "meta": { + "docs": { + "description": "Require \`Array#sort\` and \`Array#toSorted\` calls to always provide a \`compareFunction\`", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/require-array-sort-compare", + }, + "messages": { + "requireCompare": "Require 'compare' argument.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "ignoreStringArrays": { + "description": "Whether to ignore arrays in which all elements are strings.", + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "problem", + }, + }, + "require-await": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Disallow async functions which have no \`await\` expression", + "extendsBaseRule": true, + "recommended": "recommended", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/require-await", + }, + "messages": { + "missingAwait": "{{name}} has no 'await' expression.", + }, + "schema": [], + "type": "suggestion", + }, + }, + "restrict-plus-operands": { + "create": [Function], + "defaultOptions": [ + { + "allowAny": true, + "allowBoolean": true, + "allowNullish": true, + "allowNumberAndString": true, + "allowRegExp": true, + "skipCompoundAssignments": false, + }, + ], + "meta": { + "docs": { + "description": "Require both operands of addition to be the same type and be \`bigint\`, \`number\`, or \`string\`", + "recommended": { + "recommended": true, + "strict": [ + { + "allowAny": false, + "allowBoolean": false, + "allowNullish": false, + "allowNumberAndString": false, + "allowRegExp": false, + }, + ], + }, + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/restrict-plus-operands", + }, + "messages": { + "bigintAndNumber": "Numeric '+' operations must either be both bigints or both numbers. Got \`{{left}}\` + \`{{right}}\`.", + "invalid": "Invalid operand for a '+' operation. Operands must each be a number or {{stringLike}}. Got \`{{type}}\`.", + "mismatched": "Operands of '+' operations must be a number or {{stringLike}}. Got \`{{left}}\` + \`{{right}}\`.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowAny": { + "description": "Whether to allow \`any\` typed values.", + "type": "boolean", + }, + "allowBoolean": { + "description": "Whether to allow \`boolean\` typed values.", + "type": "boolean", + }, + "allowNullish": { + "description": "Whether to allow potentially \`null\` or \`undefined\` typed values.", + "type": "boolean", + }, + "allowNumberAndString": { + "description": "Whether to allow \`bigint\`/\`number\` typed values and \`string\` typed values to be added together.", + "type": "boolean", + }, + "allowRegExp": { + "description": "Whether to allow \`regexp\` typed values.", + "type": "boolean", + }, + "skipCompoundAssignments": { + "description": "Whether to skip compound assignments such as \`+=\`.", + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "problem", + }, + }, + "restrict-template-expressions": { + "create": [Function], + "defaultOptions": [ + { + "allowAny": true, + "allowBoolean": true, + "allowNullish": true, + "allowNumber": true, + "allowRegExp": true, + }, + ], + "meta": { + "docs": { + "description": "Enforce template literal expressions to be of \`string\` type", + "recommended": { + "recommended": true, + "strict": [ + { + "allowAny": false, + "allowBoolean": false, + "allowNever": false, + "allowNullish": false, + "allowNumber": false, + "allowRegExp": false, + }, + ], + }, + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/restrict-template-expressions", + }, + "messages": { + "invalidType": "Invalid type "{{type}}" of template literal expression.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowAny": { + "description": "Whether to allow \`any\` typed values in template expressions.", + "type": "boolean", + }, + "allowArray": { + "description": "Whether to allow \`array\` typed values in template expressions.", + "type": "boolean", + }, + "allowBoolean": { + "description": "Whether to allow \`boolean\` typed values in template expressions.", + "type": "boolean", + }, + "allowNever": { + "description": "Whether to allow \`never\` typed values in template expressions.", + "type": "boolean", + }, + "allowNullish": { + "description": "Whether to allow \`nullish\` typed values in template expressions.", + "type": "boolean", + }, + "allowNumber": { + "description": "Whether to allow \`number\` typed values in template expressions.", + "type": "boolean", + }, + "allowRegExp": { + "description": "Whether to allow \`regexp\` typed values in template expressions.", + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "problem", + }, + }, + "return-await": { + "create": [Function], + "defaultOptions": [ + "in-try-catch", + ], + "meta": { + "docs": { + "description": "Enforce consistent returning of awaited values", + "extendsBaseRule": "no-return-await", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/return-await", + }, + "fixable": "code", + "hasSuggestions": true, + "messages": { + "disallowedPromiseAwait": "Returning an awaited promise is not allowed in this context.", + "nonPromiseAwait": "Returning an awaited value that is not a promise is not allowed.", + "requiredPromiseAwait": "Returning an awaited promise is required in this context.", + }, + "schema": [ + { + "enum": [ + "in-try-catch", + "always", + "never", + ], + "type": "string", + }, + ], + "type": "problem", + }, + }, + "semi": { + "create": [Function], + "defaultOptions": [ + "always", + { + "beforeStatementContinuationChars": "any", + "omitLastInOneLineBlock": false, + }, + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Require or disallow semicolons instead of ASI", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/semi", + }, + "fixable": "code", + "hasSuggestions": undefined, + "messages": { + "extraSemi": "Extra semicolon.", + "missingSemi": "Missing semicolon.", + }, + "replacedBy": [ + "@stylistic/ts/semi", + ], + "schema": { + "anyOf": [ + { + "items": [ + { + "enum": [ + "never", + ], + }, + { + "additionalProperties": false, + "properties": { + "beforeStatementContinuationChars": { + "enum": [ + "always", + "any", + "never", + ], + }, + }, + "type": "object", + }, + ], + "maxItems": 2, + "minItems": 0, + "type": "array", + }, + { + "items": [ + { + "enum": [ + "always", + ], + }, + { + "additionalProperties": false, + "properties": { + "omitLastInOneLineBlock": { + "type": "boolean", + }, + "omitLastInOneLineClassBody": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "maxItems": 2, + "minItems": 0, + "type": "array", + }, + ], + }, + "type": "layout", + }, + }, + "sort-type-constituents": { + "create": [Function], + "defaultOptions": [ + { + "checkIntersections": true, + "checkUnions": true, + "groupOrder": [ + "named", + "keyword", + "operator", + "literal", + "function", + "import", + "conditional", + "object", + "tuple", + "intersection", + "union", + "nullish", + ], + }, + ], + "meta": { + "docs": { + "description": "Enforce constituents of a type union/intersection to be sorted alphabetically", + "url": "https://typescript-eslint.io/rules/sort-type-constituents", + }, + "fixable": "code", + "hasSuggestions": true, + "messages": { + "notSorted": "{{type}} type constituents must be sorted.", + "notSortedNamed": "{{type}} type {{name}} constituents must be sorted.", + "suggestFix": "Sort constituents of type (removes all comments).", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "checkIntersections": { + "description": "Whether to check intersection types.", + "type": "boolean", + }, + "checkUnions": { + "description": "Whether to check union types.", + "type": "boolean", + }, + "groupOrder": { + "description": "Ordering of the groups.", + "items": { + "enum": [ + "conditional", + "function", + "import", + "intersection", + "keyword", + "nullish", + "literal", + "named", + "object", + "operator", + "tuple", + "union", + ], + "type": "string", + }, + "type": "array", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "space-before-blocks": { + "create": [Function], + "defaultOptions": [ + "always", + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Enforce consistent spacing before blocks", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/space-before-blocks", + }, + "fixable": "whitespace", + "hasSuggestions": undefined, + "messages": { + "missingSpace": "Missing space before opening brace.", + "unexpectedSpace": "Unexpected space before opening brace.", + }, + "replacedBy": [ + "@stylistic/ts/space-before-blocks", + ], + "schema": [ + { + "oneOf": [ + { + "enum": [ + "always", + "never", + ], + }, + { + "additionalProperties": false, + "properties": { + "classes": { + "enum": [ + "always", + "never", + "off", + ], + }, + "functions": { + "enum": [ + "always", + "never", + "off", + ], + }, + "keywords": { + "enum": [ + "always", + "never", + "off", + ], + }, + }, + "type": "object", + }, + ], + }, + ], + "type": "layout", + }, + }, + "space-before-function-paren": { + "create": [Function], + "defaultOptions": [ + "always", + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Enforce consistent spacing before function parenthesis", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/space-before-function-paren", + }, + "fixable": "whitespace", + "messages": { + "missing": "Missing space before function parentheses.", + "unexpected": "Unexpected space before function parentheses.", + }, + "replacedBy": [ + "@stylistic/ts/space-before-function-paren", + ], + "schema": [ + { + "oneOf": [ + { + "enum": [ + "always", + "never", + ], + "type": "string", + }, + { + "additionalProperties": false, + "properties": { + "anonymous": { + "enum": [ + "always", + "never", + "ignore", + ], + "type": "string", + }, + "asyncArrow": { + "enum": [ + "always", + "never", + "ignore", + ], + "type": "string", + }, + "named": { + "enum": [ + "always", + "never", + "ignore", + ], + "type": "string", + }, + }, + "type": "object", + }, + ], + }, + ], + "type": "layout", + }, + }, + "space-infix-ops": { + "create": [Function], + "defaultOptions": [ + { + "int32Hint": false, + }, + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Require spacing around infix operators", + "extendsBaseRule": true, + "url": "https://typescript-eslint.io/rules/space-infix-ops", + }, + "fixable": "whitespace", + "hasSuggestions": undefined, + "messages": { + "missingSpace": "Operator '{{operator}}' must be spaced.", + }, + "replacedBy": [ + "@stylistic/ts/space-infix-ops", + ], + "schema": [ + { + "additionalProperties": false, + "properties": { + "int32Hint": { + "default": false, + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "layout", + }, + }, + "strict-boolean-expressions": { + "create": [Function], + "defaultOptions": [ + { + "allowAny": false, + "allowNullableBoolean": false, + "allowNullableEnum": false, + "allowNullableNumber": false, + "allowNullableObject": true, + "allowNullableString": false, + "allowNumber": true, + "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": false, + "allowString": true, + }, + ], + "meta": { + "docs": { + "description": "Disallow certain types in boolean expressions", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/strict-boolean-expressions", + }, + "fixable": "code", + "hasSuggestions": true, + "messages": { + "conditionErrorAny": "Unexpected any value in conditional. An explicit comparison or type cast is required.", + "conditionErrorNullableBoolean": "Unexpected nullable boolean value in conditional. Please handle the nullish case explicitly.", + "conditionErrorNullableEnum": "Unexpected nullable enum value in conditional. Please handle the nullish/zero/NaN cases explicitly.", + "conditionErrorNullableNumber": "Unexpected nullable number value in conditional. Please handle the nullish/zero/NaN cases explicitly.", + "conditionErrorNullableObject": "Unexpected nullable object value in conditional. An explicit null check is required.", + "conditionErrorNullableString": "Unexpected nullable string value in conditional. Please handle the nullish/empty cases explicitly.", + "conditionErrorNullish": "Unexpected nullish value in conditional. The condition is always false.", + "conditionErrorNumber": "Unexpected number value in conditional. An explicit zero/NaN check is required.", + "conditionErrorObject": "Unexpected object value in conditional. The condition is always true.", + "conditionErrorOther": "Unexpected value in conditional. A boolean expression is required.", + "conditionErrorString": "Unexpected string value in conditional. An explicit empty string check is required.", + "conditionFixCastBoolean": "Explicitly cast value to a boolean (\`Boolean(value)\`)", + "conditionFixCompareEmptyString": "Change condition to check for empty string (\`value !== ""\`)", + "conditionFixCompareFalse": "Change condition to check if false (\`value === false\`)", + "conditionFixCompareNaN": "Change condition to check for NaN (\`!Number.isNaN(value)\`)", + "conditionFixCompareNullish": "Change condition to check for null/undefined (\`value != null\`)", + "conditionFixCompareStringLength": "Change condition to check string's length (\`value.length !== 0\`)", + "conditionFixCompareTrue": "Change condition to check if true (\`value === true\`)", + "conditionFixCompareZero": "Change condition to check for 0 (\`value !== 0\`)", + "conditionFixDefaultEmptyString": "Explicitly treat nullish value the same as an empty string (\`value ?? ""\`)", + "conditionFixDefaultFalse": "Explicitly treat nullish value the same as false (\`value ?? false\`)", + "conditionFixDefaultZero": "Explicitly treat nullish value the same as 0 (\`value ?? 0\`)", + "noStrictNullCheck": "This rule requires the \`strictNullChecks\` compiler option to be turned on to function correctly.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowAny": { + "type": "boolean", + }, + "allowNullableBoolean": { + "type": "boolean", + }, + "allowNullableEnum": { + "type": "boolean", + }, + "allowNullableNumber": { + "type": "boolean", + }, + "allowNullableObject": { + "type": "boolean", + }, + "allowNullableString": { + "type": "boolean", + }, + "allowNumber": { + "type": "boolean", + }, + "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": { + "type": "boolean", + }, + "allowString": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "switch-exhaustiveness-check": { + "create": [Function], + "defaultOptions": [ + { + "allowDefaultCaseForExhaustiveSwitch": true, + "requireDefaultForNonUnion": false, + }, + ], + "meta": { + "docs": { + "description": "Require switch-case statements to be exhaustive", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/switch-exhaustiveness-check", + }, + "hasSuggestions": true, + "messages": { + "addMissingCases": "Add branches for missing cases.", + "dangerousDefaultCase": "The switch statement is exhaustive, so the default case is unnecessary.", + "switchIsNotExhaustive": "Switch is not exhaustive. Cases not matched: {{missingBranches}}", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "allowDefaultCaseForExhaustiveSwitch": { + "description": "If 'true', allow 'default' cases on switch statements with exhaustive cases.", + "type": "boolean", + }, + "requireDefaultForNonUnion": { + "description": "If 'true', require a 'default' clause for switches on non-union types.", + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "triple-slash-reference": { + "create": [Function], + "defaultOptions": [ + { + "lib": "always", + "path": "never", + "types": "prefer-import", + }, + ], + "meta": { + "docs": { + "description": "Disallow certain triple slash directives in favor of ES6-style import declarations", + "recommended": "recommended", + "url": "https://typescript-eslint.io/rules/triple-slash-reference", + }, + "messages": { + "tripleSlashReference": "Do not use a triple slash reference for {{module}}, use \`import\` style instead.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "lib": { + "enum": [ + "always", + "never", + ], + "type": "string", + }, + "path": { + "enum": [ + "always", + "never", + ], + "type": "string", + }, + "types": { + "enum": [ + "always", + "never", + "prefer-import", + ], + "type": "string", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "type-annotation-spacing": { + "create": [Function], + "defaultOptions": [ + {}, + ], + "meta": { + "deprecated": true, + "docs": { + "description": "Require consistent spacing around type annotations", + "url": "https://typescript-eslint.io/rules/type-annotation-spacing", + }, + "fixable": "whitespace", + "messages": { + "expectedSpaceAfter": "Expected a space after the '{{type}}'.", + "expectedSpaceBefore": "Expected a space before the '{{type}}'.", + "unexpectedSpaceAfter": "Unexpected space after the '{{type}}'.", + "unexpectedSpaceBefore": "Unexpected space before the '{{type}}'.", + "unexpectedSpaceBetween": "Unexpected space between the '{{previousToken}}' and the '{{type}}'.", + }, + "replacedBy": [ + "@stylistic/ts/type-annotation-spacing", + ], + "schema": [ + { + "$defs": { + "spacingConfig": { + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + }, + "type": "object", + }, + }, + "additionalProperties": false, + "properties": { + "after": { + "type": "boolean", + }, + "before": { + "type": "boolean", + }, + "overrides": { + "additionalProperties": false, + "properties": { + "arrow": { + "$ref": "#/items/0/$defs/spacingConfig", + }, + "colon": { + "$ref": "#/items/0/$defs/spacingConfig", + }, + "parameter": { + "$ref": "#/items/0/$defs/spacingConfig", + }, + "property": { + "$ref": "#/items/0/$defs/spacingConfig", + }, + "returnType": { + "$ref": "#/items/0/$defs/spacingConfig", + }, + "variable": { + "$ref": "#/items/0/$defs/spacingConfig", + }, + }, + "type": "object", + }, + }, + "type": "object", + }, + ], + "type": "layout", + }, + }, + "typedef": { + "create": [Function], + "defaultOptions": [ + { + "arrayDestructuring": false, + "arrowParameter": false, + "memberVariableDeclaration": false, + "objectDestructuring": false, + "parameter": false, + "propertyDeclaration": false, + "variableDeclaration": false, + "variableDeclarationIgnoreFunction": false, + }, + ], + "meta": { + "docs": { + "description": "Require type annotations in certain places", + "url": "https://typescript-eslint.io/rules/typedef", + }, + "messages": { + "expectedTypedef": "Expected a type annotation.", + "expectedTypedefNamed": "Expected {{name}} to have a type annotation.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "arrayDestructuring": { + "type": "boolean", + }, + "arrowParameter": { + "type": "boolean", + }, + "memberVariableDeclaration": { + "type": "boolean", + }, + "objectDestructuring": { + "type": "boolean", + }, + "parameter": { + "type": "boolean", + }, + "propertyDeclaration": { + "type": "boolean", + }, + "variableDeclaration": { + "type": "boolean", + }, + "variableDeclarationIgnoreFunction": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "unbound-method": { + "create": [Function], + "defaultOptions": [ + { + "ignoreStatic": false, + }, + ], + "meta": { + "docs": { + "description": "Enforce unbound methods are called with their expected scope", + "recommended": "recommended", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/unbound-method", + }, + "messages": { + "unbound": "Avoid referencing unbound methods which may cause unintentional scoping of \`this\`.", + "unboundWithoutThisAnnotation": "Avoid referencing unbound methods which may cause unintentional scoping of \`this\`. +If your function does not access \`this\`, you can annotate it with \`this: void\`, or consider using an arrow function instead.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "ignoreStatic": { + "description": "Whether to skip checking whether \`static\` methods are correctly bound.", + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "problem", + }, + }, + "unified-signatures": { + "create": [Function], + "defaultOptions": [ + { + "ignoreDifferentlyNamedParameters": false, + }, + ], + "meta": { + "docs": { + "description": "Disallow two overloads that could be unified into one with a union or an optional/rest parameter", + "recommended": "strict", + "url": "https://typescript-eslint.io/rules/unified-signatures", + }, + "messages": { + "omittingRestParameter": "{{failureStringStart}} with a rest parameter.", + "omittingSingleParameter": "{{failureStringStart}} with an optional parameter.", + "singleParameterDifference": "{{failureStringStart}} taking \`{{type1}} | {{type2}}\`.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "ignoreDifferentlyNamedParameters": { + "description": "Whether two parameters with different names at the same index should be considered different even if their types are the same.", + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "use-unknown-in-catch-callback-variable": { + "create": [Function], + "defaultOptions": [], + "meta": { + "docs": { + "description": "Enforce typing arguments in \`.catch()\` callbacks as \`unknown\`", + "recommended": "strict", + "requiresTypeChecking": true, + "url": "https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable", + }, + "fixable": "code", + "hasSuggestions": true, + "messages": { + "addUnknownRestTypeAnnotationSuggestion": "Add an explicit \`: [unknown]\` type annotation to the catch rest variable.", + "addUnknownTypeAnnotationSuggestion": "Add an explicit \`: unknown\` type annotation to the catch variable.", + "useUnknown": "Prefer the safe \`: unknown\` for a catch callback variable.", + "useUnknownArrayDestructuringPattern": "Prefer the safe \`: unknown\` for a catch callback variable. The thrown error may not be iterable.", + "useUnknownObjectDestructuringPattern": "Prefer the safe \`: unknown\` for a catch callback variable. The thrown error may be nullable, or may not have the expected shape.", + "useUnknownSpreadArgs": "Prefer the safe \`: unknown\` for a catch callback variable. The argument list may contain a handler that does not use \`unknown\` for the catch callback variable.", + "wrongRestTypeAnnotationSuggestion": "Change existing type annotation to \`: [unknown]\`.", + "wrongTypeAnnotationSuggestion": "Change existing type annotation to \`: unknown\`.", + }, + "schema": [], + "type": "suggestion", + }, + }, + }, }, + }, + }, + { + "files": [ + "**/*.ts", + "**/*.tsx", + "**/*.mts", + "**/*.cts", ], - "max-depth": "off", - "max-lines": "off", - "max-nested-callbacks": "off", - "max-params": "off", - "max-statements": "off", - "max-statements-per-line": [ - "error", - { - "max": 1, + "rules": { + "constructor-super": "off", + "getter-return": "off", + "no-const-assign": "off", + "no-dupe-args": "off", + "no-dupe-class-members": "off", + "no-dupe-keys": "off", + "no-func-assign": "off", + "no-import-assign": "off", + "no-new-symbol": "off", + "no-obj-calls": "off", + "no-redeclare": "off", + "no-setter-return": "off", + "no-this-before-super": "off", + "no-undef": "off", + "no-unreachable": "off", + "no-unsafe-negation": "off", + "no-var": "error", + "prefer-const": "error", + "prefer-rest-params": "error", + "prefer-spread": "error", + }, + }, + { + "rules": { + "@typescript-eslint/ban-ts-comment": "error", + "@typescript-eslint/ban-types": "error", + "@typescript-eslint/no-array-constructor": "error", + "@typescript-eslint/no-duplicate-enum-values": "error", + "@typescript-eslint/no-explicit-any": "error", + "@typescript-eslint/no-extra-non-null-assertion": "error", + "@typescript-eslint/no-loss-of-precision": "error", + "@typescript-eslint/no-misused-new": "error", + "@typescript-eslint/no-namespace": "error", + "@typescript-eslint/no-non-null-asserted-optional-chain": "error", + "@typescript-eslint/no-this-alias": "error", + "@typescript-eslint/no-unnecessary-type-constraint": "error", + "@typescript-eslint/no-unsafe-declaration-merging": "error", + "@typescript-eslint/no-unused-vars": "error", + "@typescript-eslint/no-var-requires": "error", + "@typescript-eslint/prefer-as-const": "error", + "@typescript-eslint/triple-slash-reference": "error", + "no-array-constructor": "off", + "no-loss-of-precision": "off", + "no-unused-vars": "off", + }, + }, + { + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "Array": false, + "ArrayBuffer": false, + "Atomics": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletNode": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BigInt": false, + "BigInt64Array": false, + "BigUint64Array": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "Boolean": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "Buffer": false, + "ByteLengthQueuingStrategy": false, + "CDATASection": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "Cache": false, + "CacheStorage": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "Clipboard": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "CloseEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "Credential": false, + "CredentialsContainer": false, + "CropTarget": false, + "Crypto": false, + "CryptoKey": false, + "CustomElementRegistry": false, + "CustomEvent": false, + "CustomStateSet": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DataView": false, + "Date": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "Document": false, + "DocumentFragment": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "Error": false, + "ErrorEvent": false, + "EvalError": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemWritableFileStream": false, + "Float32Array": false, + "Float64Array": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "Function": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "GravitySensor": false, + "Gyroscope": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBRElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDListElement": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHRElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLIElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLOListElement": false, + "HTMLObjectElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "HashChangeEvent": false, + "Headers": false, + "Highlight": false, + "HighlightRegistry": false, + "History": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IIRFilterNode": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "Infinity": false, + "Ink": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "Int16Array": false, + "Int32Array": false, + "Int8Array": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "Intl": false, + "Iterator": false, + "JSON": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "LinearAccelerationSensor": false, + "Location": false, + "Lock": false, + "LockManager": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "Map": false, + "Math": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaKeys": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MimeType": false, + "MimeTypeArray": false, + "MouseEvent": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "NaN": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "Number": false, + "OTPCredential": false, + "Object": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "Option": false, + "OrientationSensor": false, + "OscillatorNode": false, + "OverconstrainedError": false, + "PERSISTENT": false, + "PageRevealEvent": false, + "PageTransitionEvent": false, + "PannerNode": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "PermissionStatus": false, + "Permissions": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "Promise": false, + "PromiseRejectionEvent": false, + "Proxy": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "RTCCertificate": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "RadioNodeList": false, + "Range": false, + "RangeError": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "ReferenceError": false, + "Reflect": false, + "RegExp": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "ReportingObserver": false, + "Request": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "Response": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLineElement": false, + "SVGLinearGradientElement": false, + "SVGMPathElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGSVGElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTSpanElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "Scheduler": false, + "Scheduling": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "ScreenOrientation": false, + "ScriptProcessorNode": false, + "ScrollTimeline": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "Set": false, + "ShadowRoot": false, + "SharedArrayBuffer": false, + "SharedWorker": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "StereoPannerNode": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "String": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "SubtleCrypto": false, + "Symbol": false, + "SyncManager": false, + "SyntaxError": false, + "TEMPORARY": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "TypeError": false, + "UIEvent": false, + "URIError": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInTransferResult": false, + "USBInterface": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "Uint16Array": false, + "Uint32Array": false, + "Uint8Array": false, + "Uint8ClampedArray": false, + "UserActivation": false, + "VTTCue": false, + "VTTRegion": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "ViewTimeline": false, + "ViewTransition": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "VisualViewport": false, + "WGSLLanguageFeatures": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WeakMap": false, + "WeakSet": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WheelEvent": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCPUDepthInformation": false, + "XRCamera": false, + "XRDOMOverlayState": false, + "XRDepthInformation": false, + "XRFrame": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false, + "__dirname": false, + "__filename": false, + "addEventListener": false, + "afterAll": false, + "afterEach": false, + "alert": false, + "atob": false, + "beforeAll": false, + "beforeEach": false, + "blur": false, + "btoa": false, + "caches": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "clearImmediate": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "close": false, + "closed": false, + "confirm": false, + "console": false, + "cookieStore": false, + "createImageBitmap": false, + "credentialless": false, + "crossOriginIsolated": false, + "crypto": false, + "customElements": false, + "decodeURI": false, + "decodeURIComponent": false, + "describe": false, + "devicePixelRatio": false, + "dispatchEvent": false, + "document": false, + "documentPictureInPicture": false, + "encodeURI": false, + "encodeURIComponent": false, + "escape": false, + "eval": false, + "event": false, + "expect": false, + "exports": true, + "external": false, + "fetch": false, + "find": false, + "fit": false, + "focus": false, + "frameElement": false, + "frames": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "global": false, + "globalThis": false, + "history": false, + "indexedDB": false, + "innerHeight": false, + "innerWidth": false, + "isFinite": false, + "isNaN": false, + "isSecureContext": false, + "it": false, + "jest": false, + "launchQueue": false, + "length": false, + "localStorage": false, + "location": true, + "locationbar": false, + "matchMedia": false, + "menubar": false, + "module": false, + "moveBy": false, + "moveTo": false, + "name": false, + "navigation": false, + "navigator": false, + "offscreenBuffering": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "origin": false, + "originAgentCluster": false, + "outerHeight": false, + "outerWidth": false, + "pageXOffset": false, + "pageYOffset": false, + "parent": false, + "parseFloat": false, + "parseInt": false, + "performance": false, + "personalbar": false, + "postMessage": false, + "print": false, + "process": false, + "prompt": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "removeEventListener": false, + "reportError": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "require": false, + "resizeBy": false, + "resizeTo": false, + "scheduler": false, + "screen": false, + "screenLeft": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "scroll": false, + "scrollBy": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "scrollbars": false, + "self": false, + "sessionStorage": false, + "setImmediate": false, + "setInterval": false, + "setTimeout": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "speechSynthesis": false, + "status": false, + "statusbar": false, + "stop": false, + "structuredClone": false, + "styleMedia": false, + "test": false, + "toolbar": false, + "top": false, + "trustedTypes": false, + "undefined": false, + "unescape": false, + "visualViewport": false, + "window": false, + "xdescribe": false, + "xit": false, + "xtest": false, }, - ], - "multiline-comment-style": "off", - "new-cap": "off", - "no-alert": "error", - "no-array-constructor": "off", - "no-await-in-loop": "off", - "no-bitwise": "off", - "no-buffer-constructor": "error", - "no-caller": "error", - "no-case-declarations": "error", - "no-catch-shadow": "error", - "no-class-assign": "warn", - "no-compare-neg-zero": "error", - "no-cond-assign": "warn", - "no-console": "off", - "no-const-assign": "error", - "no-constant-condition": "off", - "no-control-regex": "off", - "no-debugger": "error", - "no-delete-var": "error", - "no-div-regex": "off", - "no-dupe-args": "error", - "no-dupe-class-members": "off", - "no-dupe-keys": "error", - "no-duplicate-case": "error", - "no-duplicate-imports": "off", - "no-else-return": "warn", - "no-empty": "off", - "no-empty-character-class": "error", - "no-empty-function": "off", - "no-empty-pattern": "off", - "no-eq-null": "warn", - "no-eval": "warn", - "no-ex-assign": "off", - "no-extend-native": "warn", - "no-extra-bind": "off", - "no-extra-boolean-cast": "off", - "no-extra-label": "warn", - "no-fallthrough": "off", - "no-func-assign": "off", - "no-global-assign": "off", - "no-implicit-coercion": "error", - "no-implicit-globals": "off", - "no-implied-eval": "off", - "no-import-assign": "warn", - "no-inline-comments": "off", - "no-inner-declarations": "off", - "no-invalid-regexp": "warn", - "no-invalid-this": "off", - "no-irregular-whitespace": [ - "error", - { - "skipComments": true, - "skipRegExps": true, - "skipStrings": true, - "skipTemplates": true, + "parserOptions": { + "ecmaVersion": 2020, + "project": "./tsconfig.eslint.json", + "sourceType": "module", + "warnOnUnsupportedTypeScriptVersion": false, }, - ], - "no-iterator": "off", - "no-label-var": "error", - "no-labels": "off", - "no-lone-blocks": "off", - "no-lonely-if": "error", - "no-loop-func": "off", - "no-magic-numbers": "off", - "no-mixed-requires": "error", - "no-multi-assign": "warn", - "no-multi-str": "error", - "no-negated-condition": "warn", - "no-nested-ternary": "off", - "no-new": "off", - "no-new-func": "warn", - "no-new-object": "error", - "no-new-require": "error", - "no-new-symbol": "warn", - "no-new-wrappers": "warn", - "no-obj-calls": "warn", - "no-octal": "error", - "no-octal-escape": "error", - "no-param-reassign": "off", - "no-path-concat": "warn", - "no-plusplus": "off", - "no-process-env": "off", - "no-process-exit": "off", - "no-proto": "off", - "no-prototype-builtins": "off", - "no-redeclare": "off", - "no-regex-spaces": "warn", - "no-restricted-globals": "off", - "no-restricted-imports": "off", - "no-restricted-modules": "off", - "no-restricted-properties": "off", - "no-restricted-syntax": "off", - "no-return-assign": "off", - "no-return-await": "warn", - "no-script-url": "off", - "no-self-assign": "error", - "no-self-compare": "warn", - "no-setter-return": "warn", - "no-shadow": "off", - "no-shadow-restricted-names": "error", - "no-sparse-arrays": "warn", - "no-sync": "off", - "no-template-curly-in-string": "error", - "no-ternary": "off", - "no-this-before-super": "error", - "no-throw-literal": "off", - "no-undef": "off", - "no-undef-init": "off", - "no-undefined": "off", - "no-underscore-dangle": "off", - "no-unmodified-loop-condition": "off", - "no-unneeded-ternary": "off", - "no-unreachable": "warn", - "no-unsafe-finally": "warn", - "no-unsafe-negation": "error", - "no-unused-expressions": "off", - "no-unused-labels": "error", - "no-unused-vars": "off", - "no-use-before-define": "off", - "no-useless-call": "off", - "no-useless-computed-key": "error", - "no-useless-concat": "warn", - "no-useless-constructor": "off", - "no-useless-escape": "off", - "no-useless-rename": "error", - "no-useless-return": "warn", - "no-var": "error", - "no-void": "off", - "no-warning-comments": "off", - "no-with": "error", - "object-shorthand": [ - "error", - "always", - ], - "one-var": [ - "error", - "never", - ], - "operator-assignment": [ - "error", - "always", - ], - "padding-line-between-statements": "off", - "prefer-const": [ - "error", - { - "destructuring": "all", - }, - ], - "prefer-destructuring": [ - "error", - { - "AssignmentExpression": { - "array": true, - "object": false, + }, + "rules": { + "@typescript-eslint/adjacent-overload-signatures": "error", + "@typescript-eslint/array-type": "off", + "@typescript-eslint/await-thenable": "off", + "@typescript-eslint/ban-ts-comment": [ + "error", + { + "minimumDescriptionLength": 3, + "ts-check": true, + "ts-expect-error": "allow-with-description", + "ts-ignore": "allow-with-description", + "ts-nocheck": true, + }, + ], + "@typescript-eslint/class-literal-property-style": "error", + "@typescript-eslint/consistent-type-definitions": "error", + "@typescript-eslint/default-param-last": "error", + "@typescript-eslint/dot-notation": [ + "error", + { + "allowKeywords": true, + "allowPattern": "(^[A-Z])|(^[a-z]+(_[a-z]+)+$)", + "allowPrivateClassPropertyAccess": true, + }, + ], + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-member-accessibility": "error", + "@typescript-eslint/explicit-module-boundary-types": "off", + "@typescript-eslint/init-declarations": "off", + "@typescript-eslint/member-ordering": [ + "error", + { + "default": [ + "signature", + "public-instance-field", + "protected-instance-field", + "private-instance-field", + "instance-field", + "public-constructor", + "protected-constructor", + "private-constructor", + "constructor", + "public-instance-method", + "protected-instance-method", + "private-instance-method", + "instance-method", + "public-static-field", + "protected-static-field", + "private-static-field", + "static-field", + "public-static-method", + "protected-static-method", + "private-static-method", + "static-method", + ], + }, + ], + "@typescript-eslint/no-base-to-string": "error", + "@typescript-eslint/no-dupe-class-members": "error", + "@typescript-eslint/no-empty-interface": "off", + "@typescript-eslint/no-explicit-any": "off", + "@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-invalid-this": "error", + "@typescript-eslint/no-invalid-void-type": "error", + "@typescript-eslint/no-misused-new": "error", + "@typescript-eslint/no-namespace": "off", + "@typescript-eslint/no-non-null-asserted-optional-chain": "error", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/no-throw-literal": "error", + "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", + "@typescript-eslint/no-unnecessary-qualifier": "error", + "@typescript-eslint/no-unsafe-assignment": "off", + "@typescript-eslint/no-unsafe-call": "off", + "@typescript-eslint/no-unsafe-declaration-merging": "off", + "@typescript-eslint/no-unsafe-member-access": "off", + "@typescript-eslint/no-unsafe-return": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-useless-constructor": "error", + "@typescript-eslint/no-var-requires": "error", + "@typescript-eslint/prefer-as-const": "error", + "@typescript-eslint/prefer-for-of": "error", + "@typescript-eslint/prefer-includes": "error", + "@typescript-eslint/prefer-literal-enum-member": "off", + "@typescript-eslint/prefer-reduce-type-parameter": "error", + "@typescript-eslint/prefer-string-starts-ends-with": "error", + "@typescript-eslint/promise-function-async": "off", + "@typescript-eslint/require-await": "error", + "@typescript-eslint/restrict-plus-operands": "off", + "@typescript-eslint/switch-exhaustiveness-check": "warn", + "@typescript-eslint/unbound-method": "error", + "@typescript-eslint/unified-signatures": "error", + "accessor-pairs": "off", + "array-callback-return": "error", + "block-scoped-var": "error", + "callback-return": "off", + "capitalized-comments": "off", + "class-methods-use-this": "off", + "complexity": "off", + "consistent-return": "off", + "consistent-this": [ + "error", + "self", + ], + "constructor-super": "off", + "default-case": "off", + "dot-notation": "off", + "eqeqeq": [ + "error", + "smart", + ], + "for-direction": "off", + "func-name-matching": [ + "warn", + "always", + ], + "func-names": [ + "warn", + "as-needed", + ], + "func-style": "off", + "global-require": "off", + "guard-for-in": "warn", + "handle-callback-err": "off", + "id-blacklist": "off", + "id-length": "off", + "id-match": "off", + "init-declarations": "off", + "line-comment-position": "off", + "lines-between-class-members": [ + "error", + "always", + { + "exceptAfterSingleLine": true, + }, + ], + "max-depth": "off", + "max-lines": "off", + "max-nested-callbacks": "off", + "max-params": "off", + "max-statements": "off", + "max-statements-per-line": [ + "error", + { + "max": 1, }, - "VariableDeclarator": { - "array": false, - "object": true, + ], + "multiline-comment-style": "off", + "new-cap": "off", + "no-alert": "error", + "no-array-constructor": "off", + "no-await-in-loop": "off", + "no-bitwise": "off", + "no-buffer-constructor": "error", + "no-caller": "error", + "no-case-declarations": "error", + "no-catch-shadow": "error", + "no-class-assign": "warn", + "no-compare-neg-zero": "error", + "no-cond-assign": "warn", + "no-console": "off", + "no-const-assign": "error", + "no-constant-condition": "off", + "no-control-regex": "off", + "no-debugger": "error", + "no-delete-var": "error", + "no-div-regex": "off", + "no-dupe-args": "error", + "no-dupe-class-members": "off", + "no-dupe-keys": "error", + "no-duplicate-case": "error", + "no-duplicate-imports": "off", + "no-else-return": "warn", + "no-empty": "off", + "no-empty-character-class": "error", + "no-empty-function": "off", + "no-empty-pattern": "off", + "no-eq-null": "warn", + "no-eval": "warn", + "no-ex-assign": "off", + "no-extend-native": "warn", + "no-extra-bind": "off", + "no-extra-boolean-cast": "off", + "no-extra-label": "warn", + "no-fallthrough": "off", + "no-func-assign": "off", + "no-global-assign": "off", + "no-implicit-coercion": "error", + "no-implicit-globals": "off", + "no-implied-eval": "off", + "no-import-assign": "warn", + "no-inline-comments": "off", + "no-inner-declarations": "off", + "no-invalid-regexp": "warn", + "no-invalid-this": "off", + "no-irregular-whitespace": [ + "error", + { + "skipComments": true, + "skipRegExps": true, + "skipStrings": true, + "skipTemplates": true, + }, + ], + "no-iterator": "off", + "no-label-var": "error", + "no-labels": "off", + "no-lone-blocks": "off", + "no-lonely-if": "error", + "no-loop-func": "off", + "no-magic-numbers": "off", + "no-mixed-requires": "error", + "no-multi-assign": "warn", + "no-multi-str": "error", + "no-negated-condition": "warn", + "no-nested-ternary": "off", + "no-new": "off", + "no-new-func": "warn", + "no-new-object": "error", + "no-new-require": "error", + "no-new-symbol": "warn", + "no-new-wrappers": "warn", + "no-obj-calls": "warn", + "no-octal": "error", + "no-octal-escape": "error", + "no-param-reassign": "off", + "no-path-concat": "warn", + "no-plusplus": "off", + "no-process-env": "off", + "no-process-exit": "off", + "no-proto": "off", + "no-prototype-builtins": "off", + "no-redeclare": "off", + "no-regex-spaces": "warn", + "no-restricted-globals": "off", + "no-restricted-imports": "off", + "no-restricted-modules": "off", + "no-restricted-properties": "off", + "no-restricted-syntax": "off", + "no-return-assign": "off", + "no-return-await": "warn", + "no-script-url": "off", + "no-self-assign": "error", + "no-self-compare": "warn", + "no-setter-return": "warn", + "no-shadow": "off", + "no-shadow-restricted-names": "error", + "no-sparse-arrays": "warn", + "no-sync": "off", + "no-template-curly-in-string": "error", + "no-ternary": "off", + "no-this-before-super": "error", + "no-throw-literal": "off", + "no-undef": "off", + "no-undef-init": "off", + "no-undefined": "off", + "no-underscore-dangle": "off", + "no-unmodified-loop-condition": "off", + "no-unneeded-ternary": "off", + "no-unreachable": "warn", + "no-unsafe-finally": "warn", + "no-unsafe-negation": "error", + "no-unused-expressions": "off", + "no-unused-labels": "error", + "no-unused-vars": "off", + "no-use-before-define": "off", + "no-useless-call": "off", + "no-useless-computed-key": "error", + "no-useless-concat": "warn", + "no-useless-constructor": "off", + "no-useless-escape": "off", + "no-useless-rename": "error", + "no-useless-return": "warn", + "no-var": "error", + "no-void": "off", + "no-warning-comments": "off", + "no-with": "error", + "object-shorthand": [ + "error", + "always", + ], + "one-var": [ + "error", + "never", + ], + "operator-assignment": [ + "error", + "always", + ], + "padding-line-between-statements": "off", + "prefer-const": [ + "error", + { + "destructuring": "all", + }, + ], + "prefer-destructuring": [ + "error", + { + "AssignmentExpression": { + "array": true, + "object": false, + }, + "VariableDeclarator": { + "array": false, + "object": true, + }, + }, + ], + "prefer-numeric-literals": "off", + "prefer-promise-reject-errors": "error", + "prefer-rest-params": "warn", + "prefer-spread": "error", + "prefer-template": "warn", + "radix": "error", + "require-await": "off", + "require-jsdoc": "off", + "require-yield": "warn", + "sort-imports": "off", + "sort-keys": "off", + "sort-vars": "off", + "spaced-comment": [ + "error", + "always", + ], + "strict": [ + "error", + "never", + ], + "symbol-description": "warn", + "use-isnan": "error", + "valid-jsdoc": "off", + "valid-typeof": "error", + "vars-on-top": "off", + "yoda": "error", + }, + }, + { + "plugins": { + "prettier": { + "configs": { + "recommended": { + "extends": [ + "prettier", + ], + "plugins": [ + "prettier", + ], + "rules": { + "arrow-body-style": "off", + "prefer-arrow-callback": "off", + "prettier/prettier": "error", + }, + }, + }, + "meta": { + "name": "eslint-plugin-prettier", + "version": "5.1.3", + }, + "rules": { + "prettier": { + "create": [Function], + "meta": { + "docs": { + "url": "https://github.com/prettier/eslint-plugin-prettier#options", + }, + "fixable": "code", + "messages": { + "delete": "Delete \`{{ deleteText }}\`", + "insert": "Insert \`{{ insertText }}\`", + "replace": "Replace \`{{ deleteText }}\` with \`{{ insertText }}\`", + }, + "schema": [ + { + "additionalProperties": true, + "properties": {}, + "type": "object", + }, + { + "additionalProperties": true, + "properties": { + "fileInfoOptions": { + "additionalProperties": true, + "properties": {}, + "type": "object", + }, + "usePrettierrc": { + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "layout", + }, + }, }, }, - ], - "prefer-numeric-literals": "off", - "prefer-promise-reject-errors": "error", - "prefer-rest-params": "warn", - "prefer-spread": "error", - "prefer-template": "warn", - "radix": "error", - "require-await": "off", - "require-jsdoc": "off", - "require-yield": "warn", - "sort-imports": "off", - "sort-keys": "off", - "sort-vars": "off", - "spaced-comment": [ - "error", - "always", - ], - "strict": [ - "error", - "never", - ], - "symbol-description": "warn", - "use-isnan": "error", - "valid-jsdoc": "off", - "valid-typeof": "error", - "vars-on-top": "off", - "yoda": "error", + }, + "rules": { + "@babel/object-curly-spacing": "off", + "@babel/semi": "off", + "@typescript-eslint/block-spacing": "off", + "@typescript-eslint/brace-style": "off", + "@typescript-eslint/comma-dangle": "off", + "@typescript-eslint/comma-spacing": "off", + "@typescript-eslint/func-call-spacing": "off", + "@typescript-eslint/indent": "off", + "@typescript-eslint/key-spacing": "off", + "@typescript-eslint/keyword-spacing": "off", + "@typescript-eslint/lines-around-comment": 0, + "@typescript-eslint/member-delimiter-style": "off", + "@typescript-eslint/no-extra-parens": "off", + "@typescript-eslint/no-extra-semi": "off", + "@typescript-eslint/object-curly-spacing": "off", + "@typescript-eslint/quotes": 0, + "@typescript-eslint/semi": "off", + "@typescript-eslint/space-before-blocks": "off", + "@typescript-eslint/space-before-function-paren": "off", + "@typescript-eslint/space-infix-ops": "off", + "@typescript-eslint/type-annotation-spacing": "off", + "array-bracket-newline": "off", + "array-bracket-spacing": "off", + "array-element-newline": "off", + "arrow-body-style": "off", + "arrow-parens": "off", + "arrow-spacing": "off", + "babel/object-curly-spacing": "off", + "babel/quotes": 0, + "babel/semi": "off", + "block-spacing": "off", + "brace-style": "off", + "comma-dangle": "off", + "comma-spacing": "off", + "comma-style": "off", + "computed-property-spacing": "off", + "curly": 0, + "dot-location": "off", + "eol-last": "off", + "flowtype/boolean-style": "off", + "flowtype/delimiter-dangle": "off", + "flowtype/generic-spacing": "off", + "flowtype/object-type-curly-spacing": "off", + "flowtype/object-type-delimiter": "off", + "flowtype/quotes": "off", + "flowtype/semi": "off", + "flowtype/space-after-type-colon": "off", + "flowtype/space-before-generic-bracket": "off", + "flowtype/space-before-type-colon": "off", + "flowtype/union-intersection-spacing": "off", + "func-call-spacing": "off", + "function-call-argument-newline": "off", + "function-paren-newline": "off", + "generator-star": "off", + "generator-star-spacing": "off", + "implicit-arrow-linebreak": "off", + "indent": "off", + "indent-legacy": "off", + "jsx-quotes": "off", + "key-spacing": "off", + "keyword-spacing": "off", + "linebreak-style": "off", + "lines-around-comment": 0, + "max-len": 0, + "max-statements-per-line": "off", + "multiline-ternary": "off", + "new-parens": "off", + "newline-per-chained-call": "off", + "no-arrow-condition": "off", + "no-comma-dangle": "off", + "no-confusing-arrow": 0, + "no-extra-parens": "off", + "no-extra-semi": "off", + "no-floating-decimal": "off", + "no-mixed-operators": 0, + "no-mixed-spaces-and-tabs": "off", + "no-multi-spaces": "off", + "no-multiple-empty-lines": "off", + "no-reserved-keys": "off", + "no-space-before-semi": "off", + "no-spaced-func": "off", + "no-tabs": 0, + "no-trailing-spaces": "off", + "no-unexpected-multiline": 0, + "no-whitespace-before-property": "off", + "no-wrap-func": "off", + "nonblock-statement-body-position": "off", + "object-curly-newline": "off", + "object-curly-spacing": "off", + "object-property-newline": "off", + "one-var-declaration-per-line": "off", + "operator-linebreak": "off", + "padded-blocks": "off", + "prefer-arrow-callback": "off", + "prettier/prettier": "error", + "quote-props": "off", + "quotes": 0, + "react/jsx-child-element-spacing": "off", + "react/jsx-closing-bracket-location": "off", + "react/jsx-closing-tag-location": "off", + "react/jsx-curly-newline": "off", + "react/jsx-curly-spacing": "off", + "react/jsx-equals-spacing": "off", + "react/jsx-first-prop-new-line": "off", + "react/jsx-indent": "off", + "react/jsx-indent-props": "off", + "react/jsx-max-props-per-line": "off", + "react/jsx-newline": "off", + "react/jsx-one-expression-per-line": "off", + "react/jsx-props-no-multi-spaces": "off", + "react/jsx-space-before-closing": "off", + "react/jsx-tag-spacing": "off", + "react/jsx-wrap-multilines": "off", + "rest-spread-spacing": "off", + "semi": "off", + "semi-spacing": "off", + "semi-style": "off", + "space-after-function-name": "off", + "space-after-keywords": "off", + "space-before-blocks": "off", + "space-before-function-paren": "off", + "space-before-function-parentheses": "off", + "space-before-keywords": "off", + "space-in-brackets": "off", + "space-in-parens": "off", + "space-infix-ops": "off", + "space-return-throw-case": "off", + "space-unary-ops": "off", + "space-unary-word-ops": "off", + "standard/array-bracket-even-spacing": "off", + "standard/computed-property-even-spacing": "off", + "standard/object-curly-even-spacing": "off", + "switch-colon-spacing": "off", + "template-curly-spacing": "off", + "template-tag-spacing": "off", + "unicorn/empty-brace-spaces": "off", + "unicorn/no-nested-ternary": "off", + "unicorn/number-literal-case": "off", + "unicorn/template-indent": 0, + "vue/array-bracket-newline": "off", + "vue/array-bracket-spacing": "off", + "vue/array-element-newline": "off", + "vue/arrow-spacing": "off", + "vue/block-spacing": "off", + "vue/block-tag-newline": "off", + "vue/brace-style": "off", + "vue/comma-dangle": "off", + "vue/comma-spacing": "off", + "vue/comma-style": "off", + "vue/dot-location": "off", + "vue/func-call-spacing": "off", + "vue/html-closing-bracket-newline": "off", + "vue/html-closing-bracket-spacing": "off", + "vue/html-end-tags": "off", + "vue/html-indent": "off", + "vue/html-quotes": "off", + "vue/html-self-closing": 0, + "vue/key-spacing": "off", + "vue/keyword-spacing": "off", + "vue/max-attributes-per-line": "off", + "vue/max-len": 0, + "vue/multiline-html-element-content-newline": "off", + "vue/multiline-ternary": "off", + "vue/mustache-interpolation-spacing": "off", + "vue/no-extra-parens": "off", + "vue/no-multi-spaces": "off", + "vue/no-spaces-around-equal-signs-in-attribute": "off", + "vue/object-curly-newline": "off", + "vue/object-curly-spacing": "off", + "vue/object-property-newline": "off", + "vue/operator-linebreak": "off", + "vue/quote-props": "off", + "vue/script-indent": "off", + "vue/singleline-html-element-content-newline": "off", + "vue/space-in-parens": "off", + "vue/space-infix-ops": "off", + "vue/space-unary-ops": "off", + "vue/template-curly-spacing": "off", + "wrap-iife": "off", + "wrap-regex": "off", + "yield-star-spacing": "off", + }, }, -} +] `; diff --git a/packages/eslint-config/tests/eslint.test.ts b/packages/eslint-config/tests/eslint.test.ts index 079b441933..868893e3f0 100644 --- a/packages/eslint-config/tests/eslint.test.ts +++ b/packages/eslint-config/tests/eslint.test.ts @@ -1,10 +1,7 @@ -// @ts-expect-error TS considers the src to not be a module because it uses module.exports but vitest transpiles it just fine for this import eslintConfig from '../src'; describe('ESLint Config', () => { test('should export rules', () => { - expect(eslintConfig.root).toBe(true); - expect(eslintConfig.parser).toBe('@typescript-eslint/parser'); expect(eslintConfig).toMatchSnapshot(); }); }); diff --git a/packages/eslint-config/tsup.config.ts b/packages/eslint-config/tsup.config.ts index c0f53eb9c4..411d883f0c 100644 --- a/packages/eslint-config/tsup.config.ts +++ b/packages/eslint-config/tsup.config.ts @@ -1,13 +1,5 @@ -import { Options } from 'tsup'; import { createTsupConfig } from '../../scripts/tsup.config'; -const options: Options = { - sourcemap: false, - dts: false -}; - export default createTsupConfig({ - cjsOptions: options, - esmOptions: options, iifeOptions: { disabled: true } }); diff --git a/yarn.lock b/yarn.lock index b3943cf1fe..ff81f0093c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -753,6 +753,23 @@ __metadata: languageName: node linkType: hard +"@eslint/eslintrc@npm:^3.0.2": + version: 3.0.2 + resolution: "@eslint/eslintrc@npm:3.0.2" + dependencies: + ajv: "npm:^6.12.4" + debug: "npm:^4.3.2" + espree: "npm:^10.0.1" + globals: "npm:^14.0.0" + ignore: "npm:^5.2.0" + import-fresh: "npm:^3.2.1" + js-yaml: "npm:^4.1.0" + minimatch: "npm:^3.1.2" + strip-json-comments: "npm:^3.1.1" + checksum: 10/04e3d7de2b16fd59ba8985ecd6922eb488e630f94e4433858567a8a6c99b478bb7b47854b166b830b44905759547d0a03654eb1265952c812d5d1d70e3e4ccf9 + languageName: node + linkType: hard + "@eslint/js@npm:8.57.0": version: 8.57.0 resolution: "@eslint/js@npm:8.57.0" @@ -760,6 +777,13 @@ __metadata: languageName: node linkType: hard +"@eslint/js@npm:9.0.0, @eslint/js@npm:^9.0.0": + version: 9.0.0 + resolution: "@eslint/js@npm:9.0.0" + checksum: 10/b14b20af72410ef53e3e77e7d83cc1d6e6554b0092ceb9f969d25d765f4d775b4be32b0cd99bbfd6ce72eb2e4fb6b39b42a159b31909fbe1b3a5e88d75211687 + languageName: node + linkType: hard + "@fastify/busboy@npm:^2.0.0": version: 2.1.1 resolution: "@fastify/busboy@npm:2.1.1" @@ -847,6 +871,17 @@ __metadata: languageName: node linkType: hard +"@humanwhocodes/config-array@npm:^0.12.3": + version: 0.12.3 + resolution: "@humanwhocodes/config-array@npm:0.12.3" + dependencies: + "@humanwhocodes/object-schema": "npm:^2.0.3" + debug: "npm:^4.3.1" + minimatch: "npm:^3.0.5" + checksum: 10/b05f528c110aa1657d95d213e4ad2662f4161e838806af01a4d3f3b6ee3878d9b6f87d1b10704917f5c2f116757cb5c818480c32c4c4c6f84fe775a170b5f758 + languageName: node + linkType: hard + "@humanwhocodes/module-importer@npm:^1.0.1": version: 1.0.1 resolution: "@humanwhocodes/module-importer@npm:1.0.1" @@ -861,6 +896,13 @@ __metadata: languageName: node linkType: hard +"@humanwhocodes/object-schema@npm:^2.0.3": + version: 2.0.3 + resolution: "@humanwhocodes/object-schema@npm:2.0.3" + checksum: 10/05bb99ed06c16408a45a833f03a732f59bf6184795d4efadd33238ff8699190a8c871ad1121241bb6501589a9598dc83bf25b99dcbcf41e155cdf36e35e937a3 + languageName: node + linkType: hard + "@inquirer/confirm@npm:^3.0.0": version: 3.1.6 resolution: "@inquirer/confirm@npm:3.1.6" @@ -1325,6 +1367,7 @@ __metadata: eslint: "npm:^8.57.0" eslint-config-prettier: "npm:^9.1.0" eslint-plugin-prettier: "npm:^5.1.3" + globals: "npm:^15.0.0" prettier: "npm:^3.2.5" tsup: "npm:^8.0.2" typedoc-json-parser: "npm:^10.0.0" @@ -1686,7 +1729,33 @@ __metadata: languageName: node linkType: hard -"@types/estree@npm:1.0.5, @types/estree@npm:^1.0.0": +"@types/eslint-config-prettier@npm:^6.11.3": + version: 6.11.3 + resolution: "@types/eslint-config-prettier@npm:6.11.3" + checksum: 10/b69ad5d7452f614450fcaf78b4055cfb11afb632f1ef292a3229cb5ac9a7041106a85cf634c570fbd3bb9db59c8fee7ca0e32a059e6fcad2477e22d81d5c3ef3 + languageName: node + linkType: hard + +"@types/eslint@npm:*": + version: 8.56.7 + resolution: "@types/eslint@npm:8.56.7" + dependencies: + "@types/estree": "npm:*" + "@types/json-schema": "npm:*" + checksum: 10/4c90f30a19bc5a01b27afc4f7e3efa28d191b7c9505fd4f6373d1dcdf8e93b939628d92ae730c3ef77bf2a094622296bb307cbecbad7cb6b43ef31dd722f6944 + languageName: node + linkType: hard + +"@types/eslint__js@npm:^8.42.3": + version: 8.42.3 + resolution: "@types/eslint__js@npm:8.42.3" + dependencies: + "@types/eslint": "npm:*" + checksum: 10/e31f19de642d35a664695d0cab873ce6de19b8a3506755835b91f8a49a8c41099dcace449df49f1a486de6fa6565d21ceb1fa33be6004fc7adef9226e5d256a1 + languageName: node + linkType: hard + +"@types/estree@npm:*, @types/estree@npm:1.0.5, @types/estree@npm:^1.0.0": version: 1.0.5 resolution: "@types/estree@npm:1.0.5" checksum: 10/7de6d928dd4010b0e20c6919e1a6c27b61f8d4567befa89252055fad503d587ecb9a1e3eab1b1901f923964d7019796db810b7fd6430acb26c32866d126fd408 @@ -3290,6 +3359,16 @@ __metadata: languageName: node linkType: hard +"eslint-scope@npm:^8.0.1": + version: 8.0.1 + resolution: "eslint-scope@npm:8.0.1" + dependencies: + esrecurse: "npm:^4.3.0" + estraverse: "npm:^5.2.0" + checksum: 10/458513863d3c79005b599f40250437bddba923f18549058ea45820a8d3d4bbc67fe292751d522a0cab69dd01fe211ffde5c1a5fc867e86f2d28727b1d61610da + languageName: node + linkType: hard + "eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3": version: 3.4.3 resolution: "eslint-visitor-keys@npm:3.4.3" @@ -3297,6 +3376,13 @@ __metadata: languageName: node linkType: hard +"eslint-visitor-keys@npm:^4.0.0": + version: 4.0.0 + resolution: "eslint-visitor-keys@npm:4.0.0" + checksum: 10/c7617166e6291a15ce2982b5c4b9cdfb6409f5c14562712d12e2584480cdf18609694b21d7dad35b02df0fa2cd037505048ded54d2f405c64f600949564eb334 + languageName: node + linkType: hard + "eslint@npm:^8.57.0": version: 8.57.0 resolution: "eslint@npm:8.57.0" @@ -3345,6 +3431,61 @@ __metadata: languageName: node linkType: hard +"eslint@npm:^9.0.0": + version: 9.0.0 + resolution: "eslint@npm:9.0.0" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.2.0" + "@eslint-community/regexpp": "npm:^4.6.1" + "@eslint/eslintrc": "npm:^3.0.2" + "@eslint/js": "npm:9.0.0" + "@humanwhocodes/config-array": "npm:^0.12.3" + "@humanwhocodes/module-importer": "npm:^1.0.1" + "@nodelib/fs.walk": "npm:^1.2.8" + ajv: "npm:^6.12.4" + chalk: "npm:^4.0.0" + cross-spawn: "npm:^7.0.2" + debug: "npm:^4.3.2" + escape-string-regexp: "npm:^4.0.0" + eslint-scope: "npm:^8.0.1" + eslint-visitor-keys: "npm:^4.0.0" + espree: "npm:^10.0.1" + esquery: "npm:^1.4.2" + esutils: "npm:^2.0.2" + fast-deep-equal: "npm:^3.1.3" + file-entry-cache: "npm:^8.0.0" + find-up: "npm:^5.0.0" + glob-parent: "npm:^6.0.2" + graphemer: "npm:^1.4.0" + ignore: "npm:^5.2.0" + imurmurhash: "npm:^0.1.4" + is-glob: "npm:^4.0.0" + is-path-inside: "npm:^3.0.3" + json-stable-stringify-without-jsonify: "npm:^1.0.1" + levn: "npm:^0.4.1" + lodash.merge: "npm:^4.6.2" + minimatch: "npm:^3.1.2" + natural-compare: "npm:^1.4.0" + optionator: "npm:^0.9.3" + strip-ansi: "npm:^6.0.1" + text-table: "npm:^0.2.0" + bin: + eslint: bin/eslint.js + checksum: 10/5cf03e14eb114f95bc4e553c8ae2da65ec09d519779beb08e326d98518bce647ce9c8bf3467bcea4cab35a2657cc3a8e945717e784afa4b1bdb9d1ecd9173ba0 + languageName: node + linkType: hard + +"espree@npm:^10.0.1": + version: 10.0.1 + resolution: "espree@npm:10.0.1" + dependencies: + acorn: "npm:^8.11.3" + acorn-jsx: "npm:^5.3.2" + eslint-visitor-keys: "npm:^4.0.0" + checksum: 10/557d6cfb4894b1489effcaed8702682086033f8a2449568933bc59493734733d750f2a87907ba575844d3933340aea2d84288f5e67020c6152f6fd18a86497b2 + languageName: node + linkType: hard + "espree@npm:^9.6.0, espree@npm:^9.6.1": version: 9.6.1 resolution: "espree@npm:9.6.1" @@ -3603,6 +3744,16 @@ __metadata: languageName: node linkType: hard +"flat-cache@npm:^4.0.0": + version: 4.0.1 + resolution: "flat-cache@npm:4.0.1" + dependencies: + flatted: "npm:^3.2.9" + keyv: "npm:^4.5.4" + checksum: 10/58ce851d9045fffc7871ce2bd718bc485ad7e777bf748c054904b87c351ff1080c2c11da00788d78738bfb51b71e4d5ea12d13b98eb36e3358851ffe495b62dc + languageName: node + linkType: hard + "flatted@npm:^3.2.9": version: 3.3.1 resolution: "flatted@npm:3.3.1" @@ -3917,6 +4068,20 @@ __metadata: languageName: node linkType: hard +"globals@npm:^14.0.0": + version: 14.0.0 + resolution: "globals@npm:14.0.0" + checksum: 10/03939c8af95c6df5014b137cac83aa909090c3a3985caef06ee9a5a669790877af8698ab38007e4c0186873adc14c0b13764acc754b16a754c216cc56aa5f021 + languageName: node + linkType: hard + +"globals@npm:^15.0.0": + version: 15.0.0 + resolution: "globals@npm:15.0.0" + checksum: 10/f2f927fe457a5ed2c27b00b77ca22ec31fe5624aac2da178e228a5bcc9928df0f1853e79d6499e04283d184ea13e26cc8127e890098490c9fee616363cdf0d76 + languageName: node + linkType: hard + "globby@npm:^11.0.3, globby@npm:^11.1.0": version: 11.1.0 resolution: "globby@npm:11.1.0" @@ -4570,7 +4735,7 @@ __metadata: languageName: node linkType: hard -"keyv@npm:^4.5.3": +"keyv@npm:^4.5.3, keyv@npm:^4.5.4": version: 4.5.4 resolution: "keyv@npm:4.5.4" dependencies: From a21a59e848cf6db84b1411332e5dd69c09bcf015 Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Sun, 7 Apr 2024 12:55:09 +0200 Subject: [PATCH 02/14] chore: update code for this repository to new eslint config --- .eslintignore | 5 - .eslintrc | 23 ---- eslint.config.mjs | 31 +++++ package.json | 6 +- packages/async-queue/package.json | 2 +- packages/bitfield/package.json | 2 +- packages/cron/package.json | 2 +- packages/decorators/package.json | 2 +- packages/discord-utilities/package.json | 2 +- packages/discord.js-utilities/package.json | 2 +- packages/duration/package.json | 2 +- packages/eslint-plugin-result/package.json | 2 +- packages/event-iterator/package.json | 2 +- packages/fetch/package.json | 2 +- packages/lexure/package.json | 2 +- packages/node-utilities/package.json | 2 +- packages/phisherman/package.json | 2 +- packages/phisherman/src/lib/Phisherman.ts | 1 - packages/prettier-config/package.json | 2 +- packages/ratelimits/package.json | 2 +- packages/result/package.json | 2 +- packages/snowflake/package.json | 2 +- packages/stopwatch/package.json | 2 +- packages/time-utilities/package.json | 2 +- packages/timer-manager/package.json | 2 +- packages/timestamp/package.json | 2 +- packages/timestamp/src/lib/Timestamp.ts | 1 - packages/ts-config/package.json | 2 +- packages/utilities/package.json | 2 +- packages/utilities/src/lib/deepClone.ts | 6 +- packages/utilities/src/lib/mergeObjects.ts | 2 +- packages/utilities/src/lib/noop.ts | 1 - packages/utilities/tests/poll.test.ts | 2 +- packages/utilities/tests/pollSync.test.ts | 2 +- tsconfig.eslint.json | 1 + yarn.lock | 148 +-------------------- 36 files changed, 68 insertions(+), 207 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc create mode 100644 eslint.config.mjs diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 2bc81351b8..0000000000 --- a/.eslintignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules/ -**/dist/ -**/docs/ -**/*.d.ts -**/coverage/ diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index c15b7ef77b..0000000000 --- a/.eslintrc +++ /dev/null @@ -1,23 +0,0 @@ -{ - "extends": ["./packages/eslint-config/dist/cjs/index.cjs", "plugin:@sapphire/result/recommended"], - "overrides": [ - { - "files": ["*.test.ts"], - "rules": { - "@typescript-eslint/no-extraneous-class": "off" - } - }, - { - "files": ["packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts"], - "rules": { - "@typescript-eslint/member-ordering": "off" - } - }, - { - "files": ["packages/utilities/src/lib/omitKeysFromObject.ts"], - "rules": { - "@typescript-eslint/ban-types": "off" - } - } - ] -} diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000000..bd20dfd073 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,31 @@ +import sapphireEslintConfig from './packages/eslint-config/dist/esm/index.mjs'; + +/** + * @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigArray} + */ +const config = [ + { + ignores: ['node_modules/', '**/dist/', '**/docs/', '**/*.d.ts', '**/coverage/'] + }, + ...sapphireEslintConfig, + { + files: ['**/*.test.ts'], + rules: { + '@typescript-eslint/no-extraneous-class': 'off' + } + }, + { + files: ['**/PaginatedMessage.ts'], + rules: { + '@typescript-eslint/member-ordering': 'off' + } + }, + { + files: ['**/omitKeysFromObject.ts'], + rules: { + '@typescript-eslint/ban-types': 'off' + } + } +]; + +export default config; diff --git a/package.json b/package.json index 8ab8c5c6fb..caf4416bcb 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "scripts": { "clean": "node scripts/clean.mjs", "clean:full": "node scripts/clean-full.mjs", - "lint": "eslint packages --ext mjs,js,ts,tsx --fix", + "lint": "eslint packages --fix", "format": "prettier --ignore-path=.prettierignore --write \"packages/**/{src,tests,scripts}/**/*.{mjs,ts,js}\"", "test": "vitest run", "build": "yarn workspace @sapphire/node-utilities build && turbo run build", @@ -37,7 +37,7 @@ "cz-conventional-changelog": "^3.3.0", "discord-api-types": "^0.37.85", "discord.js": "^14.15.2", - "eslint": "^8.57.0", + "eslint": "^9.0.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.3", "lint-staged": "^15.2.5", @@ -70,7 +70,7 @@ }, "lint-staged": { "*": "prettier --ignore-unknown --write", - "*.{mjs,js,ts}": "eslint --fix --ext mjs,js,ts" + "*.{mjs,js,ts}": "eslint --fix" }, "config": { "commitizen": { diff --git a/packages/async-queue/package.json b/packages/async-queue/package.json index a9e53f3cca..c3511b44b8 100644 --- a/packages/async-queue/package.json +++ b/packages/async-queue/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/async-queue", "scripts": { "test": "vitest run", - "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src tests --fix -c ../../eslint.config.mjs", "docs": "typedoc-json-parser", "build": "tsup && yarn build:rename-cjs-index", "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", diff --git a/packages/bitfield/package.json b/packages/bitfield/package.json index 864888bc81..0fc936cf8b 100644 --- a/packages/bitfield/package.json +++ b/packages/bitfield/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/bitfield", "scripts": { "test": "vitest run", - "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src tests --fix -c ../../eslint.config.mjs", "build": "tsup && yarn build:rename-cjs-index", "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", "docs": "typedoc-json-parser", diff --git a/packages/cron/package.json b/packages/cron/package.json index 59ad40fc1a..bff42f55bd 100644 --- a/packages/cron/package.json +++ b/packages/cron/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/cron", "scripts": { "test": "vitest run", - "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src tests --fix -c ../../eslint.config.mjs", "build": "tsup && yarn build:rename-cjs-index", "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", "docs": "typedoc-json-parser", diff --git a/packages/decorators/package.json b/packages/decorators/package.json index c9b1c975f1..9b72780338 100644 --- a/packages/decorators/package.json +++ b/packages/decorators/package.json @@ -21,7 +21,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/decorators", "scripts": { "test": "vitest run", - "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src tests --fix -c ../../eslint.config.mjs", "build": "tsup && yarn build:rename-cjs-index", "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", "docs": "typedoc-json-parser", diff --git a/packages/discord-utilities/package.json b/packages/discord-utilities/package.json index ec290952b8..12e625cc4c 100644 --- a/packages/discord-utilities/package.json +++ b/packages/discord-utilities/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/discord-utilities", "scripts": { "test": "vitest run", - "lint": "eslint src --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src --fix -c ../../eslint.config.mjs", "build": "tsup && yarn build:rename-cjs-index", "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", "docs": "typedoc-json-parser", diff --git a/packages/discord.js-utilities/package.json b/packages/discord.js-utilities/package.json index 01be1724ff..7717187d7d 100644 --- a/packages/discord.js-utilities/package.json +++ b/packages/discord.js-utilities/package.json @@ -20,7 +20,7 @@ "sideEffects": false, "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/discord.js-utilities", "scripts": { - "lint": "eslint src --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src --fix -c ../../eslint.config.mjs", "build": "tsup && yarn build:types", "build:types": "concurrently \"yarn:build:types:*\"", "build:types:cjs": "rollup-type-bundler -d dist/cjs -ot .cts", diff --git a/packages/duration/package.json b/packages/duration/package.json index 77a1923619..320b0234c4 100644 --- a/packages/duration/package.json +++ b/packages/duration/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/duration", "scripts": { "test": "vitest run", - "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src tests --fix -c ../../eslint.config.mjs", "build": "tsup && yarn build:rename-cjs-index", "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", "docs": "typedoc-json-parser", diff --git a/packages/eslint-plugin-result/package.json b/packages/eslint-plugin-result/package.json index 758a173bcc..2694ea973b 100644 --- a/packages/eslint-plugin-result/package.json +++ b/packages/eslint-plugin-result/package.json @@ -18,7 +18,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/eslint-plugin-result", "scripts": { "test": "vitest run", - "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src tests --fix -c ../../eslint.config.mjs", "build": "tsup", "prepack": "yarn build", "bump": "cliff-jumper", diff --git a/packages/event-iterator/package.json b/packages/event-iterator/package.json index bbba7e5d92..8560ac25cc 100644 --- a/packages/event-iterator/package.json +++ b/packages/event-iterator/package.json @@ -21,7 +21,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/event-iterator", "scripts": { "test": "vitest run", - "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src tests --fix -c ../../eslint.config.mjs", "build": "tsup && yarn build:rename-cjs-index", "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", "docs": "typedoc-json-parser", diff --git a/packages/fetch/package.json b/packages/fetch/package.json index 0241328072..89c92fcd17 100644 --- a/packages/fetch/package.json +++ b/packages/fetch/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/fetch", "scripts": { "test": "vitest run", - "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src tests --fix -c ../../eslint.config.mjs", "build": "tsup && yarn build:rename-cjs-index", "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", "docs": "typedoc-json-parser", diff --git a/packages/lexure/package.json b/packages/lexure/package.json index a2021ab87e..33ec082c94 100644 --- a/packages/lexure/package.json +++ b/packages/lexure/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/lexure", "scripts": { "test": "vitest run", - "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src tests --fix -c ../../eslint.config.mjs", "build": "tsup && yarn build:rename-cjs-index", "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", "docs": "typedoc-json-parser", diff --git a/packages/node-utilities/package.json b/packages/node-utilities/package.json index bc42405930..faeed409d8 100644 --- a/packages/node-utilities/package.json +++ b/packages/node-utilities/package.json @@ -21,7 +21,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/utilities", "scripts": { "test": "vitest run", - "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src tests --fix -c ../../eslint.config.mjs", "build": "tsup && yarn build:rename-cjs-index", "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", "docs": "typedoc-json-parser", diff --git a/packages/phisherman/package.json b/packages/phisherman/package.json index 66bf8cec94..c9ade01d28 100644 --- a/packages/phisherman/package.json +++ b/packages/phisherman/package.json @@ -19,7 +19,7 @@ }, "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/phisherman", "scripts": { - "lint": "eslint src --ext ts --fix", + "lint": "eslint src --fix", "build": "tsup && yarn build:rename-cjs-index", "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", "docs": "typedoc-json-parser", diff --git a/packages/phisherman/src/lib/Phisherman.ts b/packages/phisherman/src/lib/Phisherman.ts index f702e87b44..2939c9ce5c 100644 --- a/packages/phisherman/src/lib/Phisherman.ts +++ b/packages/phisherman/src/lib/Phisherman.ts @@ -2,7 +2,6 @@ import { fetch, FetchMethods, FetchResultTypes, QueryError } from '@sapphire/fet import type { PhishermanInfoType, PhishermanReportType, PhishermanReturnType } from './PhishermanTypes'; import os from 'node:os'; -// eslint-disable-next-line @typescript-eslint/no-inferrable-types const packageVersion: string = '[VI]{{inject}}[/VI]'; const agent = `Sapphire Phisherman/${packageVersion} (undici) ${os.platform()}/${os.release()} (https://github.com/sapphiredev/utilities/tree/main/packages/phisherman)`; diff --git a/packages/prettier-config/package.json b/packages/prettier-config/package.json index 05e70a011c..ad30594651 100644 --- a/packages/prettier-config/package.json +++ b/packages/prettier-config/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/prettier-config", "scripts": { "test": "vitest run", - "lint": "yarn test && yarn build && eslint src tests --ext ts --fix -c ../../.eslintrc", + "lint": "yarn test && yarn build && eslint src tests --fix -c ../../eslint.config.mjs", "build": "tsc -b src", "prepack": "yarn build", "bump": "cliff-jumper", diff --git a/packages/ratelimits/package.json b/packages/ratelimits/package.json index 2108370161..971d76dc2c 100644 --- a/packages/ratelimits/package.json +++ b/packages/ratelimits/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/ratelimits", "scripts": { "test": "vitest run", - "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src tests --fix -c ../../eslint.config.mjs", "build": "tsup && yarn build:rename-cjs-index", "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", "docs": "typedoc-json-parser", diff --git a/packages/result/package.json b/packages/result/package.json index 2b49acfdb4..6e4589de9f 100644 --- a/packages/result/package.json +++ b/packages/result/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/result", "scripts": { "test": "vitest run", - "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src tests --fix -c ../../eslint.config.mjs", "build": "tsup && yarn build:rename-cjs-index", "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", "docs": "typedoc-json-parser", diff --git a/packages/snowflake/package.json b/packages/snowflake/package.json index 100661a19f..ee0921e701 100644 --- a/packages/snowflake/package.json +++ b/packages/snowflake/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/snowflake", "scripts": { "test": "vitest run", - "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src tests --fix -c ../../eslint.config.mjs", "build": "tsup && yarn build:rename-cjs-index", "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", "docs": "typedoc-json-parser", diff --git a/packages/stopwatch/package.json b/packages/stopwatch/package.json index 3924e74f61..cc3838d283 100644 --- a/packages/stopwatch/package.json +++ b/packages/stopwatch/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/stopwatch", "scripts": { "test": "vitest run", - "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src tests --fix -c ../../eslint.config.mjs", "build": "tsup && yarn build:rename-cjs-index", "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", "docs": "typedoc-json-parser", diff --git a/packages/time-utilities/package.json b/packages/time-utilities/package.json index 9c43652e0e..83eab83596 100644 --- a/packages/time-utilities/package.json +++ b/packages/time-utilities/package.json @@ -23,7 +23,7 @@ "sideEffects": false, "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/time-utilities", "scripts": { - "lint": "eslint src --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src --fix -c ../../eslint.config.mjs", "build": "tsup && yarn build:rename-cjs-index", "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", "docs": "typedoc-json-parser", diff --git a/packages/timer-manager/package.json b/packages/timer-manager/package.json index 340fb76dce..1becdca4c2 100644 --- a/packages/timer-manager/package.json +++ b/packages/timer-manager/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/timer-manager", "scripts": { "test": "vitest run", - "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src tests --fix -c ../../eslint.config.mjs", "build": "tsup && yarn build:rename-cjs-index", "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", "docs": "typedoc-json-parser", diff --git a/packages/timestamp/package.json b/packages/timestamp/package.json index 44a8c42f37..553c4a93b1 100644 --- a/packages/timestamp/package.json +++ b/packages/timestamp/package.json @@ -24,7 +24,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/timestamp", "scripts": { "test": "vitest run", - "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src tests --fix -c ../../eslint.config.mjs", "build": "tsup && yarn build:rename-cjs-index", "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", "docs": "typedoc-json-parser", diff --git a/packages/timestamp/src/lib/Timestamp.ts b/packages/timestamp/src/lib/Timestamp.ts index a6be8373b1..9de5922aae 100644 --- a/packages/timestamp/src/lib/Timestamp.ts +++ b/packages/timestamp/src/lib/Timestamp.ts @@ -110,7 +110,6 @@ const tokenResolvers = new Map([ } ] ]); -/* eslint-enable max-len */ export type TimeResolvable = Date | number | string; diff --git a/packages/ts-config/package.json b/packages/ts-config/package.json index 8f8cd113a1..e37a18a82e 100644 --- a/packages/ts-config/package.json +++ b/packages/ts-config/package.json @@ -41,7 +41,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/ts-config", "scripts": { "test": "vitest run", - "lint": "eslint tests --ext mjs,ts --fix -c ../../.eslintrc", + "lint": "eslint tests --fix -c ../../eslint.config.mjs", "build": "tsc -b tests", "bump": "cliff-jumper", "check-update": "cliff-jumper --dry-run" diff --git a/packages/utilities/package.json b/packages/utilities/package.json index f2e6815483..0bc8988ae4 100644 --- a/packages/utilities/package.json +++ b/packages/utilities/package.json @@ -12,7 +12,7 @@ "homepage": "https://github.com/sapphiredev/utilities/tree/main/packages/utilities", "scripts": { "test": "vitest run", - "lint": "eslint src tests --ext ts --fix -c ../../.eslintrc", + "lint": "eslint src tests --fix -c ../../eslint.config.mjs", "build": "tsup && run-s \"build:*\"", "build:rename-cjs-index": "yarn tsx ../../scripts/rename-cjs-index.cts", "build:dynamic-side-effects": "yarn tsx ../../scripts/dynamic-side-effects.cts utilities", diff --git a/packages/utilities/src/lib/deepClone.ts b/packages/utilities/src/lib/deepClone.ts index f82070e4c8..374edda275 100644 --- a/packages/utilities/src/lib/deepClone.ts +++ b/packages/utilities/src/lib/deepClone.ts @@ -34,7 +34,7 @@ export function deepClone(source: T): T { } if (Array.isArray(source)) { - const output = new (source.constructor as ArrayConstructor)(source.length) as unknown as T & T extends (infer S)[] ? S[] : never; + const output = new (source.constructor as ArrayConstructor)(source.length) as unknown as T extends (infer S)[] ? S[] : never; for (let i = 0; i < source.length; i++) { output[i] = deepClone(source[i]); @@ -44,7 +44,7 @@ export function deepClone(source: T): T { } if (source instanceof Map) { - const output = new (source.constructor as MapConstructor)() as unknown as T & T extends Map ? Map : never; + const output = new (source.constructor as MapConstructor)() as unknown as T extends Map ? Map : never; for (const [key, value] of source.entries()) { output.set(key, deepClone(value)); @@ -54,7 +54,7 @@ export function deepClone(source: T): T { } if (source instanceof Set) { - const output = new (source.constructor as SetConstructor)() as unknown as T & T extends Set ? Set : never; + const output = new (source.constructor as SetConstructor)() as unknown as T extends Set ? Set : never; for (const value of source.values()) { output.add(deepClone(value)); diff --git a/packages/utilities/src/lib/mergeObjects.ts b/packages/utilities/src/lib/mergeObjects.ts index 77cc9ed06b..93ee5f1ecf 100644 --- a/packages/utilities/src/lib/mergeObjects.ts +++ b/packages/utilities/src/lib/mergeObjects.ts @@ -9,7 +9,7 @@ export function mergeObjects(objTarget: A, o for (const [key, value] of Object.entries(objSource)) { const targetValue = Reflect.get(objTarget, key); if (isObject(value)) { - Reflect.set(objTarget, key, isObject(targetValue) ? mergeObjects(targetValue, value as object) : value); + Reflect.set(objTarget, key, isObject(targetValue) ? mergeObjects(targetValue, value) : value); } else if (!isObject(targetValue)) { Reflect.set(objTarget, key, value); } diff --git a/packages/utilities/src/lib/noop.ts b/packages/utilities/src/lib/noop.ts index 247aaa144b..177804c7ab 100644 --- a/packages/utilities/src/lib/noop.ts +++ b/packages/utilities/src/lib/noop.ts @@ -1,2 +1 @@ -// eslint-disable-next-line @typescript-eslint/no-empty-function export function noop() {} diff --git a/packages/utilities/tests/poll.test.ts b/packages/utilities/tests/poll.test.ts index 244346979e..f8312c4507 100644 --- a/packages/utilities/tests/poll.test.ts +++ b/packages/utilities/tests/poll.test.ts @@ -119,7 +119,7 @@ describe('poll', () => { test.each(['foo', true])('GIVEN %j THEN throws TypeError', async (waitBetweenRetries) => { const cb = vi.fn(cbRaw); const cbCondition = vi.fn(cbConditionRaw); - const result = poll(cb, cbCondition, { waitBetweenRetries: waitBetweenRetries as any }); + const result = poll(cb, cbCondition, { waitBetweenRetries }); await expect(result).rejects.toStrictEqual(new TypeError('Expected waitBetweenRetries to be a number')); expect(cb).toBeCalledTimes(0); diff --git a/packages/utilities/tests/pollSync.test.ts b/packages/utilities/tests/pollSync.test.ts index a146b4f3f7..95538733b6 100644 --- a/packages/utilities/tests/pollSync.test.ts +++ b/packages/utilities/tests/pollSync.test.ts @@ -92,7 +92,7 @@ describe('pollSync', () => { test.each(['foo', true])('GIVEN %j THEN throws TypeError', (waitBetweenRetries) => { const cb = vi.fn(cbRaw); const cbCondition = vi.fn(cbConditionRaw); - const callback = () => pollSync(cb, cbCondition, { waitBetweenRetries: waitBetweenRetries as any }); + const callback = () => pollSync(cb, cbCondition, { waitBetweenRetries }); expect(callback).toThrowError(new TypeError('Expected waitBetweenRetries to be a number')); expect(cb).toBeCalledTimes(0); diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 2d3c2f70f0..03c145f20a 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -3,6 +3,7 @@ "include": [ "vitest.config.ts", "vitest.workspace.ts", + "eslint.config.mjs", "packages/", "scripts/" ] diff --git a/yarn.lock b/yarn.lock index ff81f0093c..ce4055b613 100644 --- a/yarn.lock +++ b/yarn.lock @@ -736,23 +736,6 @@ __metadata: languageName: node linkType: hard -"@eslint/eslintrc@npm:^2.1.4": - version: 2.1.4 - resolution: "@eslint/eslintrc@npm:2.1.4" - dependencies: - ajv: "npm:^6.12.4" - debug: "npm:^4.3.2" - espree: "npm:^9.6.0" - globals: "npm:^13.19.0" - ignore: "npm:^5.2.0" - import-fresh: "npm:^3.2.1" - js-yaml: "npm:^4.1.0" - minimatch: "npm:^3.1.2" - strip-json-comments: "npm:^3.1.1" - checksum: 10/7a3b14f4b40fc1a22624c3f84d9f467a3d9ea1ca6e9a372116cb92507e485260359465b58e25bcb6c9981b155416b98c9973ad9b796053fd7b3f776a6946bce8 - languageName: node - linkType: hard - "@eslint/eslintrc@npm:^3.0.2": version: 3.0.2 resolution: "@eslint/eslintrc@npm:3.0.2" @@ -770,13 +753,6 @@ __metadata: languageName: node linkType: hard -"@eslint/js@npm:8.57.0": - version: 8.57.0 - resolution: "@eslint/js@npm:8.57.0" - checksum: 10/3c501ce8a997cf6cbbaf4ed358af5492875e3550c19b9621413b82caa9ae5382c584b0efa79835639e6e0ddaa568caf3499318e5bdab68643ef4199dce5eb0a0 - languageName: node - linkType: hard - "@eslint/js@npm:9.0.0, @eslint/js@npm:^9.0.0": version: 9.0.0 resolution: "@eslint/js@npm:9.0.0" @@ -860,17 +836,6 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.11.14": - version: 0.11.14 - resolution: "@humanwhocodes/config-array@npm:0.11.14" - dependencies: - "@humanwhocodes/object-schema": "npm:^2.0.2" - debug: "npm:^4.3.1" - minimatch: "npm:^3.0.5" - checksum: 10/3ffb24ecdfab64014a230e127118d50a1a04d11080cbb748bc21629393d100850496456bbcb4e8c438957fe0934430d731042f1264d6a167b62d32fc2863580a - languageName: node - linkType: hard - "@humanwhocodes/config-array@npm:^0.12.3": version: 0.12.3 resolution: "@humanwhocodes/config-array@npm:0.12.3" @@ -2088,7 +2053,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.11.3, acorn@npm:^8.9.0": +"acorn@npm:^8.11.3": version: 8.11.3 resolution: "acorn@npm:8.11.3" bin: @@ -3036,15 +3001,6 @@ __metadata: languageName: node linkType: hard -"doctrine@npm:^3.0.0": - version: 3.0.0 - resolution: "doctrine@npm:3.0.0" - dependencies: - esutils: "npm:^2.0.2" - checksum: 10/b4b28f1df5c563f7d876e7461254a4597b8cabe915abe94d7c5d1633fed263fcf9a85e8d3836591fc2d040108e822b0d32758e5ec1fe31c590dc7e08086e3e48 - languageName: node - linkType: hard - "dot-prop@npm:^5.1.0": version: 5.3.0 resolution: "dot-prop@npm:5.3.0" @@ -3349,16 +3305,6 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:^7.2.2": - version: 7.2.2 - resolution: "eslint-scope@npm:7.2.2" - dependencies: - esrecurse: "npm:^4.3.0" - estraverse: "npm:^5.2.0" - checksum: 10/5c660fb905d5883ad018a6fea2b49f3cb5b1cbf2cd4bd08e98646e9864f9bc2c74c0839bed2d292e90a4a328833accc197c8f0baed89cbe8d605d6f918465491 - languageName: node - linkType: hard - "eslint-scope@npm:^8.0.1": version: 8.0.1 resolution: "eslint-scope@npm:8.0.1" @@ -3369,7 +3315,7 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3": +"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1": version: 3.4.3 resolution: "eslint-visitor-keys@npm:3.4.3" checksum: 10/3f357c554a9ea794b094a09bd4187e5eacd1bc0d0653c3adeb87962c548e6a1ab8f982b86963ae1337f5d976004146536dcee5d0e2806665b193fbfbf1a9231b @@ -3383,54 +3329,6 @@ __metadata: languageName: node linkType: hard -"eslint@npm:^8.57.0": - version: 8.57.0 - resolution: "eslint@npm:8.57.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.2.0" - "@eslint-community/regexpp": "npm:^4.6.1" - "@eslint/eslintrc": "npm:^2.1.4" - "@eslint/js": "npm:8.57.0" - "@humanwhocodes/config-array": "npm:^0.11.14" - "@humanwhocodes/module-importer": "npm:^1.0.1" - "@nodelib/fs.walk": "npm:^1.2.8" - "@ungap/structured-clone": "npm:^1.2.0" - ajv: "npm:^6.12.4" - chalk: "npm:^4.0.0" - cross-spawn: "npm:^7.0.2" - debug: "npm:^4.3.2" - doctrine: "npm:^3.0.0" - escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^7.2.2" - eslint-visitor-keys: "npm:^3.4.3" - espree: "npm:^9.6.1" - esquery: "npm:^1.4.2" - esutils: "npm:^2.0.2" - fast-deep-equal: "npm:^3.1.3" - file-entry-cache: "npm:^6.0.1" - find-up: "npm:^5.0.0" - glob-parent: "npm:^6.0.2" - globals: "npm:^13.19.0" - graphemer: "npm:^1.4.0" - ignore: "npm:^5.2.0" - imurmurhash: "npm:^0.1.4" - is-glob: "npm:^4.0.0" - is-path-inside: "npm:^3.0.3" - js-yaml: "npm:^4.1.0" - json-stable-stringify-without-jsonify: "npm:^1.0.1" - levn: "npm:^0.4.1" - lodash.merge: "npm:^4.6.2" - minimatch: "npm:^3.1.2" - natural-compare: "npm:^1.4.0" - optionator: "npm:^0.9.3" - strip-ansi: "npm:^6.0.1" - text-table: "npm:^0.2.0" - bin: - eslint: bin/eslint.js - checksum: 10/00496e218b23747a7a9817bf58b522276d0dc1f2e546dceb4eea49f9871574088f72f1f069a6b560ef537efa3a75261b8ef70e51ef19033da1cc4c86a755ef15 - languageName: node - linkType: hard - "eslint@npm:^9.0.0": version: 9.0.0 resolution: "eslint@npm:9.0.0" @@ -3486,17 +3384,6 @@ __metadata: languageName: node linkType: hard -"espree@npm:^9.6.0, espree@npm:^9.6.1": - version: 9.6.1 - resolution: "espree@npm:9.6.1" - dependencies: - acorn: "npm:^8.9.0" - acorn-jsx: "npm:^5.3.2" - eslint-visitor-keys: "npm:^3.4.1" - checksum: 10/255ab260f0d711a54096bdeda93adff0eadf02a6f9b92f02b323e83a2b7fc258797919437ad331efec3930475feb0142c5ecaaf3cdab4befebd336d47d3f3134 - languageName: node - linkType: hard - "esquery@npm:^1.4.2": version: 1.5.0 resolution: "esquery@npm:1.5.0" @@ -3733,17 +3620,6 @@ __metadata: languageName: node linkType: hard -"flat-cache@npm:^3.0.4": - version: 3.2.0 - resolution: "flat-cache@npm:3.2.0" - dependencies: - flatted: "npm:^3.2.9" - keyv: "npm:^4.5.3" - rimraf: "npm:^3.0.2" - checksum: 10/02381c6ece5e9fa5b826c9bbea481d7fd77645d96e4b0b1395238124d581d10e56f17f723d897b6d133970f7a57f0fab9148cbbb67237a0a0ffe794ba60c0c70 - languageName: node - linkType: hard - "flat-cache@npm:^4.0.0": version: 4.0.1 resolution: "flat-cache@npm:4.0.1" @@ -3997,7 +3873,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:7.2.3, glob@npm:^7.1.3, glob@npm:^7.1.4": +"glob@npm:7.2.3, glob@npm:^7.1.4": version: 7.2.3 resolution: "glob@npm:7.2.3" dependencies: @@ -4059,15 +3935,6 @@ __metadata: languageName: node linkType: hard -"globals@npm:^13.19.0": - version: 13.24.0 - resolution: "globals@npm:13.24.0" - dependencies: - type-fest: "npm:^0.20.2" - checksum: 10/62c5b1997d06674fc7191d3e01e324d3eda4d65ac9cc4e78329fa3b5c4fd42a0e1c8722822497a6964eee075255ce21ccf1eec2d83f92ef3f06653af4d0ee28e - languageName: node - linkType: hard - "globals@npm:^14.0.0": version: 14.0.0 resolution: "globals@npm:14.0.0" @@ -4735,7 +4602,7 @@ __metadata: languageName: node linkType: hard -"keyv@npm:^4.5.3, keyv@npm:^4.5.4": +"keyv@npm:^4.5.4": version: 4.5.4 resolution: "keyv@npm:4.5.4" dependencies: @@ -6996,13 +6863,6 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^0.20.2": - version: 0.20.2 - resolution: "type-fest@npm:0.20.2" - checksum: 10/8907e16284b2d6cfa4f4817e93520121941baba36b39219ea36acfe64c86b9dbc10c9941af450bd60832c8f43464974d51c0957f9858bc66b952b66b6914cbb9 - languageName: node - linkType: hard - "type-fest@npm:^0.21.3": version: 0.21.3 resolution: "type-fest@npm:0.21.3" From ea428f603ed9383bc663643b41ed8f630c7ae83b Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Sun, 7 Apr 2024 14:50:46 +0200 Subject: [PATCH 03/14] feat(eslint-plugin-result)!: update to eslint v9 flat config BREAKING CHANGE: This plugin now requires eslint v9 or higher. For more information see the [eslint migration guide](https://eslint.org/blog/2024/04/eslint-v9.0.0-released) and [flat config guide](https://eslint.org/blog/2022/08/new-config-system-part-2/). The README of this package has instructions for how to use this package with the new flat config system. --- packages/eslint-plugin-result/README.md | 48 ++++++++++++----- packages/eslint-plugin-result/package.json | 31 ++++++++--- .../src/configs/recommended.ts | 11 +++- packages/eslint-plugin-result/src/index.ts | 51 +++++++++++++------ .../src/rules/no-discard-result.ts | 6 ++- .../eslint-plugin-result/src/tsconfig.json | 2 - .../tests/rules/no-discard-result.test.ts | 24 ++++++--- packages/eslint-plugin-result/tests/shared.ts | 10 ---- .../tests/vitest.setup.ts | 4 ++ packages/eslint-plugin-result/tsup.config.ts | 11 ++-- .../eslint-plugin-result/vitest.config.ts | 6 ++- 11 files changed, 141 insertions(+), 63 deletions(-) delete mode 100644 packages/eslint-plugin-result/tests/shared.ts create mode 100644 packages/eslint-plugin-result/tests/vitest.setup.ts diff --git a/packages/eslint-plugin-result/README.md b/packages/eslint-plugin-result/README.md index 1e76e66198..b5894d4b68 100644 --- a/packages/eslint-plugin-result/README.md +++ b/packages/eslint-plugin-result/README.md @@ -30,25 +30,46 @@ You can use the following command to install this package, or replace `npm insta npm install @sapphire/eslint-plugin-result ``` +It is important to note that this package only exports [ESLint Flat Config][]! This means that you _have_ to use `eslint.config.mjs` to use this package. See the ESLint documentation on flat config for more information. + ## Usage -Somewhere in your ESLint configuration: +1. Create a file `eslint.config.mjs` in the root of your project. +2. Add the following content to the file: -```json -{ - "extends": ["plugin:@sapphire/result/recommended"] -} -``` +```js +import sapphireEslintPluginResult from '@sapphire/eslint-plugin-result/recommended'; -Or +/** + * @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigArray} + */ +const config = [ + // Additional config here + sapphireEslintPluginResult + // or here +]; -```json -{ - "plugins": ["@sapphire/result"], - "rules": { - "@sapphire/result/no-discard-result": "error" +export default config; +``` + +```js +import sapphireEslintPluginResult from '@sapphire/eslint-plugin-result'; + +/** + * @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigArray} + */ +const config = [ + // Additional config here + { + plugins: { result: sapphireEslintPluginResult }, + rules: { + '@sapphire/result/no-discard-result': 'error' + } } -} + // or here +]; + +export default config; ``` ## Buy us some doughnuts @@ -75,3 +96,4 @@ Thank you to all the people who already contributed to Sapphire! [contributing]: https://github.com/sapphiredev/.github/blob/main/.github/CONTRIBUTING.md +[ESLint Flat Config]: https://eslint.org/blog/2022/08/new-config-system-part-2/ diff --git a/packages/eslint-plugin-result/package.json b/packages/eslint-plugin-result/package.json index 2694ea973b..92fce8eeef 100644 --- a/packages/eslint-plugin-result/package.json +++ b/packages/eslint-plugin-result/package.json @@ -6,12 +6,27 @@ "license": "MIT", "main": "dist/cjs/index.cjs", "module": "dist/esm/index.mjs", + "types": "dist/cjs/index.d.cts", "exports": { - "import": { - "default": "./dist/esm/index.mjs" + ".": { + "import": { + "types": "./dist/esm/index.d.mts", + "default": "./dist/esm/index.mjs" + }, + "require": { + "types": "./dist/cjs/index.d.cts", + "default": "./dist/cjs/index.cjs" + } }, - "require": { - "default": "./dist/cjs/index.cjs" + "./recommended": { + "import": { + "types": "./dist/esm/configs/recommended.d.mts", + "default": "./dist/esm/configs/recommended.mjs" + }, + "require": { + "types": "./dist/cjs/configs/recommended.d.cts", + "default": "./dist/configs/recommended.cjs" + } } }, "sideEffects": false, @@ -19,7 +34,8 @@ "scripts": { "test": "vitest run", "lint": "eslint src tests --fix -c ../../eslint.config.mjs", - "build": "tsup", + "build": "tsup && yarn build:rename-cjs-index", + "build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts", "prepack": "yarn build", "bump": "cliff-jumper", "check-update": "cliff-jumper --dry-run" @@ -33,8 +49,8 @@ "dist/" ], "engines": { - "node": ">=v14.0.0", - "npm": ">=7.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0", + "npm": ">=10.0.0" }, "keywords": [ "@sapphire/eslint-plugin-result", @@ -57,6 +73,7 @@ "@typescript-eslint/typescript-estree": "^7.10.0", "@vitest/coverage-v8": "^1.6.0", "tsup": "^8.0.2", + "tsx": "^4.7.2", "typedoc-json-parser": "^10.0.0", "vitest": "^1.6.0" }, diff --git a/packages/eslint-plugin-result/src/configs/recommended.ts b/packages/eslint-plugin-result/src/configs/recommended.ts index 809d076076..579837b5ee 100644 --- a/packages/eslint-plugin-result/src/configs/recommended.ts +++ b/packages/eslint-plugin-result/src/configs/recommended.ts @@ -1,6 +1,13 @@ -export const recommendedConfig = { - plugins: ['@sapphire/eslint-plugin-result'], +import type { TSESLint } from '@typescript-eslint/utils'; +import sapphireEslintPluginResult from '../index'; + +const recommendedConfig: TSESLint.FlatConfig.Config = { + plugins: { + result: sapphireEslintPluginResult + }, rules: { '@sapphire/result/no-discard-result': 'error' } }; + +export default recommendedConfig; diff --git a/packages/eslint-plugin-result/src/index.ts b/packages/eslint-plugin-result/src/index.ts index 5804d0c9ef..d06090b633 100644 --- a/packages/eslint-plugin-result/src/index.ts +++ b/packages/eslint-plugin-result/src/index.ts @@ -1,25 +1,46 @@ -import { recommendedConfig } from './configs/recommended'; +import recommendedConfig from './configs/recommended'; import { noDiscardResult } from './rules/no-discard-result'; +import type { TSESLint } from '@typescript-eslint/utils'; /** * ESLint plugin result for @sapphire/result package * @example - * ```json - * { - * "extends": "plugin:@sapphire/result/recommended" - * } + * file: `eslint.config.mjs` + * ```typescript + * import sapphireEslintPluginResult from '@sapphire/eslint-plugin-result/recommended'; + * + * const config = [ + * sapphireEslintPluginResult, + * ]; + * + * export default config; * ``` + * * @example - * ```json - * { - * "plugins": ["@sapphire/result"], - * "rules": { - * "@sapphire/result/no-discard-result": "error" - * } - *} - *``` + * file: `eslint.config.mjs` + * ```typescript + * import sapphireEslintPluginResult from '@sapphire/eslint-plugin-result'; + * + * const config = [ + * { + * plugins: { result: sapphireEslintPluginResult }, + * rules: { '@sapphire/result/no-discard-result': 'error' } + * }, + * ]; + * + * export default config; + * ``` + * + * Optionally, you can type the config object as + * ``` + * import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigArray + * ``` */ -const eslintPluginResult = { +const eslintPluginResult: TSESLint.FlatConfig.Plugin = { + meta: { + name: '@sapphire/eslint-plugin-result', + version: '[VI]{{inject}}[/VI]' + }, rules: { 'no-discard-result': noDiscardResult }, @@ -28,4 +49,4 @@ const eslintPluginResult = { } }; -module.exports = eslintPluginResult; +export default eslintPluginResult; diff --git a/packages/eslint-plugin-result/src/rules/no-discard-result.ts b/packages/eslint-plugin-result/src/rules/no-discard-result.ts index daff729a27..6264a51c55 100644 --- a/packages/eslint-plugin-result/src/rules/no-discard-result.ts +++ b/packages/eslint-plugin-result/src/rules/no-discard-result.ts @@ -112,7 +112,11 @@ export const noDiscardResult: RuleModule<'discardedResult', [], RuleListener> = meta: { messages, type: 'problem', - schema: [] + schema: [], + docs: { + description: 'Disallow discarding the result of a function returning a Result.', + url: 'https://github.com/sapphiredev/utilities/blob/main/packages/eslint-plugin-result/README.md' + } }, defaultOptions: [], create: (context) => { diff --git a/packages/eslint-plugin-result/src/tsconfig.json b/packages/eslint-plugin-result/src/tsconfig.json index 8bf47c0152..ad55754826 100644 --- a/packages/eslint-plugin-result/src/tsconfig.json +++ b/packages/eslint-plugin-result/src/tsconfig.json @@ -3,8 +3,6 @@ "compilerOptions": { "rootDir": "./", "outDir": "../dist", - "moduleResolution": "Node16", - "verbatimModuleSyntax": false, "incremental": false }, "include": ["."] diff --git a/packages/eslint-plugin-result/tests/rules/no-discard-result.test.ts b/packages/eslint-plugin-result/tests/rules/no-discard-result.test.ts index 2db74b2174..b55f34404e 100644 --- a/packages/eslint-plugin-result/tests/rules/no-discard-result.test.ts +++ b/packages/eslint-plugin-result/tests/rules/no-discard-result.test.ts @@ -1,7 +1,17 @@ +import { fileURLToPath } from 'url'; import { noDiscardResult } from '../../src/rules/no-discard-result'; -import { ruleTester } from '../shared'; +import { RuleTester } from '@typescript-eslint/rule-tester'; -describe.skip('ESLint plugin result', () => { +export const ruleTester = new RuleTester({ + parserOptions: { + ecmaVersion: 2020, + tsconfigRootDir: fileURLToPath(new URL('..', import.meta.url)), + project: '../tsconfig.json' + }, + parser: '@typescript-eslint/parser' +}); + +describe('ESLint plugin result', () => { ruleTester.run('no-discard-result', noDiscardResult, { valid: [ { @@ -35,7 +45,7 @@ describe.skip('ESLint plugin result', () => { { code: `import { Result } from '@sapphire/result'; function foo(): Result {} - + foo();`, name: 'simple discard', errors: [ @@ -48,7 +58,7 @@ describe.skip('ESLint plugin result', () => { { code: `import { Result } from '@sapphire/result'; async function foo(): Promise> {} - + foo();`, name: 'unawaited async function discarded', errors: [ @@ -61,7 +71,7 @@ describe.skip('ESLint plugin result', () => { { code: `import { Result } from '@sapphire/result'; async function foo(): Promise> {} - + await foo();`, name: 'awaited async function discarded', errors: [ @@ -74,7 +84,7 @@ describe.skip('ESLint plugin result', () => { { code: `import { Result } from '@sapphire/result'; function foo(): Promise> {} - + ( foo(), await foo() @@ -94,7 +104,7 @@ describe.skip('ESLint plugin result', () => { { code: `import { Result } from '@sapphire/result'; function foo(): Promise> {} - + null ?? foo(); `, name: 'potential discard (??)', diff --git a/packages/eslint-plugin-result/tests/shared.ts b/packages/eslint-plugin-result/tests/shared.ts deleted file mode 100644 index ec0ac60e7b..0000000000 --- a/packages/eslint-plugin-result/tests/shared.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { RuleTester } from '@typescript-eslint/rule-tester'; - -export const ruleTester = new RuleTester({ - parserOptions: { - ecmaVersion: 2020, - tsconfigRootDir: __dirname, - project: './tsconfig.json' - }, - parser: '@typescript-eslint/parser' -}); diff --git a/packages/eslint-plugin-result/tests/vitest.setup.ts b/packages/eslint-plugin-result/tests/vitest.setup.ts new file mode 100644 index 0000000000..9bba06e945 --- /dev/null +++ b/packages/eslint-plugin-result/tests/vitest.setup.ts @@ -0,0 +1,4 @@ +import * as vitest from 'vitest'; +import { RuleTester } from '@typescript-eslint/rule-tester'; + +RuleTester.afterAll = vitest.afterAll; diff --git a/packages/eslint-plugin-result/tsup.config.ts b/packages/eslint-plugin-result/tsup.config.ts index c0f53eb9c4..c210cc241c 100644 --- a/packages/eslint-plugin-result/tsup.config.ts +++ b/packages/eslint-plugin-result/tsup.config.ts @@ -1,13 +1,14 @@ +import { esbuildPluginVersionInjector } from 'esbuild-plugin-version-injector'; import { Options } from 'tsup'; import { createTsupConfig } from '../../scripts/tsup.config'; -const options: Options = { - sourcemap: false, - dts: false +const defaultOptions: Options = { + entry: ['src/index.ts', 'src/configs/recommended.ts'], + esbuildPlugins: [esbuildPluginVersionInjector()] }; export default createTsupConfig({ - cjsOptions: options, - esmOptions: options, + cjsOptions: defaultOptions, + esmOptions: defaultOptions, iifeOptions: { disabled: true } }); diff --git a/packages/eslint-plugin-result/vitest.config.ts b/packages/eslint-plugin-result/vitest.config.ts index 5223a8a212..3ebf142df2 100644 --- a/packages/eslint-plugin-result/vitest.config.ts +++ b/packages/eslint-plugin-result/vitest.config.ts @@ -1,3 +1,7 @@ import { createVitestConfig } from '../../scripts/vitest.config'; -export default createVitestConfig(); +export default createVitestConfig({ + test: { + setupFiles: ['./tests/vitest.setup.ts'] + } +}); From 3fa1cc7bb03f2a36e6ca2a1c405ccc99f267b80f Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Sun, 7 Apr 2024 15:06:31 +0200 Subject: [PATCH 04/14] ci: fix running linting from a clean repo --- .github/workflows/continuous-integration.yml | 17 +++++++---------- packages/ts-config/tsconfig.eslint.json | 4 ++-- turbo.json | 3 +++ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index e78b4d3f3b..19c7d4076e 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -25,16 +25,13 @@ jobs: run: yarn --immutable - name: Build ESLint, Prettier and Utilities run: | - yarn workspaces foreach \ - --all \ - --parallel \ - --include @sapphire/eslint-config \ - --include @sapphire/prettier-config \ - --include @sapphire/eslint-plugin-result \ - --include @sapphire/result \ - --include @sapphire/node-utilities \ - --include @sapphire/utilities \ - run build + yarn turbo run build \ + --filter=@sapphire/eslint-config \ + --filter=@sapphire/prettier-config \ + --filter=@sapphire/eslint-plugin-result \ + --filter=@sapphire/result \ + --filter=@sapphire/node-utilities \ + --filter=@sapphire/utilities - name: Run ESLint run: yarn lint --fix=false diff --git a/packages/ts-config/tsconfig.eslint.json b/packages/ts-config/tsconfig.eslint.json index 34354afef5..f6eae526e9 100644 --- a/packages/ts-config/tsconfig.eslint.json +++ b/packages/ts-config/tsconfig.eslint.json @@ -1,8 +1,8 @@ { - "extends": "src/tsconfig.json", + "extends": "./src/tsconfig.json", "compilerOptions": { "allowJs": true, "checkJs": true }, - "include": ["scripts", "tests"] + "include": ["src", "tests"] } diff --git a/turbo.json b/turbo.json index 80096c60e0..74b912f3ae 100644 --- a/turbo.json +++ b/turbo.json @@ -9,7 +9,10 @@ "dependsOn": [ "@sapphire/prettier-config#build", "@sapphire/eslint-config#build", + "@sapphire/eslint-plugin-result#build", "@sapphire/utilities#build", + "@sapphire/node-utilities#build", + "@sapphire/result#build", "@sapphire/duration#build" ], "outputs": [] From baebc7b9390984a49892967ce49637796d93bc22 Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Wed, 29 May 2024 00:01:46 +0200 Subject: [PATCH 05/14] chore: update deps --- package.json | 6 +- packages/eslint-config/package.json | 16 +- packages/eslint-plugin-result/package.json | 8 +- yarn.lock | 680 ++++++++++----------- 4 files changed, 350 insertions(+), 360 deletions(-) diff --git a/package.json b/package.json index caf4416bcb..807ee0ed30 100644 --- a/package.json +++ b/package.json @@ -30,14 +30,14 @@ "@types/lodash": "^4.17.4", "@types/node": "^20.12.12", "@types/ws": "^8.5.10", - "@typescript-eslint/eslint-plugin": "^7.10.0", - "@typescript-eslint/parser": "^7.10.0", + "@typescript-eslint/eslint-plugin": "^7.11.0", + "@typescript-eslint/parser": "^7.11.0", "@vitest/coverage-v8": "^1.6.0", "concurrently": "^8.2.2", "cz-conventional-changelog": "^3.3.0", "discord-api-types": "^0.37.85", "discord.js": "^14.15.2", - "eslint": "^9.0.0", + "eslint": "^9.3.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.3", "lint-staged": "^15.2.5", diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 1d39c3ceae..52ea6f1e5e 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -29,19 +29,19 @@ "check-update": "cliff-jumper --dry-run" }, "dependencies": { - "@eslint/js": "^9.0.0", + "@eslint/js": "^9.3.0", "@types/eslint-config-prettier": "^6.11.3", "@types/eslint__js": "^8.42.3", - "@typescript-eslint/eslint-plugin": "^7.10.0", - "@typescript-eslint/parser": "^7.10.0", - "@typescript-eslint/utils": "^7.5.0", - "eslint": "^9.0.0", + "@typescript-eslint/eslint-plugin": "^7.11.0", + "@typescript-eslint/parser": "^7.11.0", + "@typescript-eslint/utils": "^7.11.0", + "eslint": "^9.3.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.3", - "globals": "^15.0.0", + "globals": "^15.3.0", "prettier": "^3.2.5", "typescript": "^5.4.5", - "typescript-eslint": "^7.5.0" + "typescript-eslint": "^7.11.0" }, "repository": { "type": "git", @@ -75,7 +75,7 @@ "@favware/cliff-jumper": "^3.0.3", "@vitest/coverage-v8": "^1.6.0", "tsup": "^8.0.2", - "tsx": "^4.7.2", + "tsx": "^4.11.0", "typedoc-json-parser": "^10.0.0", "vitest": "^1.6.0" } diff --git a/packages/eslint-plugin-result/package.json b/packages/eslint-plugin-result/package.json index 92fce8eeef..6c7705889b 100644 --- a/packages/eslint-plugin-result/package.json +++ b/packages/eslint-plugin-result/package.json @@ -69,17 +69,17 @@ }, "devDependencies": { "@favware/cliff-jumper": "^3.0.3", - "@typescript-eslint/rule-tester": "^7.10.0", - "@typescript-eslint/typescript-estree": "^7.10.0", + "@typescript-eslint/rule-tester": "^7.11.0", + "@typescript-eslint/typescript-estree": "^7.11.0", "@vitest/coverage-v8": "^1.6.0", "tsup": "^8.0.2", - "tsx": "^4.7.2", + "tsx": "^4.11.0", "typedoc-json-parser": "^10.0.0", "vitest": "^1.6.0" }, "dependencies": { "@sapphire/result": "workspace:^", - "@typescript-eslint/utils": "^7.10.0", + "@typescript-eslint/utils": "^7.11.0", "tsutils": "^3.21.0", "typescript": "^5.4.5" } diff --git a/yarn.lock b/yarn.lock index ce4055b613..0ea4222444 100644 --- a/yarn.lock +++ b/yarn.lock @@ -35,68 +35,68 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.22.13": - version: 7.24.2 - resolution: "@babel/code-frame@npm:7.24.2" +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.24.2": + version: 7.24.6 + resolution: "@babel/code-frame@npm:7.24.6" dependencies: - "@babel/highlight": "npm:^7.24.2" + "@babel/highlight": "npm:^7.24.6" picocolors: "npm:^1.0.0" - checksum: 10/7db8f5b36ffa3f47a37f58f61e3d130b9ecad21961f3eede7e2a4ac2c7e4a5efb6e9d03a810c669bc986096831b6c0dfc2c3082673d93351b82359c1b03e0590 + checksum: 10/e9b70af2a9c7c734ac36c2e6e1da640a6e0a483bfba7cf620226a1226a2e6d64961324b02d786e06ce72f0aa329e190dfc49128367a2368b69e2219ffddcdcc5 languageName: node linkType: hard -"@babel/helper-string-parser@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/helper-string-parser@npm:7.24.1" - checksum: 10/04c0ede77b908b43e6124753b48bc485528112a9335f0a21a226bff1ace75bb6e64fab24c85cb4b1610ef3494dacd1cb807caeb6b79a7b36c43d48c289b35949 +"@babel/helper-string-parser@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/helper-string-parser@npm:7.24.6" + checksum: 10/a24631e13850eb24a5e88fba4d1b86115a79f6d4a0b3a96641fdcdc4a6d706d7e09f17ae77fa26bc72a8a7253bc83b535a2e2865a78185ed1f957b299ea6c59c languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.24.5": - version: 7.24.5 - resolution: "@babel/helper-validator-identifier@npm:7.24.5" - checksum: 10/38aaf6a64a0ea2e84766165b461deda3c24fd2173dff18419a2cc9e1ea1d3e709039aee94db29433a07011492717c80900a5eb564cdca7d137757c3c69e26898 +"@babel/helper-validator-identifier@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/helper-validator-identifier@npm:7.24.6" + checksum: 10/7e725ef0684291ca3306d5174a5d1cd9072ad58ba444cfa50aaf92a5c59dd723fa15031733ac598bb6b066cb62c2472e14cd82325522348977a72e99aa21b97a languageName: node linkType: hard -"@babel/highlight@npm:^7.24.2": - version: 7.24.5 - resolution: "@babel/highlight@npm:7.24.5" +"@babel/highlight@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/highlight@npm:7.24.6" dependencies: - "@babel/helper-validator-identifier": "npm:^7.24.5" + "@babel/helper-validator-identifier": "npm:^7.24.6" chalk: "npm:^2.4.2" js-tokens: "npm:^4.0.0" picocolors: "npm:^1.0.0" - checksum: 10/afde0403154ad69ecd58a98903058e776760444bf4d0363fb740a8596bc6278b72c5226637c4f6b3674d70acb1665207fe2fcecfe93a74f2f4ab033e89fd7e8c + checksum: 10/e11cd39ceb01c9b5e4f2684a45caefe7b2d7bb74997c30922e6b4063a6f16aff88356091350f0af01f044e1a198579a6b5c4161a84d0a6090e63a41167569daf languageName: node linkType: hard "@babel/parser@npm:^7.24.4": - version: 7.24.5 - resolution: "@babel/parser@npm:7.24.5" + version: 7.24.6 + resolution: "@babel/parser@npm:7.24.6" bin: parser: ./bin/babel-parser.js - checksum: 10/f5ed1c5fd4b0045a364fb906f54fd30e2fff93a45069068b6d80d3ab2b64f5569c90fb41d39aff80fb7e925ca4d44917965a76776a3ca11924ec1fae3be5d1ea + checksum: 10/48af4251d030623a8fbf22979fc718bd9dead6ba6a64cae717270c6c809faaf303d137d82593912291ee761130c4731f0c25feb54629ba3fa4edcc496690cb44 languageName: node linkType: hard "@babel/runtime@npm:^7.21.0": - version: 7.24.5 - resolution: "@babel/runtime@npm:7.24.5" + version: 7.24.6 + resolution: "@babel/runtime@npm:7.24.6" dependencies: regenerator-runtime: "npm:^0.14.0" - checksum: 10/e0f4f4d4503f7338749d1dd92361ad132d683bde64e6b61d6c855e100dcd01592295fcfdcc960c946b85ef7908dc2f501080da58447c05812cf3cd80c599bb62 + checksum: 10/6c4e12731cd9206a883c19d48fa04f6aaaf7ee83f049b22631e6521b866edc20832b4d5db30aa86d8ae799c4dcf57761fe8a4af2bf7e233245c079c1dafb5668 languageName: node linkType: hard "@babel/types@npm:^7.24.0, @babel/types@npm:^7.8.3": - version: 7.24.5 - resolution: "@babel/types@npm:7.24.5" + version: 7.24.6 + resolution: "@babel/types@npm:7.24.6" dependencies: - "@babel/helper-string-parser": "npm:^7.24.1" - "@babel/helper-validator-identifier": "npm:^7.24.5" + "@babel/helper-string-parser": "npm:^7.24.6" + "@babel/helper-validator-identifier": "npm:^7.24.6" to-fast-properties: "npm:^2.0.0" - checksum: 10/259e7512476ae64830e73f2addf143159232bcbf0eba6a6a27cab25a960cd353a11c826eb54185fdf7d8d9865922cbcd6522149e9ec55b967131193f9c9111a1 + checksum: 10/34552539cdc740513650cb3c7754f77a55cc5253dff9d45afd52292d366eb1c099939d5db066e458abcf4c9a7dedfe43467445f9c2208b3cb64866762dee5e9d languageName: node linkType: hard @@ -736,9 +736,9 @@ __metadata: languageName: node linkType: hard -"@eslint/eslintrc@npm:^3.0.2": - version: 3.0.2 - resolution: "@eslint/eslintrc@npm:3.0.2" +"@eslint/eslintrc@npm:^3.1.0": + version: 3.1.0 + resolution: "@eslint/eslintrc@npm:3.1.0" dependencies: ajv: "npm:^6.12.4" debug: "npm:^4.3.2" @@ -749,14 +749,14 @@ __metadata: js-yaml: "npm:^4.1.0" minimatch: "npm:^3.1.2" strip-json-comments: "npm:^3.1.1" - checksum: 10/04e3d7de2b16fd59ba8985ecd6922eb488e630f94e4433858567a8a6c99b478bb7b47854b166b830b44905759547d0a03654eb1265952c812d5d1d70e3e4ccf9 + checksum: 10/02bf892d1397e1029209dea685e9f4f87baf643315df2a632b5f121ec7e8548a3b34f428a007234fa82772218fa8a3ac2d10328637b9ce63b7f8344035b74db3 languageName: node linkType: hard -"@eslint/js@npm:9.0.0, @eslint/js@npm:^9.0.0": - version: 9.0.0 - resolution: "@eslint/js@npm:9.0.0" - checksum: 10/b14b20af72410ef53e3e77e7d83cc1d6e6554b0092ceb9f969d25d765f4d775b4be32b0cd99bbfd6ce72eb2e4fb6b39b42a159b31909fbe1b3a5e88d75211687 +"@eslint/js@npm:9.3.0, @eslint/js@npm:^9.3.0": + version: 9.3.0 + resolution: "@eslint/js@npm:9.3.0" + checksum: 10/3fb4b30561c34b52e7c6c6b55ea61df1cead73a525e1ccd77b1454d893dcf06f99fe9c46bf410a044ef7d3339c455bc4f75769b40c4734343f5b46d2d76b89ef languageName: node linkType: hard @@ -836,14 +836,14 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.12.3": - version: 0.12.3 - resolution: "@humanwhocodes/config-array@npm:0.12.3" +"@humanwhocodes/config-array@npm:^0.13.0": + version: 0.13.0 + resolution: "@humanwhocodes/config-array@npm:0.13.0" dependencies: "@humanwhocodes/object-schema": "npm:^2.0.3" debug: "npm:^4.3.1" minimatch: "npm:^3.0.5" - checksum: 10/b05f528c110aa1657d95d213e4ad2662f4161e838806af01a4d3f3b6ee3878d9b6f87d1b10704917f5c2f116757cb5c818480c32c4c4c6f84fe775a170b5f758 + checksum: 10/524df31e61a85392a2433bf5d03164e03da26c03d009f27852e7dcfdafbc4a23f17f021dacf88e0a7a9fe04ca032017945d19b57a16e2676d9114c22a53a9d11 languageName: node linkType: hard @@ -854,38 +854,38 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/object-schema@npm:^2.0.2": +"@humanwhocodes/object-schema@npm:^2.0.3": version: 2.0.3 resolution: "@humanwhocodes/object-schema@npm:2.0.3" checksum: 10/05bb99ed06c16408a45a833f03a732f59bf6184795d4efadd33238ff8699190a8c871ad1121241bb6501589a9598dc83bf25b99dcbcf41e155cdf36e35e937a3 languageName: node linkType: hard -"@humanwhocodes/object-schema@npm:^2.0.3": - version: 2.0.3 - resolution: "@humanwhocodes/object-schema@npm:2.0.3" - checksum: 10/05bb99ed06c16408a45a833f03a732f59bf6184795d4efadd33238ff8699190a8c871ad1121241bb6501589a9598dc83bf25b99dcbcf41e155cdf36e35e937a3 +"@humanwhocodes/retry@npm:^0.3.0": + version: 0.3.0 + resolution: "@humanwhocodes/retry@npm:0.3.0" + checksum: 10/e574bab58680867414e225c9002e9a97eb396f85871c180fbb1a9bcdf9ded4b4de0b327f7d0c43b775873362b7c92956d4b322e8bc4b90be56077524341f04b2 languageName: node linkType: hard "@inquirer/confirm@npm:^3.0.0": - version: 3.1.6 - resolution: "@inquirer/confirm@npm:3.1.6" + version: 3.1.8 + resolution: "@inquirer/confirm@npm:3.1.8" dependencies: - "@inquirer/core": "npm:^8.1.0" - "@inquirer/type": "npm:^1.3.1" - checksum: 10/471b9d3dc54575e00595d8f5b48e11948b1c2acddebd29dec00ab4c6809cb63f3409dc4372af076f223be0a64aa01b2f8270b69fc63c27614734efe873387206 + "@inquirer/core": "npm:^8.2.1" + "@inquirer/type": "npm:^1.3.2" + checksum: 10/5b3a6887eec6f16961e169c0f50430d7844906eff048cba9d5b332cfcf74004889c00ba0166339d162d4e288241037d51b54b4d91088a2e25680abae079757c8 languageName: node linkType: hard -"@inquirer/core@npm:^8.1.0": - version: 8.1.0 - resolution: "@inquirer/core@npm:8.1.0" +"@inquirer/core@npm:^8.2.1": + version: 8.2.1 + resolution: "@inquirer/core@npm:8.2.1" dependencies: - "@inquirer/figures": "npm:^1.0.1" - "@inquirer/type": "npm:^1.3.1" + "@inquirer/figures": "npm:^1.0.2" + "@inquirer/type": "npm:^1.3.2" "@types/mute-stream": "npm:^0.0.4" - "@types/node": "npm:^20.12.7" + "@types/node": "npm:^20.12.12" "@types/wrap-ansi": "npm:^3.0.0" ansi-escapes: "npm:^4.3.2" chalk: "npm:^4.1.2" @@ -895,21 +895,21 @@ __metadata: signal-exit: "npm:^4.1.0" strip-ansi: "npm:^6.0.1" wrap-ansi: "npm:^6.2.0" - checksum: 10/d467c7e163ec496b02793ce6fba5a0c9bb6fbb89de89f3c0a949cd768315ff3caed75641145ceb806a7cd90837856802909b4d5d0a252ccd99e851d4a3241504 + checksum: 10/3152286cf94f06535fc748ac1c73e9ad13c34f7c286feb171b757cc9bf24737ce83ec4ec06203ceb60bbfb853a1c356e3fb7f2af06954f54f5930de275e94968 languageName: node linkType: hard -"@inquirer/figures@npm:^1.0.1": - version: 1.0.1 - resolution: "@inquirer/figures@npm:1.0.1" - checksum: 10/ed9f23ce881e7fe7042f5f1a630d7d0febe7cce0eadc6e2eeb10238d80c4a19d03c344e980cb2e199081823fbaad42b3e1fab46ef77d3ac68e0575fc7037067a +"@inquirer/figures@npm:^1.0.2": + version: 1.0.2 + resolution: "@inquirer/figures@npm:1.0.2" + checksum: 10/70124fa1b42bab5789adfa9db21da4f2089b5958827ea979ace2df1c03737e34df2eeeec9fc133a934a3b9bcb392e842f547db35ec52e13362cb43cf0a631c86 languageName: node linkType: hard -"@inquirer/type@npm:^1.3.1": - version: 1.3.1 - resolution: "@inquirer/type@npm:1.3.1" - checksum: 10/171af2cabb1978b87138506b405ffb5a1112f09c04caa5bc32af16aafdb92db0711942f896d2670b27edf680aadc1816e46f42d95c998f5cd0f37bdc86272886 +"@inquirer/type@npm:^1.3.2": + version: 1.3.2 + resolution: "@inquirer/type@npm:1.3.2" + checksum: 10/1f252068806c000d9e8616058ba3dc4121e9bb85253dd233c6ccb99134a685d60aa9d9bc503f5034c62d2276da0f955cadc90e66128df562f2657df6de24b03a languageName: node linkType: hard @@ -1047,11 +1047,11 @@ __metadata: linkType: hard "@npmcli/fs@npm:^3.1.0": - version: 3.1.0 - resolution: "@npmcli/fs@npm:3.1.0" + version: 3.1.1 + resolution: "@npmcli/fs@npm:3.1.1" dependencies: semver: "npm:^7.3.5" - checksum: 10/f3a7ab3a31de65e42aeb6ed03ed035ef123d2de7af4deb9d4a003d27acc8618b57d9fb9d259fe6c28ca538032a028f37337264388ba27d26d37fff7dde22476e + checksum: 10/1e0e04087049b24b38bc0b30d87a9388ee3ca1d3fdfc347c2f77d84fcfe6a51f250bc57ba2c1f614d7e4285c6c62bf8c769bc19aa0949ea39e5b043ee023b0bd languageName: node linkType: hard @@ -1093,114 +1093,114 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm-eabi@npm:4.17.2": - version: 4.17.2 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.17.2" +"@rollup/rollup-android-arm-eabi@npm:4.18.0": + version: 4.18.0 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.18.0" conditions: os=android & cpu=arm languageName: node linkType: hard -"@rollup/rollup-android-arm64@npm:4.17.2": - version: 4.17.2 - resolution: "@rollup/rollup-android-arm64@npm:4.17.2" +"@rollup/rollup-android-arm64@npm:4.18.0": + version: 4.18.0 + resolution: "@rollup/rollup-android-arm64@npm:4.18.0" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-arm64@npm:4.17.2": - version: 4.17.2 - resolution: "@rollup/rollup-darwin-arm64@npm:4.17.2" +"@rollup/rollup-darwin-arm64@npm:4.18.0": + version: 4.18.0 + resolution: "@rollup/rollup-darwin-arm64@npm:4.18.0" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-x64@npm:4.17.2": - version: 4.17.2 - resolution: "@rollup/rollup-darwin-x64@npm:4.17.2" +"@rollup/rollup-darwin-x64@npm:4.18.0": + version: 4.18.0 + resolution: "@rollup/rollup-darwin-x64@npm:4.18.0" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@rollup/rollup-linux-arm-gnueabihf@npm:4.17.2": - version: 4.17.2 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.17.2" +"@rollup/rollup-linux-arm-gnueabihf@npm:4.18.0": + version: 4.18.0 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.18.0" conditions: os=linux & cpu=arm & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm-musleabihf@npm:4.17.2": - version: 4.17.2 - resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.17.2" +"@rollup/rollup-linux-arm-musleabihf@npm:4.18.0": + version: 4.18.0 + resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.18.0" conditions: os=linux & cpu=arm & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-arm64-gnu@npm:4.17.2": - version: 4.17.2 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.17.2" +"@rollup/rollup-linux-arm64-gnu@npm:4.18.0": + version: 4.18.0 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.18.0" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm64-musl@npm:4.17.2": - version: 4.17.2 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.17.2" +"@rollup/rollup-linux-arm64-musl@npm:4.18.0": + version: 4.18.0 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.18.0" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-powerpc64le-gnu@npm:4.17.2": - version: 4.17.2 - resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.17.2" +"@rollup/rollup-linux-powerpc64le-gnu@npm:4.18.0": + version: 4.18.0 + resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.18.0" conditions: os=linux & cpu=ppc64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-riscv64-gnu@npm:4.17.2": - version: 4.17.2 - resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.17.2" +"@rollup/rollup-linux-riscv64-gnu@npm:4.18.0": + version: 4.18.0 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.18.0" conditions: os=linux & cpu=riscv64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-s390x-gnu@npm:4.17.2": - version: 4.17.2 - resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.17.2" +"@rollup/rollup-linux-s390x-gnu@npm:4.18.0": + version: 4.18.0 + resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.18.0" conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-gnu@npm:4.17.2": - version: 4.17.2 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.17.2" +"@rollup/rollup-linux-x64-gnu@npm:4.18.0": + version: 4.18.0 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.18.0" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-musl@npm:4.17.2": - version: 4.17.2 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.17.2" +"@rollup/rollup-linux-x64-musl@npm:4.18.0": + version: 4.18.0 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.18.0" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-win32-arm64-msvc@npm:4.17.2": - version: 4.17.2 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.17.2" +"@rollup/rollup-win32-arm64-msvc@npm:4.18.0": + version: 4.18.0 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.18.0" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-win32-ia32-msvc@npm:4.17.2": - version: 4.17.2 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.17.2" +"@rollup/rollup-win32-ia32-msvc@npm:4.18.0": + version: 4.18.0 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.18.0" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@rollup/rollup-win32-x64-msvc@npm:4.17.2": - version: 4.17.2 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.17.2" +"@rollup/rollup-win32-x64-msvc@npm:4.18.0": + version: 4.18.0 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.18.0" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -1325,18 +1325,24 @@ __metadata: version: 0.0.0-use.local resolution: "@sapphire/eslint-config@workspace:packages/eslint-config" dependencies: + "@eslint/js": "npm:^9.3.0" "@favware/cliff-jumper": "npm:^3.0.3" - "@typescript-eslint/eslint-plugin": "npm:^7.10.0" - "@typescript-eslint/parser": "npm:^7.10.0" + "@types/eslint-config-prettier": "npm:^6.11.3" + "@types/eslint__js": "npm:^8.42.3" + "@typescript-eslint/eslint-plugin": "npm:^7.11.0" + "@typescript-eslint/parser": "npm:^7.11.0" + "@typescript-eslint/utils": "npm:^7.11.0" "@vitest/coverage-v8": "npm:^1.6.0" - eslint: "npm:^8.57.0" + eslint: "npm:^9.3.0" eslint-config-prettier: "npm:^9.1.0" eslint-plugin-prettier: "npm:^5.1.3" - globals: "npm:^15.0.0" + globals: "npm:^15.3.0" prettier: "npm:^3.2.5" tsup: "npm:^8.0.2" + tsx: "npm:^4.11.0" typedoc-json-parser: "npm:^10.0.0" typescript: "npm:^5.4.5" + typescript-eslint: "npm:^7.11.0" vitest: "npm:^1.6.0" languageName: unknown linkType: soft @@ -1347,12 +1353,13 @@ __metadata: dependencies: "@favware/cliff-jumper": "npm:^3.0.3" "@sapphire/result": "workspace:^" - "@typescript-eslint/rule-tester": "npm:^7.10.0" - "@typescript-eslint/typescript-estree": "npm:^7.10.0" - "@typescript-eslint/utils": "npm:^7.10.0" + "@typescript-eslint/rule-tester": "npm:^7.11.0" + "@typescript-eslint/typescript-estree": "npm:^7.11.0" + "@typescript-eslint/utils": "npm:^7.11.0" "@vitest/coverage-v8": "npm:^1.6.0" tsup: "npm:^8.0.2" tsutils: "npm:^3.21.0" + tsx: "npm:^4.11.0" typedoc-json-parser: "npm:^10.0.0" typescript: "npm:^5.4.5" vitest: "npm:^1.6.0" @@ -1702,12 +1709,12 @@ __metadata: linkType: hard "@types/eslint@npm:*": - version: 8.56.7 - resolution: "@types/eslint@npm:8.56.7" + version: 8.56.10 + resolution: "@types/eslint@npm:8.56.10" dependencies: "@types/estree": "npm:*" "@types/json-schema": "npm:*" - checksum: 10/4c90f30a19bc5a01b27afc4f7e3efa28d191b7c9505fd4f6373d1dcdf8e93b939628d92ae730c3ef77bf2a094622296bb307cbecbad7cb6b43ef31dd722f6944 + checksum: 10/0cdd914b944ebba51c35827d3ef95bc3e16eb82b4c2741f6437fa57cdb00a4407c77f89c220afe9e4c9566982ec8a0fb9b97c956ac3bd4623a3b6af32eed8424 languageName: node linkType: hard @@ -1738,6 +1745,13 @@ __metadata: languageName: node linkType: hard +"@types/json-schema@npm:*": + version: 7.0.15 + resolution: "@types/json-schema@npm:7.0.15" + checksum: 10/1a3c3e06236e4c4aab89499c428d585527ce50c24fe8259e8b3926d3df4cfbbbcf306cfc73ddfb66cbafc973116efd15967020b0f738f63e09e64c7d260519e7 + languageName: node + linkType: hard + "@types/lodash@npm:^4.17.4": version: 4.17.4 resolution: "@types/lodash@npm:4.17.4" @@ -1754,7 +1768,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:^20.12.12, @types/node@npm:^20.12.7": +"@types/node@npm:*, @types/node@npm:^20.12.12": version: 20.12.12 resolution: "@types/node@npm:20.12.12" dependencies: @@ -1793,15 +1807,15 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^7.10.0": - version: 7.10.0 - resolution: "@typescript-eslint/eslint-plugin@npm:7.10.0" +"@typescript-eslint/eslint-plugin@npm:7.11.0, @typescript-eslint/eslint-plugin@npm:^7.11.0": + version: 7.11.0 + resolution: "@typescript-eslint/eslint-plugin@npm:7.11.0" dependencies: "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:7.10.0" - "@typescript-eslint/type-utils": "npm:7.10.0" - "@typescript-eslint/utils": "npm:7.10.0" - "@typescript-eslint/visitor-keys": "npm:7.10.0" + "@typescript-eslint/scope-manager": "npm:7.11.0" + "@typescript-eslint/type-utils": "npm:7.11.0" + "@typescript-eslint/utils": "npm:7.11.0" + "@typescript-eslint/visitor-keys": "npm:7.11.0" graphemer: "npm:^1.4.0" ignore: "npm:^5.3.1" natural-compare: "npm:^1.4.0" @@ -1812,60 +1826,60 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/dfe505cdf718dd29e8637b902e4c544c6b7d246d2051fd1936090423eb3dadfe2bd757de51e565e6fd80e74cf1918e191c26fee6df515100484ec3efd9b8d111 + checksum: 10/be95ed0bbd5b34c47239677ea39d531bcd8a18717a67d70a297bed5b0050b256159856bb9c1e894ac550d011c24bb5b4abf8056c5d70d0d5895f0cc1accd14ea languageName: node linkType: hard -"@typescript-eslint/parser@npm:^7.10.0": - version: 7.10.0 - resolution: "@typescript-eslint/parser@npm:7.10.0" +"@typescript-eslint/parser@npm:7.11.0, @typescript-eslint/parser@npm:^7.11.0": + version: 7.11.0 + resolution: "@typescript-eslint/parser@npm:7.11.0" dependencies: - "@typescript-eslint/scope-manager": "npm:7.10.0" - "@typescript-eslint/types": "npm:7.10.0" - "@typescript-eslint/typescript-estree": "npm:7.10.0" - "@typescript-eslint/visitor-keys": "npm:7.10.0" + "@typescript-eslint/scope-manager": "npm:7.11.0" + "@typescript-eslint/types": "npm:7.11.0" + "@typescript-eslint/typescript-estree": "npm:7.11.0" + "@typescript-eslint/visitor-keys": "npm:7.11.0" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.56.0 peerDependenciesMeta: typescript: optional: true - checksum: 10/1fa71049b2debf2f7f5366fb433e3d4c8e1591c2061a15fa8797d14623a2b6984340a59e7717acc013ce8c6a2ed32c5c0e811fe948b5936d41c2a5a09b61d130 + checksum: 10/0a32417aec62d7de04427323ab3fc8159f9f02429b24f739d8748e8b54fc65b0e3dbae8e4779c4b795f0d8e5f98a4d83a43b37ea0f50ebda51546cdcecf73caa languageName: node linkType: hard -"@typescript-eslint/rule-tester@npm:^7.10.0": - version: 7.10.0 - resolution: "@typescript-eslint/rule-tester@npm:7.10.0" +"@typescript-eslint/rule-tester@npm:^7.11.0": + version: 7.11.0 + resolution: "@typescript-eslint/rule-tester@npm:7.11.0" dependencies: - "@typescript-eslint/typescript-estree": "npm:7.10.0" - "@typescript-eslint/utils": "npm:7.10.0" + "@typescript-eslint/typescript-estree": "npm:7.11.0" + "@typescript-eslint/utils": "npm:7.11.0" ajv: "npm:^6.12.6" lodash.merge: "npm:4.6.2" semver: "npm:^7.6.0" peerDependencies: "@eslint/eslintrc": ">=2" eslint: ^8.56.0 - checksum: 10/abd5c7a68161a8fa013527bec37f6ce3f9f69d48a380ca957b16e7c67aed82a0c1d8491ebd64d6b83ee3912aedf37cc5875334c3d553180fea80d969ac2b6392 + checksum: 10/411a8d2d0f0fce0bcfba7c0e351aa1e302156f9ae5ac16b8a2abdc45f8c1bdfbb5dd444c2c99a74215d1e1b8d6a4eb60e5a86767887e95edd1cb5b4e63b04ff2 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:7.10.0": - version: 7.10.0 - resolution: "@typescript-eslint/scope-manager@npm:7.10.0" +"@typescript-eslint/scope-manager@npm:7.11.0": + version: 7.11.0 + resolution: "@typescript-eslint/scope-manager@npm:7.11.0" dependencies: - "@typescript-eslint/types": "npm:7.10.0" - "@typescript-eslint/visitor-keys": "npm:7.10.0" - checksum: 10/838a7a9573577d830b2f65801ce045abe6fad08ac7e04bac4cc9b2e5b7cbac07e645de9c79b9485f4cc361fe25da5319025aa0336fad618023fff62e4e980638 + "@typescript-eslint/types": "npm:7.11.0" + "@typescript-eslint/visitor-keys": "npm:7.11.0" + checksum: 10/79eff310405c6657ff092641e3ad51c6698c6708b915ecef945ebdd1737bd48e1458c5575836619f42dec06143ec0e3a826f3e551af590d297367da3d08f329e languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:7.10.0": - version: 7.10.0 - resolution: "@typescript-eslint/type-utils@npm:7.10.0" +"@typescript-eslint/type-utils@npm:7.11.0": + version: 7.11.0 + resolution: "@typescript-eslint/type-utils@npm:7.11.0" dependencies: - "@typescript-eslint/typescript-estree": "npm:7.10.0" - "@typescript-eslint/utils": "npm:7.10.0" + "@typescript-eslint/typescript-estree": "npm:7.11.0" + "@typescript-eslint/utils": "npm:7.11.0" debug: "npm:^4.3.4" ts-api-utils: "npm:^1.3.0" peerDependencies: @@ -1873,23 +1887,23 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/e62db9ffbfbccce60258108f7ed025005e04df18da897ff1b30049e3c10a47150e94c2fb5ac0ab9711ebb60517521213dcccbea6d08125107a87a67088a79042 + checksum: 10/ab6ebeff68a60fc40d0ace88e03d6b4242b8f8fe2fa300db161780d58777b57f69fa077cd482e1b673316559459bd20b8cc89a7f9f30e644bfed8293f77f0e4b languageName: node linkType: hard -"@typescript-eslint/types@npm:7.10.0": - version: 7.10.0 - resolution: "@typescript-eslint/types@npm:7.10.0" - checksum: 10/76075a7b87ddfff8e7e4aebf3d225e67bf79ead12a7709999d4d5c31611d9c0813ca69a9298f320efb018fe493ce3763c964a0e670a4c953d8eff000f10672c0 +"@typescript-eslint/types@npm:7.11.0": + version: 7.11.0 + resolution: "@typescript-eslint/types@npm:7.11.0" + checksum: 10/c6a0b47ef43649a59c9d51edfc61e367b55e519376209806b1c98385a8385b529e852c7a57e081fb15ef6a5dc0fc8e90bd5a508399f5ac2137f4d462e89cdc30 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:7.10.0, @typescript-eslint/typescript-estree@npm:^7.10.0": - version: 7.10.0 - resolution: "@typescript-eslint/typescript-estree@npm:7.10.0" +"@typescript-eslint/typescript-estree@npm:7.11.0, @typescript-eslint/typescript-estree@npm:^7.11.0": + version: 7.11.0 + resolution: "@typescript-eslint/typescript-estree@npm:7.11.0" dependencies: - "@typescript-eslint/types": "npm:7.10.0" - "@typescript-eslint/visitor-keys": "npm:7.10.0" + "@typescript-eslint/types": "npm:7.11.0" + "@typescript-eslint/visitor-keys": "npm:7.11.0" debug: "npm:^4.3.4" globby: "npm:^11.1.0" is-glob: "npm:^4.0.3" @@ -1899,38 +1913,31 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/d11d0c45749c9bd4a187b6dfdf5600e36ba8c87667cd2020d9158667c47c32ec0bcb1ef3b7eee5577b667def5f7f33d8131092a0f221b3d3e8105078800f923f + checksum: 10/b98b101e42d3b91003510a5c5a83f4350b6c1cf699bf2e409717660579ffa71682bc280c4f40166265c03f9546ed4faedc3723e143f1ab0ed7f5990cc3dff0ae languageName: node linkType: hard -"@typescript-eslint/utils@npm:7.10.0, @typescript-eslint/utils@npm:^7.10.0": - version: 7.10.0 - resolution: "@typescript-eslint/utils@npm:7.10.0" +"@typescript-eslint/utils@npm:7.11.0, @typescript-eslint/utils@npm:^7.11.0": + version: 7.11.0 + resolution: "@typescript-eslint/utils@npm:7.11.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:7.10.0" - "@typescript-eslint/types": "npm:7.10.0" - "@typescript-eslint/typescript-estree": "npm:7.10.0" + "@typescript-eslint/scope-manager": "npm:7.11.0" + "@typescript-eslint/types": "npm:7.11.0" + "@typescript-eslint/typescript-estree": "npm:7.11.0" peerDependencies: eslint: ^8.56.0 - checksum: 10/62327b585295f9c3aa2508aefac639d562b6f7f270a229aa3a2af8dbd055f4a4d230a8facae75a8a53bb8222b0041162072d259add56b541f8bdfda8da36ea5f + checksum: 10/fbef14e166a70ccc4527c0731e0338acefa28218d1a018aa3f5b6b1ad9d75c56278d5f20bda97cf77da13e0a67c4f3e579c5b2f1c2e24d676960927921b55851 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:7.10.0": - version: 7.10.0 - resolution: "@typescript-eslint/visitor-keys@npm:7.10.0" +"@typescript-eslint/visitor-keys@npm:7.11.0": + version: 7.11.0 + resolution: "@typescript-eslint/visitor-keys@npm:7.11.0" dependencies: - "@typescript-eslint/types": "npm:7.10.0" + "@typescript-eslint/types": "npm:7.11.0" eslint-visitor-keys: "npm:^3.4.3" - checksum: 10/44b555a075bdff38e3e13c454ceaac50aa2546635e81f907d1ea84822c8887487d1d6bb4ff690f627da9585dc19ad07e228847c162c30bb06c46fb119899d8cc - languageName: node - linkType: hard - -"@ungap/structured-clone@npm:^1.2.0": - version: 1.2.0 - resolution: "@ungap/structured-clone@npm:1.2.0" - checksum: 10/c6fe89a505e513a7592e1438280db1c075764793a2397877ff1351721fe8792a966a5359769e30242b3cd023f2efb9e63ca2ca88019d73b564488cc20e3eab12 + checksum: 10/1f2cf1214638e9e78e052393c9e24295196ec4781b05951659a3997e33f8699a760ea3705c17d770e10eda2067435199e0136ab09e5fac63869e22f2da184d89 languageName: node linkType: hard @@ -2112,14 +2119,14 @@ __metadata: linkType: hard "ajv@npm:^8.11.0": - version: 8.13.0 - resolution: "ajv@npm:8.13.0" + version: 8.14.0 + resolution: "ajv@npm:8.14.0" dependencies: fast-deep-equal: "npm:^3.1.3" json-schema-traverse: "npm:^1.0.0" require-from-string: "npm:^2.0.2" uri-js: "npm:^4.4.1" - checksum: 10/4ada268c9a6e44be87fd295df0f0a91267a7bae8dbc8a67a2d5799c3cb459232839c99d18b035597bb6e3ffe88af6979f7daece854f590a81ebbbc2dfa80002c + checksum: 10/b6430527c2e1bf3d20dce4cca2979b5cc69db15751ac00105e269e04d7b09c2e20364070257cafacfa676171a8bf9c84c1cd9def97267a20cd15c64daa486151 languageName: node linkType: hard @@ -2314,15 +2321,6 @@ __metadata: languageName: node linkType: hard -"builtins@npm:^5.0.0": - version: 5.1.0 - resolution: "builtins@npm:5.1.0" - dependencies: - semver: "npm:^7.0.0" - checksum: 10/60aa9969f69656bf6eab82cd74b23ab805f112ae46a54b912bccc1533875760f2d2ce95e0a7d13144e35ada9f0386f17ed4961908bc9434b5a5e21375b1902b2 - languageName: node - linkType: hard - "bundle-require@npm:^4.0.0": version: 4.1.0 resolution: "bundle-require@npm:4.1.0" @@ -2975,9 +2973,9 @@ __metadata: linkType: hard "discord-api-types@npm:^0.37.85": - version: 0.37.85 - resolution: "discord-api-types@npm:0.37.85" - checksum: 10/0d00eebfff679417b2d22d6ffdc7ecdfcac53714c4efef6356fdd5d9748e8f94f5595af8c0b397b965695ac3a9181cb2604808a3685c6ed01782aa6d6e519bb1 + version: 0.37.86 + resolution: "discord-api-types@npm:0.37.86" + checksum: 10/d33728147bd071f52c4c7a5dde7fbf637dafbc8319c9f234a5c6b73bba0f196449e22390aa3a7fb805ce8def58d36def304b0fdeb42c79574ce16852da7ec2a3 languageName: node linkType: hard @@ -3315,7 +3313,7 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1": +"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.3": version: 3.4.3 resolution: "eslint-visitor-keys@npm:3.4.3" checksum: 10/3f357c554a9ea794b094a09bd4187e5eacd1bc0d0653c3adeb87962c548e6a1ab8f982b86963ae1337f5d976004146536dcee5d0e2806665b193fbfbf1a9231b @@ -3329,16 +3327,17 @@ __metadata: languageName: node linkType: hard -"eslint@npm:^9.0.0": - version: 9.0.0 - resolution: "eslint@npm:9.0.0" +"eslint@npm:^9.3.0": + version: 9.3.0 + resolution: "eslint@npm:9.3.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.2.0" "@eslint-community/regexpp": "npm:^4.6.1" - "@eslint/eslintrc": "npm:^3.0.2" - "@eslint/js": "npm:9.0.0" - "@humanwhocodes/config-array": "npm:^0.12.3" + "@eslint/eslintrc": "npm:^3.1.0" + "@eslint/js": "npm:9.3.0" + "@humanwhocodes/config-array": "npm:^0.13.0" "@humanwhocodes/module-importer": "npm:^1.0.1" + "@humanwhocodes/retry": "npm:^0.3.0" "@nodelib/fs.walk": "npm:^1.2.8" ajv: "npm:^6.12.4" chalk: "npm:^4.0.0" @@ -3354,7 +3353,6 @@ __metadata: file-entry-cache: "npm:^8.0.0" find-up: "npm:^5.0.0" glob-parent: "npm:^6.0.2" - graphemer: "npm:^1.4.0" ignore: "npm:^5.2.0" imurmurhash: "npm:^0.1.4" is-glob: "npm:^4.0.0" @@ -3369,7 +3367,7 @@ __metadata: text-table: "npm:^0.2.0" bin: eslint: bin/eslint.js - checksum: 10/5cf03e14eb114f95bc4e553c8ae2da65ec09d519779beb08e326d98518bce647ce9c8bf3467bcea4cab35a2657cc3a8e945717e784afa4b1bdb9d1ecd9173ba0 + checksum: 10/c56d63bc3655ce26456cb1b6869eb16579d9b243f143374ce28e4e168ab8fd9d054700014af903b6a5445a9134108327d974ba3e75019220f62df6ce72b6f5b6 languageName: node linkType: hard @@ -3552,12 +3550,12 @@ __metadata: languageName: node linkType: hard -"file-entry-cache@npm:^6.0.1": - version: 6.0.1 - resolution: "file-entry-cache@npm:6.0.1" +"file-entry-cache@npm:^8.0.0": + version: 8.0.0 + resolution: "file-entry-cache@npm:8.0.0" dependencies: - flat-cache: "npm:^3.0.4" - checksum: 10/099bb9d4ab332cb93c48b14807a6918a1da87c45dce91d4b61fd40e6505d56d0697da060cb901c729c90487067d93c9243f5da3dc9c41f0358483bfdebca736b + flat-cache: "npm:^4.0.0" + checksum: 10/afe55c4de4e0d226a23c1eae62a7219aafb390859122608a89fa4df6addf55c7fd3f1a2da6f5b41e7cdff496e4cf28bbd215d53eab5c817afa96d2b40c81bfb0 languageName: node linkType: hard @@ -3758,59 +3756,59 @@ __metadata: languageName: node linkType: hard -"git-cliff-darwin-arm64@npm:2.2.1": - version: 2.2.1 - resolution: "git-cliff-darwin-arm64@npm:2.2.1" +"git-cliff-darwin-arm64@npm:2.2.2": + version: 2.2.2 + resolution: "git-cliff-darwin-arm64@npm:2.2.2" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"git-cliff-darwin-x64@npm:2.2.1": - version: 2.2.1 - resolution: "git-cliff-darwin-x64@npm:2.2.1" +"git-cliff-darwin-x64@npm:2.2.2": + version: 2.2.2 + resolution: "git-cliff-darwin-x64@npm:2.2.2" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"git-cliff-linux-arm64@npm:2.2.1": - version: 2.2.1 - resolution: "git-cliff-linux-arm64@npm:2.2.1" +"git-cliff-linux-arm64@npm:2.2.2": + version: 2.2.2 + resolution: "git-cliff-linux-arm64@npm:2.2.2" conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"git-cliff-linux-x64@npm:2.2.1": - version: 2.2.1 - resolution: "git-cliff-linux-x64@npm:2.2.1" +"git-cliff-linux-x64@npm:2.2.2": + version: 2.2.2 + resolution: "git-cliff-linux-x64@npm:2.2.2" conditions: os=linux & cpu=x64 languageName: node linkType: hard -"git-cliff-windows-arm64@npm:2.2.1": - version: 2.2.1 - resolution: "git-cliff-windows-arm64@npm:2.2.1" +"git-cliff-windows-arm64@npm:2.2.2": + version: 2.2.2 + resolution: "git-cliff-windows-arm64@npm:2.2.2" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"git-cliff-windows-x64@npm:2.2.1": - version: 2.2.1 - resolution: "git-cliff-windows-x64@npm:2.2.1" +"git-cliff-windows-x64@npm:2.2.2": + version: 2.2.2 + resolution: "git-cliff-windows-x64@npm:2.2.2" conditions: os=win32 & cpu=x64 languageName: node linkType: hard "git-cliff@npm:^2.2.1": - version: 2.2.1 - resolution: "git-cliff@npm:2.2.1" + version: 2.2.2 + resolution: "git-cliff@npm:2.2.2" dependencies: execa: "npm:^8.0.1" - git-cliff-darwin-arm64: "npm:2.2.1" - git-cliff-darwin-x64: "npm:2.2.1" - git-cliff-linux-arm64: "npm:2.2.1" - git-cliff-linux-x64: "npm:2.2.1" - git-cliff-windows-arm64: "npm:2.2.1" - git-cliff-windows-x64: "npm:2.2.1" + git-cliff-darwin-arm64: "npm:2.2.2" + git-cliff-darwin-x64: "npm:2.2.2" + git-cliff-linux-arm64: "npm:2.2.2" + git-cliff-linux-x64: "npm:2.2.2" + git-cliff-windows-arm64: "npm:2.2.2" + git-cliff-windows-x64: "npm:2.2.2" dependenciesMeta: git-cliff-darwin-arm64: optional: true @@ -3826,7 +3824,7 @@ __metadata: optional: true bin: git-cliff: lib/cli/cli.js - checksum: 10/c69a790137a058b46c7f09da736150d74ee52e6c72050fa4226bf80d9f6154d2dbb8169175610271ec9da26e2ef4b5090928bcab2e0150f58ac4446abb6ff331 + checksum: 10/9d3ba4d9f85ba41c7429fdf558fb0c4c616c4fc34369d89687753e16d4d4b2aa003533ec058dc5b9d12fe2a27ecad1e0f05c6a12c1f803bcef20407ad33d9eea languageName: node linkType: hard @@ -3888,17 +3886,17 @@ __metadata: linkType: hard "glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7": - version: 10.3.12 - resolution: "glob@npm:10.3.12" + version: 10.4.1 + resolution: "glob@npm:10.4.1" dependencies: foreground-child: "npm:^3.1.0" - jackspeak: "npm:^2.3.6" - minimatch: "npm:^9.0.1" - minipass: "npm:^7.0.4" - path-scurry: "npm:^1.10.2" + jackspeak: "npm:^3.1.2" + minimatch: "npm:^9.0.4" + minipass: "npm:^7.1.2" + path-scurry: "npm:^1.11.1" bin: glob: dist/esm/bin.mjs - checksum: 10/9e8186abc22dc824b5dd86cefd8e6b5621a72d1be7f68bacc0fd681e8c162ec5546660a6ec0553d6a74757a585e655956c7f8f1a6d24570e8d865c307323d178 + checksum: 10/d7bb49d2b413f77bdd59fea4ca86dcc12450deee221af0ca93e09534b81b9ef68fe341345751d8ff0c5b54bad422307e0e44266ff8ad7fbbd0c200e8ec258b16 languageName: node linkType: hard @@ -3942,10 +3940,10 @@ __metadata: languageName: node linkType: hard -"globals@npm:^15.0.0": - version: 15.0.0 - resolution: "globals@npm:15.0.0" - checksum: 10/f2f927fe457a5ed2c27b00b77ca22ec31fe5624aac2da178e228a5bcc9928df0f1853e79d6499e04283d184ea13e26cc8127e890098490c9fee616363cdf0d76 +"globals@npm:^15.3.0": + version: 15.3.0 + resolution: "globals@npm:15.3.0" + checksum: 10/ad4e845884e045d211fd7c4511f51a3484d6db8438d7a8ec9366919771f802596964aaa514f2561bd375ee7d0d57e83a056ef50996eee5a676400534c75e4d06 languageName: node linkType: hard @@ -4438,16 +4436,16 @@ __metadata: languageName: node linkType: hard -"jackspeak@npm:^2.3.6": - version: 2.3.6 - resolution: "jackspeak@npm:2.3.6" +"jackspeak@npm:^3.1.2": + version: 3.1.2 + resolution: "jackspeak@npm:3.1.2" dependencies: "@isaacs/cliui": "npm:^8.0.2" "@pkgjs/parseargs": "npm:^0.11.0" dependenciesMeta: "@pkgjs/parseargs": optional: true - checksum: 10/6e6490d676af8c94a7b5b29b8fd5629f21346911ebe2e32931c2a54210134408171c24cee1a109df2ec19894ad04a429402a8438cbf5cc2794585d35428ace76 + checksum: 10/7e6b94103e5fea5e6311aacf45fe80e98583df55c39b9d8478dd0ce02f1f8f0a11fc419311c277aca959b95635ec9a6be97445a31794254946c679dd0a19f007 languageName: node linkType: hard @@ -4834,15 +4832,6 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^6.0.0": - version: 6.0.0 - resolution: "lru-cache@npm:6.0.0" - dependencies: - yallist: "npm:^4.0.0" - checksum: 10/fc1fe2ee205f7c8855fa0f34c1ab0bcf14b6229e35579ec1fd1079f31d6fc8ef8eb6fd17f2f4d99788d7e339f50e047555551ebd5e434dda503696e7c6591825 - languageName: node - linkType: hard - "lru-cache@npm:^7.5.1, lru-cache@npm:^7.7.1": version: 7.18.3 resolution: "lru-cache@npm:7.18.3" @@ -4864,7 +4853,7 @@ __metadata: languageName: node linkType: hard -"magic-string@npm:^0.30.4, magic-string@npm:^0.30.5": +"magic-string@npm:^0.30.10, magic-string@npm:^0.30.5": version: 0.30.10 resolution: "magic-string@npm:0.30.10" dependencies: @@ -5029,7 +5018,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.0, minimatch@npm:^9.0.1, minimatch@npm:^9.0.3, minimatch@npm:^9.0.4": +"minimatch@npm:^9.0.0, minimatch@npm:^9.0.3, minimatch@npm:^9.0.4": version: 9.0.4 resolution: "minimatch@npm:9.0.4" dependencies: @@ -5131,10 +5120,10 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.0.4": - version: 7.1.0 - resolution: "minipass@npm:7.1.0" - checksum: 10/0cfc1bc95bfce2a0cf69fcb5e7b92f62ee7159f2787356e66b5804dba73546e1653bbc70bf9bb32acb031e6d0d4b6249628a014644a597a7e4a14b441a510ba5 +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 10/c25f0ee8196d8e6036661104bacd743785b2599a21de5c516b32b3fa2b83113ac89a2358465bc04956baab37ffb956ae43be679b2262bf7be15fce467ccd7950 languageName: node linkType: hard @@ -5157,7 +5146,7 @@ __metadata: languageName: node linkType: hard -"mlly@npm:^1.4.2, mlly@npm:^1.6.1": +"mlly@npm:^1.4.2, mlly@npm:^1.7.0": version: 1.7.0 resolution: "mlly@npm:1.7.0" dependencies: @@ -5599,13 +5588,13 @@ __metadata: languageName: node linkType: hard -"path-scurry@npm:^1.10.2": - version: 1.10.2 - resolution: "path-scurry@npm:1.10.2" +"path-scurry@npm:^1.11.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" dependencies: lru-cache: "npm:^10.2.0" minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - checksum: 10/a2bbbe8dc284c49dd9be78ca25f3a8b89300e0acc24a77e6c74824d353ef50efbf163e64a69f4330b301afca42d0e2229be0560d6d616ac4e99d48b4062016b1 + checksum: 10/5e8845c159261adda6f09814d7725683257fcc85a18f329880ab4d7cc1d12830967eae5d5894e453f341710d5484b8fdbbd4d75181b4d6e1eb2f4dc7aeadc434 languageName: node linkType: hard @@ -5638,9 +5627,9 @@ __metadata: linkType: hard "picocolors@npm:^1.0.0": - version: 1.0.0 - resolution: "picocolors@npm:1.0.0" - checksum: 10/a2e8092dd86c8396bdba9f2b5481032848525b3dc295ce9b57896f931e63fc16f79805144321f72976383fc249584672a75cc18d6777c6b757603f372f745981 + version: 1.0.1 + resolution: "picocolors@npm:1.0.1" + checksum: 10/fa68166d1f56009fc02a34cdfd112b0dd3cf1ef57667ac57281f714065558c01828cdf4f18600ad6851cbe0093952ed0660b1e0156bddf2184b6aaf5817553a5 languageName: node linkType: hard @@ -5668,13 +5657,13 @@ __metadata: linkType: hard "pkg-types@npm:^1.0.3, pkg-types@npm:^1.1.0": - version: 1.1.0 - resolution: "pkg-types@npm:1.1.0" + version: 1.1.1 + resolution: "pkg-types@npm:1.1.1" dependencies: confbox: "npm:^0.1.7" - mlly: "npm:^1.6.1" + mlly: "npm:^1.7.0" pathe: "npm:^1.1.2" - checksum: 10/c1e32a54a1ae00205eb769f6cdae1f0ed4389c785963875b2d53ce7445ac8f762d0e837a84b1ab802375f1f8f7fd0639ceaf81fc9bb9be84c360a3a9ddbddbae + checksum: 10/225eaf7c0339027e176dd0d34a6d9a1384c21e0aab295e57dfbef1f1b7fc132f008671da7e67553e352b80b17ba38c531c720c914061d277410eef1bdd9d9608 languageName: node linkType: hard @@ -5932,17 +5921,6 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^3.0.2": - version: 3.0.2 - resolution: "rimraf@npm:3.0.2" - dependencies: - glob: "npm:^7.1.3" - bin: - rimraf: bin.js - checksum: 10/063ffaccaaaca2cfd0ef3beafb12d6a03dd7ff1260d752d62a6077b5dfff6ae81bea571f655bb6b589d366930ec1bdd285d40d560c0dae9b12f125e54eb743d5 - languageName: node - linkType: hard - "rimraf@npm:^5.0.7": version: 5.0.7 resolution: "rimraf@npm:5.0.7" @@ -5955,41 +5933,41 @@ __metadata: linkType: hard "rollup-plugin-dts@npm:^6.1.0": - version: 6.1.0 - resolution: "rollup-plugin-dts@npm:6.1.0" + version: 6.1.1 + resolution: "rollup-plugin-dts@npm:6.1.1" dependencies: - "@babel/code-frame": "npm:^7.22.13" - magic-string: "npm:^0.30.4" + "@babel/code-frame": "npm:^7.24.2" + magic-string: "npm:^0.30.10" peerDependencies: rollup: ^3.29.4 || ^4 typescript: ^4.5 || ^5.0 dependenciesMeta: "@babel/code-frame": optional: true - checksum: 10/2ecbda8eb0644ce98ee3a795bf5b99368d80e357972c227b07c382c4af34e03fe681c0f6674e1967330b69e79f2ddf288a672f8964441d5f98e9998c50f41a01 + checksum: 10/8a66833a5af32f77d9bbc746339097d4af2382e5160f7629d85dcecb4efad12cbfebd37c79147fa688f073c333d71f53135e08a225a3fc3e9a3b3f92c46b2381 languageName: node linkType: hard "rollup@npm:^4.0.2, rollup@npm:^4.13.0, rollup@npm:^4.9.5": - version: 4.17.2 - resolution: "rollup@npm:4.17.2" - dependencies: - "@rollup/rollup-android-arm-eabi": "npm:4.17.2" - "@rollup/rollup-android-arm64": "npm:4.17.2" - "@rollup/rollup-darwin-arm64": "npm:4.17.2" - "@rollup/rollup-darwin-x64": "npm:4.17.2" - "@rollup/rollup-linux-arm-gnueabihf": "npm:4.17.2" - "@rollup/rollup-linux-arm-musleabihf": "npm:4.17.2" - "@rollup/rollup-linux-arm64-gnu": "npm:4.17.2" - "@rollup/rollup-linux-arm64-musl": "npm:4.17.2" - "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.17.2" - "@rollup/rollup-linux-riscv64-gnu": "npm:4.17.2" - "@rollup/rollup-linux-s390x-gnu": "npm:4.17.2" - "@rollup/rollup-linux-x64-gnu": "npm:4.17.2" - "@rollup/rollup-linux-x64-musl": "npm:4.17.2" - "@rollup/rollup-win32-arm64-msvc": "npm:4.17.2" - "@rollup/rollup-win32-ia32-msvc": "npm:4.17.2" - "@rollup/rollup-win32-x64-msvc": "npm:4.17.2" + version: 4.18.0 + resolution: "rollup@npm:4.18.0" + dependencies: + "@rollup/rollup-android-arm-eabi": "npm:4.18.0" + "@rollup/rollup-android-arm64": "npm:4.18.0" + "@rollup/rollup-darwin-arm64": "npm:4.18.0" + "@rollup/rollup-darwin-x64": "npm:4.18.0" + "@rollup/rollup-linux-arm-gnueabihf": "npm:4.18.0" + "@rollup/rollup-linux-arm-musleabihf": "npm:4.18.0" + "@rollup/rollup-linux-arm64-gnu": "npm:4.18.0" + "@rollup/rollup-linux-arm64-musl": "npm:4.18.0" + "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.18.0" + "@rollup/rollup-linux-riscv64-gnu": "npm:4.18.0" + "@rollup/rollup-linux-s390x-gnu": "npm:4.18.0" + "@rollup/rollup-linux-x64-gnu": "npm:4.18.0" + "@rollup/rollup-linux-x64-musl": "npm:4.18.0" + "@rollup/rollup-win32-arm64-msvc": "npm:4.18.0" + "@rollup/rollup-win32-ia32-msvc": "npm:4.18.0" + "@rollup/rollup-win32-x64-msvc": "npm:4.18.0" "@types/estree": "npm:1.0.5" fsevents: "npm:~2.3.2" dependenciesMeta: @@ -6029,7 +6007,7 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: 10/a021d57f73d746340a1c2b3a03ef0b3bb7f3c837e6acd9aa78b1b1234011aa5b5271b0ef25abba2c1ed268b5e2c90c39a0f8194bcf825728be720f9f2496b248 + checksum: 10/2320fe653cfd5e3d72ecab2f1d52d47e7b624a6ab02919f53c1ad1c5efa3b66e277c3ecfef03bb97651e79cef04bfefd34ad1f6e648f496572bf76c834f19599 languageName: node linkType: hard @@ -6048,14 +6026,14 @@ __metadata: "@types/lodash": "npm:^4.17.4" "@types/node": "npm:^20.12.12" "@types/ws": "npm:^8.5.10" - "@typescript-eslint/eslint-plugin": "npm:^7.10.0" - "@typescript-eslint/parser": "npm:^7.10.0" + "@typescript-eslint/eslint-plugin": "npm:^7.11.0" + "@typescript-eslint/parser": "npm:^7.11.0" "@vitest/coverage-v8": "npm:^1.6.0" concurrently: "npm:^8.2.2" cz-conventional-changelog: "npm:^3.3.0" discord-api-types: "npm:^0.37.85" discord.js: "npm:^14.15.2" - eslint: "npm:^8.57.0" + eslint: "npm:^9.3.0" eslint-config-prettier: "npm:^9.1.0" eslint-plugin-prettier: "npm:^5.1.3" lint-staged: "npm:^15.2.5" @@ -6137,14 +6115,12 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.0.0, semver@npm:^7.3.5, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.6.0": - version: 7.6.0 - resolution: "semver@npm:7.6.0" - dependencies: - lru-cache: "npm:^6.0.0" +"semver@npm:^7.3.5, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.6.0": + version: 7.6.2 + resolution: "semver@npm:7.6.2" bin: semver: bin/semver.js - checksum: 10/1b41018df2d8aca5a1db4729985e8e20428c650daea60fcd16e926e9383217d00f574fab92d79612771884a98d2ee2a1973f49d630829a8d54d6570defe62535 + checksum: 10/296b17d027f57a87ef645e9c725bff4865a38dfc9caf29b26aa084b85820972fbe7372caea1ba6857162fa990702c6d9c1d82297cecb72d56c78ab29070d2ca2 languageName: node linkType: hard @@ -6871,9 +6847,9 @@ __metadata: linkType: hard "type-fest@npm:^4.9.0": - version: 4.18.1 - resolution: "type-fest@npm:4.18.1" - checksum: 10/ff76e19cb969854161fea2de854073f346e159f5efff05906ece93cbde8a7161b9374121aca53782b44f754152cbacc70264c90ca1acc81ca917723acce5054f + version: 4.18.3 + resolution: "type-fest@npm:4.18.3" + checksum: 10/eb750920d0ef3639177f581edd6489d972c5c5827abb602a9c9662889aad148a7d558257e36c563f1beb81a2e417faec52ecec9799b28531d8335856f91e6dff languageName: node linkType: hard @@ -6911,6 +6887,22 @@ __metadata: languageName: node linkType: hard +"typescript-eslint@npm:^7.11.0": + version: 7.11.0 + resolution: "typescript-eslint@npm:7.11.0" + dependencies: + "@typescript-eslint/eslint-plugin": "npm:7.11.0" + "@typescript-eslint/parser": "npm:7.11.0" + "@typescript-eslint/utils": "npm:7.11.0" + peerDependencies: + eslint: ^8.56.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 10/8c82d777a6503867b1edd873276706afc158c55012dd958b22a44255e4f7fb12591435b1086571fdbc73de3ce783fe24ec87d1cc2bd5739d9edbad0e52572cf1 + languageName: node + linkType: hard + "typescript@npm:^5.3.3, typescript@npm:^5.4.5": version: 5.4.5 resolution: "typescript@npm:5.4.5" @@ -7036,11 +7028,9 @@ __metadata: linkType: hard "validate-npm-package-name@npm:^5.0.0": - version: 5.0.0 - resolution: "validate-npm-package-name@npm:5.0.0" - dependencies: - builtins: "npm:^5.0.0" - checksum: 10/5342a994986199b3c28e53a8452a14b2bb5085727691ea7aa0d284a6606b127c371e0925ae99b3f1ef7cc7d2c9de75f52eb61a3d1cc45e39bca1e3a9444cbb4e + version: 5.0.1 + resolution: "validate-npm-package-name@npm:5.0.1" + checksum: 10/0d583a1af23aeffea7748742cf22b6802458736fb8b60323ba5949763824d46f796474b0e1b9206beb716f9d75269e19dbd7795d6b038b29d561be95dd827381 languageName: node linkType: hard @@ -7060,8 +7050,8 @@ __metadata: linkType: hard "vite@npm:^5.0.0, vite@npm:^5.2.11": - version: 5.2.11 - resolution: "vite@npm:5.2.11" + version: 5.2.12 + resolution: "vite@npm:5.2.12" dependencies: esbuild: "npm:^0.20.1" fsevents: "npm:~2.3.3" @@ -7095,7 +7085,7 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 10/ee0ad038f0831c9514796522deb1e2dcb84bc311abbccb77e4b12216d37fc9559137f4f1b8e75187d51007b954e845c6518e36ee3acac2e2a2789c1181ebb16c + checksum: 10/c27d3efff93016e8171b6a362f605ad5f78e24086292987097ad4a7382ae78d9e0659065976a13bf7b51ba0f593d675579010692097ef36d8a5cc965f3efec4c languageName: node linkType: hard From 8adda0179241daef0d9cd5aee241d73508b84629 Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Wed, 29 May 2024 00:26:10 +0200 Subject: [PATCH 06/14] build: bump to typescript-eslint v8 alpha --- package.json | 4 +- packages/eslint-config/package.json | 8 +- packages/eslint-plugin-result/package.json | 6 +- .../tests/rules/no-discard-result.test.ts | 2 +- yarn.lock | 158 +++++++++--------- 5 files changed, 87 insertions(+), 91 deletions(-) diff --git a/package.json b/package.json index 807ee0ed30..4b2fae0833 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "@types/lodash": "^4.17.4", "@types/node": "^20.12.12", "@types/ws": "^8.5.10", - "@typescript-eslint/eslint-plugin": "^7.11.0", - "@typescript-eslint/parser": "^7.11.0", + "@typescript-eslint/eslint-plugin": "rc-v8", + "@typescript-eslint/parser": "rc-v8", "@vitest/coverage-v8": "^1.6.0", "concurrently": "^8.2.2", "cz-conventional-changelog": "^3.3.0", diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 52ea6f1e5e..11e851c6e8 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -32,16 +32,16 @@ "@eslint/js": "^9.3.0", "@types/eslint-config-prettier": "^6.11.3", "@types/eslint__js": "^8.42.3", - "@typescript-eslint/eslint-plugin": "^7.11.0", - "@typescript-eslint/parser": "^7.11.0", - "@typescript-eslint/utils": "^7.11.0", + "@typescript-eslint/eslint-plugin": "rc-v8", + "@typescript-eslint/parser": "rc-v8", + "@typescript-eslint/utils": "rc-v8", "eslint": "^9.3.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.3", "globals": "^15.3.0", "prettier": "^3.2.5", "typescript": "^5.4.5", - "typescript-eslint": "^7.11.0" + "typescript-eslint": "rc-v8" }, "repository": { "type": "git", diff --git a/packages/eslint-plugin-result/package.json b/packages/eslint-plugin-result/package.json index 6c7705889b..9b912cc865 100644 --- a/packages/eslint-plugin-result/package.json +++ b/packages/eslint-plugin-result/package.json @@ -69,8 +69,8 @@ }, "devDependencies": { "@favware/cliff-jumper": "^3.0.3", - "@typescript-eslint/rule-tester": "^7.11.0", - "@typescript-eslint/typescript-estree": "^7.11.0", + "@typescript-eslint/rule-tester": "rc-v8", + "@typescript-eslint/typescript-estree": "rc-v8", "@vitest/coverage-v8": "^1.6.0", "tsup": "^8.0.2", "tsx": "^4.11.0", @@ -79,7 +79,7 @@ }, "dependencies": { "@sapphire/result": "workspace:^", - "@typescript-eslint/utils": "^7.11.0", + "@typescript-eslint/utils": "rc-v8", "tsutils": "^3.21.0", "typescript": "^5.4.5" } diff --git a/packages/eslint-plugin-result/tests/rules/no-discard-result.test.ts b/packages/eslint-plugin-result/tests/rules/no-discard-result.test.ts index b55f34404e..da4fea6b6a 100644 --- a/packages/eslint-plugin-result/tests/rules/no-discard-result.test.ts +++ b/packages/eslint-plugin-result/tests/rules/no-discard-result.test.ts @@ -6,7 +6,7 @@ export const ruleTester = new RuleTester({ parserOptions: { ecmaVersion: 2020, tsconfigRootDir: fileURLToPath(new URL('..', import.meta.url)), - project: '../tsconfig.json' + project: fileURLToPath(new URL('../tsconfig.json', import.meta.url)) }, parser: '@typescript-eslint/parser' }); diff --git a/yarn.lock b/yarn.lock index 0ea4222444..f8607875ca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1329,9 +1329,9 @@ __metadata: "@favware/cliff-jumper": "npm:^3.0.3" "@types/eslint-config-prettier": "npm:^6.11.3" "@types/eslint__js": "npm:^8.42.3" - "@typescript-eslint/eslint-plugin": "npm:^7.11.0" - "@typescript-eslint/parser": "npm:^7.11.0" - "@typescript-eslint/utils": "npm:^7.11.0" + "@typescript-eslint/eslint-plugin": "npm:rc-v8" + "@typescript-eslint/parser": "npm:rc-v8" + "@typescript-eslint/utils": "npm:rc-v8" "@vitest/coverage-v8": "npm:^1.6.0" eslint: "npm:^9.3.0" eslint-config-prettier: "npm:^9.1.0" @@ -1342,7 +1342,7 @@ __metadata: tsx: "npm:^4.11.0" typedoc-json-parser: "npm:^10.0.0" typescript: "npm:^5.4.5" - typescript-eslint: "npm:^7.11.0" + typescript-eslint: "npm:rc-v8" vitest: "npm:^1.6.0" languageName: unknown linkType: soft @@ -1353,9 +1353,9 @@ __metadata: dependencies: "@favware/cliff-jumper": "npm:^3.0.3" "@sapphire/result": "workspace:^" - "@typescript-eslint/rule-tester": "npm:^7.11.0" - "@typescript-eslint/typescript-estree": "npm:^7.11.0" - "@typescript-eslint/utils": "npm:^7.11.0" + "@typescript-eslint/rule-tester": "npm:rc-v8" + "@typescript-eslint/typescript-estree": "npm:rc-v8" + "@typescript-eslint/utils": "npm:rc-v8" "@vitest/coverage-v8": "npm:^1.6.0" tsup: "npm:^8.0.2" tsutils: "npm:^3.21.0" @@ -1807,103 +1807,101 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:7.11.0, @typescript-eslint/eslint-plugin@npm:^7.11.0": - version: 7.11.0 - resolution: "@typescript-eslint/eslint-plugin@npm:7.11.0" +"@typescript-eslint/eslint-plugin@npm:8.0.0-alpha.20, @typescript-eslint/eslint-plugin@npm:rc-v8": + version: 8.0.0-alpha.20 + resolution: "@typescript-eslint/eslint-plugin@npm:8.0.0-alpha.20" dependencies: "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:7.11.0" - "@typescript-eslint/type-utils": "npm:7.11.0" - "@typescript-eslint/utils": "npm:7.11.0" - "@typescript-eslint/visitor-keys": "npm:7.11.0" + "@typescript-eslint/scope-manager": "npm:8.0.0-alpha.20" + "@typescript-eslint/type-utils": "npm:8.0.0-alpha.20" + "@typescript-eslint/utils": "npm:8.0.0-alpha.20" + "@typescript-eslint/visitor-keys": "npm:8.0.0-alpha.20" graphemer: "npm:^1.4.0" ignore: "npm:^5.3.1" natural-compare: "npm:^1.4.0" ts-api-utils: "npm:^1.3.0" peerDependencies: - "@typescript-eslint/parser": ^7.0.0 - eslint: ^8.56.0 + "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 10/be95ed0bbd5b34c47239677ea39d531bcd8a18717a67d70a297bed5b0050b256159856bb9c1e894ac550d011c24bb5b4abf8056c5d70d0d5895f0cc1accd14ea + checksum: 10/e51fcb5dd77f9f0e3970d7e36d0831760f6cda82be637589ad6283bddc7d1e54215100433ee77ccd7c0bc87f5b5035136d5d4f6f236e1ba333c6c368b3bd714b languageName: node linkType: hard -"@typescript-eslint/parser@npm:7.11.0, @typescript-eslint/parser@npm:^7.11.0": - version: 7.11.0 - resolution: "@typescript-eslint/parser@npm:7.11.0" +"@typescript-eslint/parser@npm:8.0.0-alpha.20, @typescript-eslint/parser@npm:rc-v8": + version: 8.0.0-alpha.20 + resolution: "@typescript-eslint/parser@npm:8.0.0-alpha.20" dependencies: - "@typescript-eslint/scope-manager": "npm:7.11.0" - "@typescript-eslint/types": "npm:7.11.0" - "@typescript-eslint/typescript-estree": "npm:7.11.0" - "@typescript-eslint/visitor-keys": "npm:7.11.0" + "@typescript-eslint/scope-manager": "npm:8.0.0-alpha.20" + "@typescript-eslint/types": "npm:8.0.0-alpha.20" + "@typescript-eslint/typescript-estree": "npm:8.0.0-alpha.20" + "@typescript-eslint/visitor-keys": "npm:8.0.0-alpha.20" debug: "npm:^4.3.4" peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 10/0a32417aec62d7de04427323ab3fc8159f9f02429b24f739d8748e8b54fc65b0e3dbae8e4779c4b795f0d8e5f98a4d83a43b37ea0f50ebda51546cdcecf73caa + checksum: 10/438ab7ac90e112e067421a2232b233b3aa51e18c02635a0289052c092bdaceb65a97c8aa89823de4d380458dcefb052ff480a0f8a1e59f15a403f38007c65408 languageName: node linkType: hard -"@typescript-eslint/rule-tester@npm:^7.11.0": - version: 7.11.0 - resolution: "@typescript-eslint/rule-tester@npm:7.11.0" +"@typescript-eslint/rule-tester@npm:rc-v8": + version: 8.0.0-alpha.20 + resolution: "@typescript-eslint/rule-tester@npm:8.0.0-alpha.20" dependencies: - "@typescript-eslint/typescript-estree": "npm:7.11.0" - "@typescript-eslint/utils": "npm:7.11.0" + "@typescript-eslint/typescript-estree": "npm:8.0.0-alpha.20" + "@typescript-eslint/utils": "npm:8.0.0-alpha.20" ajv: "npm:^6.12.6" lodash.merge: "npm:4.6.2" semver: "npm:^7.6.0" peerDependencies: "@eslint/eslintrc": ">=2" - eslint: ^8.56.0 - checksum: 10/411a8d2d0f0fce0bcfba7c0e351aa1e302156f9ae5ac16b8a2abdc45f8c1bdfbb5dd444c2c99a74215d1e1b8d6a4eb60e5a86767887e95edd1cb5b4e63b04ff2 + eslint: ^8.57.0 || ^9.0.0 + checksum: 10/452451e74d98118cad5d887570ab4fbcbb25e2658bff544676ec7d780ad24f4bfca9445a44db759c607b2939a5ad2f76b94212466546c6ee46694c4790e03361 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:7.11.0": - version: 7.11.0 - resolution: "@typescript-eslint/scope-manager@npm:7.11.0" +"@typescript-eslint/scope-manager@npm:8.0.0-alpha.20": + version: 8.0.0-alpha.20 + resolution: "@typescript-eslint/scope-manager@npm:8.0.0-alpha.20" dependencies: - "@typescript-eslint/types": "npm:7.11.0" - "@typescript-eslint/visitor-keys": "npm:7.11.0" - checksum: 10/79eff310405c6657ff092641e3ad51c6698c6708b915ecef945ebdd1737bd48e1458c5575836619f42dec06143ec0e3a826f3e551af590d297367da3d08f329e + "@typescript-eslint/types": "npm:8.0.0-alpha.20" + "@typescript-eslint/visitor-keys": "npm:8.0.0-alpha.20" + checksum: 10/eb98abf8549206989b40a0e613602e1d8941abb4097940dff790dbc2cb12526e8ea488e87dd57aec139cdcc99a23bfe5e0f742cbb3b3fceaaf14cde8d51a2269 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:7.11.0": - version: 7.11.0 - resolution: "@typescript-eslint/type-utils@npm:7.11.0" +"@typescript-eslint/type-utils@npm:8.0.0-alpha.20": + version: 8.0.0-alpha.20 + resolution: "@typescript-eslint/type-utils@npm:8.0.0-alpha.20" dependencies: - "@typescript-eslint/typescript-estree": "npm:7.11.0" - "@typescript-eslint/utils": "npm:7.11.0" + "@typescript-eslint/typescript-estree": "npm:8.0.0-alpha.20" + "@typescript-eslint/utils": "npm:8.0.0-alpha.20" debug: "npm:^4.3.4" ts-api-utils: "npm:^1.3.0" - peerDependencies: - eslint: ^8.56.0 peerDependenciesMeta: typescript: optional: true - checksum: 10/ab6ebeff68a60fc40d0ace88e03d6b4242b8f8fe2fa300db161780d58777b57f69fa077cd482e1b673316559459bd20b8cc89a7f9f30e644bfed8293f77f0e4b + checksum: 10/ea00ac9c341ddce24498b428cefc2fe9a38630b30a2c753d46fc1bb0ab54cf48df24b98b4ab2a14f7d7b67cafef148b72d5d948b0008a5cc0ca055091afe20b2 languageName: node linkType: hard -"@typescript-eslint/types@npm:7.11.0": - version: 7.11.0 - resolution: "@typescript-eslint/types@npm:7.11.0" - checksum: 10/c6a0b47ef43649a59c9d51edfc61e367b55e519376209806b1c98385a8385b529e852c7a57e081fb15ef6a5dc0fc8e90bd5a508399f5ac2137f4d462e89cdc30 +"@typescript-eslint/types@npm:8.0.0-alpha.20": + version: 8.0.0-alpha.20 + resolution: "@typescript-eslint/types@npm:8.0.0-alpha.20" + checksum: 10/4388334ff7a18ba4b4517f84d6b3f58c1187bec9dae807c20bef8f9256a8ca6b2704a3a14dfd91785974049301148ca06664fe688b2f779be3b05ab4b59047a9 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:7.11.0, @typescript-eslint/typescript-estree@npm:^7.11.0": - version: 7.11.0 - resolution: "@typescript-eslint/typescript-estree@npm:7.11.0" +"@typescript-eslint/typescript-estree@npm:8.0.0-alpha.20, @typescript-eslint/typescript-estree@npm:rc-v8": + version: 8.0.0-alpha.20 + resolution: "@typescript-eslint/typescript-estree@npm:8.0.0-alpha.20" dependencies: - "@typescript-eslint/types": "npm:7.11.0" - "@typescript-eslint/visitor-keys": "npm:7.11.0" + "@typescript-eslint/types": "npm:8.0.0-alpha.20" + "@typescript-eslint/visitor-keys": "npm:8.0.0-alpha.20" debug: "npm:^4.3.4" globby: "npm:^11.1.0" is-glob: "npm:^4.0.3" @@ -1913,31 +1911,31 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/b98b101e42d3b91003510a5c5a83f4350b6c1cf699bf2e409717660579ffa71682bc280c4f40166265c03f9546ed4faedc3723e143f1ab0ed7f5990cc3dff0ae + checksum: 10/5d413d91940cd68cc8b5eb9682d6d1619ad4d241dd13253cc7a3f97ead73cebe9007fe19a629636b0b0055ec0d2394379fa40961246db08eb4c3840bf90b0195 languageName: node linkType: hard -"@typescript-eslint/utils@npm:7.11.0, @typescript-eslint/utils@npm:^7.11.0": - version: 7.11.0 - resolution: "@typescript-eslint/utils@npm:7.11.0" +"@typescript-eslint/utils@npm:8.0.0-alpha.20, @typescript-eslint/utils@npm:rc-v8": + version: 8.0.0-alpha.20 + resolution: "@typescript-eslint/utils@npm:8.0.0-alpha.20" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:7.11.0" - "@typescript-eslint/types": "npm:7.11.0" - "@typescript-eslint/typescript-estree": "npm:7.11.0" + "@typescript-eslint/scope-manager": "npm:8.0.0-alpha.20" + "@typescript-eslint/types": "npm:8.0.0-alpha.20" + "@typescript-eslint/typescript-estree": "npm:8.0.0-alpha.20" peerDependencies: - eslint: ^8.56.0 - checksum: 10/fbef14e166a70ccc4527c0731e0338acefa28218d1a018aa3f5b6b1ad9d75c56278d5f20bda97cf77da13e0a67c4f3e579c5b2f1c2e24d676960927921b55851 + eslint: ^8.57.0 || ^9.0.0 + checksum: 10/76b35ffb909de92adebe78388423a2360a8a94ecfb703ac38b6591bf9ab3cedc2d2d7c1d65a1f8e95b5c924928087a17264d5d3a35403cefc7fea009b08b299e languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:7.11.0": - version: 7.11.0 - resolution: "@typescript-eslint/visitor-keys@npm:7.11.0" +"@typescript-eslint/visitor-keys@npm:8.0.0-alpha.20": + version: 8.0.0-alpha.20 + resolution: "@typescript-eslint/visitor-keys@npm:8.0.0-alpha.20" dependencies: - "@typescript-eslint/types": "npm:7.11.0" + "@typescript-eslint/types": "npm:8.0.0-alpha.20" eslint-visitor-keys: "npm:^3.4.3" - checksum: 10/1f2cf1214638e9e78e052393c9e24295196ec4781b05951659a3997e33f8699a760ea3705c17d770e10eda2067435199e0136ab09e5fac63869e22f2da184d89 + checksum: 10/13ec202751317ff43b717687c25fa503870ab2e89f39b2b54f07f4648e9ba1ab53456a88b36224a59c62a0587fc0435fd12c0fed02118ce2c8c1aadbc59c98a4 languageName: node linkType: hard @@ -6026,8 +6024,8 @@ __metadata: "@types/lodash": "npm:^4.17.4" "@types/node": "npm:^20.12.12" "@types/ws": "npm:^8.5.10" - "@typescript-eslint/eslint-plugin": "npm:^7.11.0" - "@typescript-eslint/parser": "npm:^7.11.0" + "@typescript-eslint/eslint-plugin": "npm:rc-v8" + "@typescript-eslint/parser": "npm:rc-v8" "@vitest/coverage-v8": "npm:^1.6.0" concurrently: "npm:^8.2.2" cz-conventional-changelog: "npm:^3.3.0" @@ -6887,19 +6885,17 @@ __metadata: languageName: node linkType: hard -"typescript-eslint@npm:^7.11.0": - version: 7.11.0 - resolution: "typescript-eslint@npm:7.11.0" +"typescript-eslint@npm:rc-v8": + version: 8.0.0-alpha.20 + resolution: "typescript-eslint@npm:8.0.0-alpha.20" dependencies: - "@typescript-eslint/eslint-plugin": "npm:7.11.0" - "@typescript-eslint/parser": "npm:7.11.0" - "@typescript-eslint/utils": "npm:7.11.0" - peerDependencies: - eslint: ^8.56.0 + "@typescript-eslint/eslint-plugin": "npm:8.0.0-alpha.20" + "@typescript-eslint/parser": "npm:8.0.0-alpha.20" + "@typescript-eslint/utils": "npm:8.0.0-alpha.20" peerDependenciesMeta: typescript: optional: true - checksum: 10/8c82d777a6503867b1edd873276706afc158c55012dd958b22a44255e4f7fb12591435b1086571fdbc73de3ce783fe24ec87d1cc2bd5739d9edbad0e52572cf1 + checksum: 10/876915b501ee0d4b2132862e42e75c18f81d9341a9c3a1d39a6d277d1dc825abd0f13e6cf8d3138c7b27769abf0d52a077ea82e2bebde33ca5042efc95065efa languageName: node linkType: hard From 7ff3745ba9d926bed902d1363ab3fa0a1f2c87c3 Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Wed, 29 May 2024 00:47:50 +0200 Subject: [PATCH 07/14] test: update eslint config snapshot --- .../tests/__snapshots__/eslint.test.ts.snap | 3073 ++--------------- 1 file changed, 244 insertions(+), 2829 deletions(-) diff --git a/packages/eslint-config/tests/__snapshots__/eslint.test.ts.snap b/packages/eslint-config/tests/__snapshots__/eslint.test.ts.snap index bcc918fdaa..d31ae67594 100644 --- a/packages/eslint-config/tests/__snapshots__/eslint.test.ts.snap +++ b/packages/eslint-config/tests/__snapshots__/eslint.test.ts.snap @@ -72,12 +72,13 @@ exports[`ESLint Config > should export rules 1`] = ` "parser": { "meta": { "name": "typescript-eslint/parser", - "version": "7.5.0", + "version": "8.0.0-alpha.20", }, "parseForESLint": [Function], }, "sourceType": "module", }, + "name": "typescript-eslint/base", "plugins": { "@typescript-eslint": { "configs": { @@ -122,7 +123,7 @@ exports[`ESLint Config > should export rules 1`] = ` "@typescript-eslint/no-duplicate-type-constituents": "error", "@typescript-eslint/no-dynamic-delete": "error", "@typescript-eslint/no-empty-function": "error", - "@typescript-eslint/no-empty-interface": "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", @@ -134,7 +135,6 @@ exports[`ESLint Config > should export rules 1`] = ` "@typescript-eslint/no-invalid-this": "error", "@typescript-eslint/no-invalid-void-type": "error", "@typescript-eslint/no-loop-func": "error", - "@typescript-eslint/no-loss-of-precision": "error", "@typescript-eslint/no-magic-numbers": "error", "@typescript-eslint/no-meaningless-void-operator": "error", "@typescript-eslint/no-misused-new": "error", @@ -170,7 +170,6 @@ exports[`ESLint Config > should export rules 1`] = ` "@typescript-eslint/no-useless-constructor": "error", "@typescript-eslint/no-useless-empty-export": "error", "@typescript-eslint/no-useless-template-literals": "error", - "@typescript-eslint/no-var-requires": "error", "@typescript-eslint/non-nullable-type-assertion-style": "error", "@typescript-eslint/only-throw-error": "error", "@typescript-eslint/parameter-properties": "error", @@ -219,7 +218,6 @@ exports[`ESLint Config > should export rules 1`] = ` "no-implied-eval": "off", "no-invalid-this": "off", "no-loop-func": "off", - "no-loss-of-precision": "off", "no-magic-numbers": "off", "no-redeclare": "off", "no-restricted-imports": "off", @@ -266,7 +264,6 @@ exports[`ESLint Config > should export rules 1`] = ` "@typescript-eslint/no-misused-promises": "off", "@typescript-eslint/no-mixed-enums": "off", "@typescript-eslint/no-redundant-type-constituents": "off", - "@typescript-eslint/no-throw-literal": "off", "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off", "@typescript-eslint/no-unnecessary-condition": "off", "@typescript-eslint/no-unnecessary-qualifier": "off", @@ -324,6 +321,7 @@ exports[`ESLint Config > should export rules 1`] = ` "no-dupe-keys": "off", "no-func-assign": "off", "no-import-assign": "off", + "no-new-native-nonconstructor": "off", "no-new-symbol": "off", "no-obj-calls": "off", "no-redeclare": "off", @@ -350,21 +348,23 @@ exports[`ESLint Config > should export rules 1`] = ` "@typescript-eslint/ban-types": "error", "@typescript-eslint/no-array-constructor": "error", "@typescript-eslint/no-duplicate-enum-values": "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-loss-of-precision": "error", "@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-namespace": "error", "@typescript-eslint/no-non-null-asserted-optional-chain": "error", + "@typescript-eslint/no-require-imports": "error", "@typescript-eslint/no-this-alias": "error", "@typescript-eslint/no-unnecessary-type-constraint": "error", "@typescript-eslint/no-unsafe-declaration-merging": "error", + "@typescript-eslint/no-unused-expressions": "error", "@typescript-eslint/no-unused-vars": "error", - "@typescript-eslint/no-var-requires": "error", "@typescript-eslint/prefer-as-const": "error", + "@typescript-eslint/prefer-namespace-keyword": "error", "@typescript-eslint/triple-slash-reference": "error", "no-array-constructor": "off", - "no-loss-of-precision": "off", + "no-unused-expressions": "off", "no-unused-vars": "off", }, }, @@ -378,20 +378,22 @@ exports[`ESLint Config > should export rules 1`] = ` "@typescript-eslint/ban-ts-comment": "error", "@typescript-eslint/ban-types": "error", "@typescript-eslint/no-array-constructor": "error", + "@typescript-eslint/no-array-delete": "error", "@typescript-eslint/no-base-to-string": "error", "@typescript-eslint/no-duplicate-enum-values": "error", "@typescript-eslint/no-duplicate-type-constituents": "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-floating-promises": "error", "@typescript-eslint/no-for-in-array": "error", "@typescript-eslint/no-implied-eval": "error", - "@typescript-eslint/no-loss-of-precision": "error", "@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-misused-promises": "error", "@typescript-eslint/no-namespace": "error", "@typescript-eslint/no-non-null-asserted-optional-chain": "error", "@typescript-eslint/no-redundant-type-constituents": "error", + "@typescript-eslint/no-require-imports": "error", "@typescript-eslint/no-this-alias": "error", "@typescript-eslint/no-unnecessary-type-assertion": "error", "@typescript-eslint/no-unnecessary-type-constraint": "error", @@ -402,9 +404,14 @@ exports[`ESLint Config > should export rules 1`] = ` "@typescript-eslint/no-unsafe-enum-comparison": "error", "@typescript-eslint/no-unsafe-member-access": "error", "@typescript-eslint/no-unsafe-return": "error", + "@typescript-eslint/no-unsafe-unary-minus": "error", + "@typescript-eslint/no-unused-expressions": "error", "@typescript-eslint/no-unused-vars": "error", - "@typescript-eslint/no-var-requires": "error", + "@typescript-eslint/no-useless-template-literals": "error", + "@typescript-eslint/only-throw-error": "error", "@typescript-eslint/prefer-as-const": "error", + "@typescript-eslint/prefer-namespace-keyword": "error", + "@typescript-eslint/prefer-promise-reject-errors": "error", "@typescript-eslint/require-await": "error", "@typescript-eslint/restrict-plus-operands": "error", "@typescript-eslint/restrict-template-expressions": "error", @@ -412,8 +419,10 @@ exports[`ESLint Config > should export rules 1`] = ` "@typescript-eslint/unbound-method": "error", "no-array-constructor": "off", "no-implied-eval": "off", - "no-loss-of-precision": "off", + "no-throw-literal": "off", + "no-unused-expressions": "off", "no-unused-vars": "off", + "prefer-promise-reject-errors": "off", "require-await": "off", }, }, @@ -427,20 +436,22 @@ exports[`ESLint Config > should export rules 1`] = ` "@typescript-eslint/ban-ts-comment": "error", "@typescript-eslint/ban-types": "error", "@typescript-eslint/no-array-constructor": "error", + "@typescript-eslint/no-array-delete": "error", "@typescript-eslint/no-base-to-string": "error", "@typescript-eslint/no-duplicate-enum-values": "error", "@typescript-eslint/no-duplicate-type-constituents": "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-floating-promises": "error", "@typescript-eslint/no-for-in-array": "error", "@typescript-eslint/no-implied-eval": "error", - "@typescript-eslint/no-loss-of-precision": "error", "@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-misused-promises": "error", "@typescript-eslint/no-namespace": "error", "@typescript-eslint/no-non-null-asserted-optional-chain": "error", "@typescript-eslint/no-redundant-type-constituents": "error", + "@typescript-eslint/no-require-imports": "error", "@typescript-eslint/no-this-alias": "error", "@typescript-eslint/no-unnecessary-type-assertion": "error", "@typescript-eslint/no-unnecessary-type-constraint": "error", @@ -451,9 +462,14 @@ exports[`ESLint Config > should export rules 1`] = ` "@typescript-eslint/no-unsafe-enum-comparison": "error", "@typescript-eslint/no-unsafe-member-access": "error", "@typescript-eslint/no-unsafe-return": "error", + "@typescript-eslint/no-unsafe-unary-minus": "error", + "@typescript-eslint/no-unused-expressions": "error", "@typescript-eslint/no-unused-vars": "error", - "@typescript-eslint/no-var-requires": "error", + "@typescript-eslint/no-useless-template-literals": "error", + "@typescript-eslint/only-throw-error": "error", "@typescript-eslint/prefer-as-const": "error", + "@typescript-eslint/prefer-namespace-keyword": "error", + "@typescript-eslint/prefer-promise-reject-errors": "error", "@typescript-eslint/require-await": "error", "@typescript-eslint/restrict-plus-operands": "error", "@typescript-eslint/restrict-template-expressions": "error", @@ -461,8 +477,10 @@ exports[`ESLint Config > should export rules 1`] = ` "@typescript-eslint/unbound-method": "error", "no-array-constructor": "off", "no-implied-eval": "off", - "no-loss-of-precision": "off", + "no-throw-literal": "off", + "no-unused-expressions": "off", "no-unused-vars": "off", + "prefer-promise-reject-errors": "off", "require-await": "off", }, }, @@ -473,6 +491,7 @@ exports[`ESLint Config > should export rules 1`] = ` ], "rules": { "@typescript-eslint/await-thenable": "error", + "@typescript-eslint/no-array-delete": "error", "@typescript-eslint/no-base-to-string": "error", "@typescript-eslint/no-duplicate-type-constituents": "error", "@typescript-eslint/no-floating-promises": "error", @@ -487,11 +506,17 @@ exports[`ESLint Config > should export rules 1`] = ` "@typescript-eslint/no-unsafe-enum-comparison": "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-template-literals": "error", + "@typescript-eslint/only-throw-error": "error", + "@typescript-eslint/prefer-promise-reject-errors": "error", "@typescript-eslint/require-await": "error", "@typescript-eslint/restrict-plus-operands": "error", "@typescript-eslint/restrict-template-expressions": "error", "@typescript-eslint/unbound-method": "error", "no-implied-eval": "off", + "no-throw-literal": "off", + "prefer-promise-reject-errors": "off", "require-await": "off", }, }, @@ -511,29 +536,31 @@ exports[`ESLint Config > should export rules 1`] = ` "@typescript-eslint/no-array-constructor": "error", "@typescript-eslint/no-duplicate-enum-values": "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-invalid-void-type": "error", - "@typescript-eslint/no-loss-of-precision": "error", "@typescript-eslint/no-misused-new": "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-require-imports": "error", "@typescript-eslint/no-this-alias": "error", "@typescript-eslint/no-unnecessary-type-constraint": "error", "@typescript-eslint/no-unsafe-declaration-merging": "error", + "@typescript-eslint/no-unused-expressions": "error", "@typescript-eslint/no-unused-vars": "error", "@typescript-eslint/no-useless-constructor": "error", - "@typescript-eslint/no-var-requires": "error", "@typescript-eslint/prefer-as-const": "error", "@typescript-eslint/prefer-literal-enum-member": "error", + "@typescript-eslint/prefer-namespace-keyword": "error", "@typescript-eslint/prefer-ts-expect-error": "error", "@typescript-eslint/triple-slash-reference": "error", "@typescript-eslint/unified-signatures": "error", "no-array-constructor": "off", - "no-loss-of-precision": "off", + "no-unused-expressions": "off", "no-unused-vars": "off", "no-useless-constructor": "off", }, @@ -559,6 +586,7 @@ exports[`ESLint Config > should export rules 1`] = ` "@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", @@ -566,7 +594,6 @@ exports[`ESLint Config > should export rules 1`] = ` "@typescript-eslint/no-for-in-array": "error", "@typescript-eslint/no-implied-eval": "error", "@typescript-eslint/no-invalid-void-type": "error", - "@typescript-eslint/no-loss-of-precision": "error", "@typescript-eslint/no-meaningless-void-operator": "error", "@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-misused-promises": "error", @@ -576,6 +603,7 @@ exports[`ESLint Config > should export rules 1`] = ` "@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-boolean-literal-compare": "error", "@typescript-eslint/no-unnecessary-condition": "error", @@ -589,14 +617,15 @@ exports[`ESLint Config > should export rules 1`] = ` "@typescript-eslint/no-unsafe-enum-comparison": "error", "@typescript-eslint/no-unsafe-member-access": "error", "@typescript-eslint/no-unsafe-return": "error", + "@typescript-eslint/no-unsafe-unary-minus": "error", + "@typescript-eslint/no-unused-expressions": "error", "@typescript-eslint/no-unused-vars": "error", "@typescript-eslint/no-useless-constructor": "error", "@typescript-eslint/no-useless-template-literals": "error", - "@typescript-eslint/no-var-requires": "error", "@typescript-eslint/only-throw-error": "error", "@typescript-eslint/prefer-as-const": "error", - "@typescript-eslint/prefer-includes": "error", "@typescript-eslint/prefer-literal-enum-member": "error", + "@typescript-eslint/prefer-namespace-keyword": "error", "@typescript-eslint/prefer-promise-reject-errors": "error", "@typescript-eslint/prefer-reduce-type-parameter": "error", "@typescript-eslint/prefer-return-this-type": "error", @@ -629,8 +658,8 @@ exports[`ESLint Config > should export rules 1`] = ` "@typescript-eslint/use-unknown-in-catch-callback-variable": "error", "no-array-constructor": "off", "no-implied-eval": "off", - "no-loss-of-precision": "off", "no-throw-literal": "off", + "no-unused-expressions": "off", "no-unused-vars": "off", "no-useless-constructor": "off", "prefer-promise-reject-errors": "off", @@ -665,9 +694,9 @@ exports[`ESLint Config > should export rules 1`] = ` "@typescript-eslint/no-unsafe-enum-comparison": "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-template-literals": "error", "@typescript-eslint/only-throw-error": "error", - "@typescript-eslint/prefer-includes": "error", "@typescript-eslint/prefer-promise-reject-errors": "error", "@typescript-eslint/prefer-reduce-type-parameter": "error", "@typescript-eslint/prefer-return-this-type": "error", @@ -717,11 +746,9 @@ exports[`ESLint Config > should export rules 1`] = ` "@typescript-eslint/consistent-type-definitions": "error", "@typescript-eslint/no-confusing-non-null-assertion": "error", "@typescript-eslint/no-empty-function": "error", - "@typescript-eslint/no-empty-interface": "error", "@typescript-eslint/no-inferrable-types": "error", "@typescript-eslint/prefer-for-of": "error", "@typescript-eslint/prefer-function-type": "error", - "@typescript-eslint/prefer-namespace-keyword": "error", "no-empty-function": "off", }, }, @@ -742,14 +769,15 @@ exports[`ESLint Config > should export rules 1`] = ` "@typescript-eslint/dot-notation": "error", "@typescript-eslint/no-confusing-non-null-assertion": "error", "@typescript-eslint/no-empty-function": "error", - "@typescript-eslint/no-empty-interface": "error", "@typescript-eslint/no-inferrable-types": "error", "@typescript-eslint/non-nullable-type-assertion-style": "error", + "@typescript-eslint/prefer-find": "error", "@typescript-eslint/prefer-for-of": "error", "@typescript-eslint/prefer-function-type": "error", - "@typescript-eslint/prefer-namespace-keyword": "error", + "@typescript-eslint/prefer-includes": "error", "@typescript-eslint/prefer-nullish-coalescing": "error", "@typescript-eslint/prefer-optional-chain": "error", + "@typescript-eslint/prefer-regexp-exec": "error", "@typescript-eslint/prefer-string-starts-ends-with": "error", "dot-notation": "off", "no-empty-function": "off", @@ -763,8 +791,11 @@ exports[`ESLint Config > should export rules 1`] = ` "rules": { "@typescript-eslint/dot-notation": "error", "@typescript-eslint/non-nullable-type-assertion-style": "error", + "@typescript-eslint/prefer-find": "error", + "@typescript-eslint/prefer-includes": "error", "@typescript-eslint/prefer-nullish-coalescing": "error", "@typescript-eslint/prefer-optional-chain": "error", + "@typescript-eslint/prefer-regexp-exec": "error", "@typescript-eslint/prefer-string-starts-ends-with": "error", "dot-notation": "off", }, @@ -772,7 +803,7 @@ exports[`ESLint Config > should export rules 1`] = ` }, "meta": { "name": "@typescript-eslint/eslint-plugin", - "version": "7.5.0", + "version": "8.0.0-alpha.20", }, "rules": { "adjacent-overload-signatures": { @@ -1048,85 +1079,6 @@ exports[`ESLint Config > should export rules 1`] = ` "type": "suggestion", }, }, - "block-spacing": { - "create": [Function], - "defaultOptions": [ - "always", - ], - "meta": { - "deprecated": true, - "docs": { - "description": "Disallow or enforce spaces inside of blocks after opening block and before closing block", - "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/block-spacing", - }, - "fixable": "whitespace", - "hasSuggestions": undefined, - "messages": { - "extra": "Unexpected space(s) {{location}} '{{token}}'.", - "missing": "Requires a space {{location}} '{{token}}'.", - }, - "replacedBy": [ - "@stylistic/ts/block-spacing", - ], - "schema": [ - { - "enum": [ - "always", - "never", - ], - }, - ], - "type": "layout", - }, - }, - "brace-style": { - "create": [Function], - "defaultOptions": [ - "1tbs", - ], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce consistent brace style for blocks", - "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/brace-style", - }, - "fixable": "whitespace", - "hasSuggestions": undefined, - "messages": { - "blockSameLine": "Statement inside of curly braces should be on next line.", - "nextLineClose": "Closing curly brace does not appear on the same line as the subsequent block.", - "nextLineOpen": "Opening curly brace does not appear on the same line as controlling statement.", - "sameLineClose": "Closing curly brace appears on the same line as the subsequent block.", - "sameLineOpen": "Opening curly brace appears on the same line as controlling statement.", - "singleLineClose": "Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.", - }, - "replacedBy": [ - "@stylistic/ts/brace-style", - ], - "schema": [ - { - "enum": [ - "1tbs", - "stroustrup", - "allman", - ], - }, - { - "additionalProperties": false, - "properties": { - "allowSingleLine": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, "class-literal-property-style": { "create": [Function], "defaultOptions": [ @@ -1220,136 +1172,6 @@ exports[`ESLint Config > should export rules 1`] = ` "type": "suggestion", }, }, - "comma-dangle": { - "create": [Function], - "defaultOptions": [ - "never", - ], - "meta": { - "deprecated": true, - "docs": { - "description": "Require or disallow trailing commas", - "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/comma-dangle", - }, - "fixable": "code", - "hasSuggestions": undefined, - "messages": { - "missing": "Missing trailing comma.", - "unexpected": "Unexpected trailing comma.", - }, - "replacedBy": [ - "@stylistic/ts/comma-dangle", - ], - "schema": { - "$defs": { - "value": { - "enum": [ - "always-multiline", - "always", - "never", - "only-multiline", - ], - "type": "string", - }, - "valueWithIgnore": { - "enum": [ - "always-multiline", - "always", - "never", - "only-multiline", - "ignore", - ], - "type": "string", - }, - }, - "additionalItems": false, - "items": [ - { - "oneOf": [ - { - "$ref": "#/$defs/value", - }, - { - "additionalProperties": false, - "properties": { - "arrays": { - "$ref": "#/$defs/valueWithIgnore", - }, - "enums": { - "$ref": "#/$defs/valueWithIgnore", - }, - "exports": { - "$ref": "#/$defs/valueWithIgnore", - }, - "functions": { - "$ref": "#/$defs/valueWithIgnore", - }, - "generics": { - "$ref": "#/$defs/valueWithIgnore", - }, - "imports": { - "$ref": "#/$defs/valueWithIgnore", - }, - "objects": { - "$ref": "#/$defs/valueWithIgnore", - }, - "tuples": { - "$ref": "#/$defs/valueWithIgnore", - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "array", - }, - "type": "layout", - }, - }, - "comma-spacing": { - "create": [Function], - "defaultOptions": [ - { - "after": true, - "before": false, - }, - ], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce consistent spacing before and after commas", - "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/comma-spacing", - }, - "fixable": "whitespace", - "messages": { - "missing": "A space is required {{loc}} ','.", - "unexpected": "There should be no space {{loc}} ','.", - }, - "replacedBy": [ - "@stylistic/ts/comma-spacing", - ], - "schema": [ - { - "additionalProperties": false, - "properties": { - "after": { - "default": true, - "type": "boolean", - }, - "before": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, "consistent-generic-constructors": { "create": [Function], "defaultOptions": [ @@ -1909,37 +1731,30 @@ You must still type the parameters of the function.", "type": "problem", }, }, - "func-call-spacing": { + "init-declarations": { "create": [Function], "defaultOptions": [ - "never", - {}, + "always", ], "meta": { - "deprecated": true, "docs": { - "description": "Require or disallow spacing between function identifiers and their invocations", + "description": "Require or disallow initialization in variable declarations", "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/func-call-spacing", + "url": "https://typescript-eslint.io/rules/init-declarations", }, - "fixable": "whitespace", + "hasSuggestions": undefined, "messages": { - "missing": "Missing space between function name and paren.", - "unexpectedNewline": "Unexpected newline between function name and paren.", - "unexpectedWhitespace": "Unexpected whitespace between function name and paren.", + "initialized": "Variable '{{idName}}' should be initialized on declaration.", + "notInitialized": "Variable '{{idName}}' should not be initialized on declaration.", }, - "replacedBy": [ - "@stylistic/ts/func-call-spacing", - ], "schema": { "anyOf": [ { "items": [ { "enum": [ - "never", + "always", ], - "type": "string", }, ], "maxItems": 1, @@ -1950,14 +1765,13 @@ You must still type the parameters of the function.", "items": [ { "enum": [ - "always", + "never", ], - "type": "string", }, { "additionalProperties": false, "properties": { - "allowNewlines": { + "ignoreForLoopInit": { "type": "boolean", }, }, @@ -1970,1689 +1784,40 @@ You must still type the parameters of the function.", }, ], }, - "type": "layout", + "type": "suggestion", }, }, - "indent": { + "max-params": { "create": [Function], "defaultOptions": [ - 4, { - "SwitchCase": 1, - "flatTernaryExpressions": false, - "ignoredNodes": [], + "countVoidThis": false, + "max": 3, }, ], "meta": { - "deprecated": true, "docs": { - "description": "Enforce consistent indentation", + "description": "Enforce a maximum number of parameters in function definitions", "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/indent", + "url": "https://typescript-eslint.io/rules/max-params", }, - "fixable": "whitespace", - "hasSuggestions": undefined, "messages": { - "wrongIndentation": "Expected indentation of {{expected}} but found {{actual}}.", + "exceed": "{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}.", }, - "replacedBy": [ - "@stylistic/ts/indent", - ], "schema": [ { - "oneOf": [ - { - "enum": [ - "tab", - ], + "additionalProperties": false, + "properties": { + "countVoidThis": { + "type": "boolean", }, - { + "max": { "minimum": 0, "type": "integer", }, - ], - }, - { - "additionalProperties": false, - "properties": { - "ArrayExpression": { - "oneOf": [ - { - "minimum": 0, - "type": "integer", - }, - { - "enum": [ - "first", - "off", - ], - }, - ], - }, - "CallExpression": { - "additionalProperties": false, - "properties": { - "arguments": { - "oneOf": [ - { - "minimum": 0, - "type": "integer", - }, - { - "enum": [ - "first", - "off", - ], - }, - ], - }, - }, - "type": "object", - }, - "FunctionDeclaration": { - "additionalProperties": false, - "properties": { - "body": { - "minimum": 0, - "type": "integer", - }, - "parameters": { - "oneOf": [ - { - "minimum": 0, - "type": "integer", - }, - { - "enum": [ - "first", - "off", - ], - }, - ], - }, - }, - "type": "object", - }, - "FunctionExpression": { - "additionalProperties": false, - "properties": { - "body": { - "minimum": 0, - "type": "integer", - }, - "parameters": { - "oneOf": [ - { - "minimum": 0, - "type": "integer", - }, - { - "enum": [ - "first", - "off", - ], - }, - ], - }, - }, - "type": "object", - }, - "ImportDeclaration": { - "oneOf": [ - { - "minimum": 0, - "type": "integer", - }, - { - "enum": [ - "first", - "off", - ], - }, - ], - }, - "MemberExpression": { - "oneOf": [ - { - "minimum": 0, - "type": "integer", - }, - { - "enum": [ - "off", - ], - }, - ], - }, - "ObjectExpression": { - "oneOf": [ - { - "minimum": 0, - "type": "integer", - }, - { - "enum": [ - "first", - "off", - ], - }, - ], - }, - "StaticBlock": { - "additionalProperties": false, - "properties": { - "body": { - "minimum": 0, - "type": "integer", - }, - }, - "type": "object", - }, - "SwitchCase": { - "default": 0, - "minimum": 0, - "type": "integer", - }, - "VariableDeclarator": { - "oneOf": [ - { - "oneOf": [ - { - "minimum": 0, - "type": "integer", - }, - { - "enum": [ - "first", - "off", - ], - }, - ], - }, - { - "additionalProperties": false, - "properties": { - "const": { - "oneOf": [ - { - "minimum": 0, - "type": "integer", - }, - { - "enum": [ - "first", - "off", - ], - }, - ], - }, - "let": { - "oneOf": [ - { - "minimum": 0, - "type": "integer", - }, - { - "enum": [ - "first", - "off", - ], - }, - ], - }, - "var": { - "oneOf": [ - { - "minimum": 0, - "type": "integer", - }, - { - "enum": [ - "first", - "off", - ], - }, - ], - }, - }, - "type": "object", - }, - ], - }, - "flatTernaryExpressions": { - "default": false, - "type": "boolean", - }, - "ignoreComments": { - "default": false, - "type": "boolean", - }, - "ignoredNodes": { - "items": { - "not": { - "pattern": ":exit$", - }, - "type": "string", - }, - "type": "array", - }, - "offsetTernaryExpressions": { - "default": false, - "type": "boolean", - }, - "outerIIFEBody": { - "oneOf": [ - { - "minimum": 0, - "type": "integer", - }, - { - "enum": [ - "off", - ], - }, - ], - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - "init-declarations": { - "create": [Function], - "defaultOptions": [ - "always", - ], - "meta": { - "docs": { - "description": "Require or disallow initialization in variable declarations", - "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/init-declarations", - }, - "hasSuggestions": undefined, - "messages": { - "initialized": "Variable '{{idName}}' should be initialized on declaration.", - "notInitialized": "Variable '{{idName}}' should not be initialized on declaration.", - }, - "schema": { - "anyOf": [ - { - "items": [ - { - "enum": [ - "always", - ], - }, - ], - "maxItems": 1, - "minItems": 0, - "type": "array", - }, - { - "items": [ - { - "enum": [ - "never", - ], - }, - { - "additionalProperties": false, - "properties": { - "ignoreForLoopInit": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "maxItems": 2, - "minItems": 0, - "type": "array", - }, - ], - }, - "type": "suggestion", - }, - }, - "key-spacing": { - "create": [Function], - "defaultOptions": [ - {}, - ], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce consistent spacing between property names and type annotations in types and interfaces", - "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/key-spacing", - }, - "fixable": "whitespace", - "hasSuggestions": undefined, - "messages": { - "extraKey": "Extra space after {{computed}}key '{{key}}'.", - "extraValue": "Extra space before value for {{computed}}key '{{key}}'.", - "missingKey": "Missing space after {{computed}}key '{{key}}'.", - "missingValue": "Missing space before value for {{computed}}key '{{key}}'.", - }, - "replacedBy": [ - "@stylistic/ts/key-spacing", - ], - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "afterColon": { - "type": "boolean", - }, - "align": { - "anyOf": [ - { - "enum": [ - "colon", - "value", - ], - }, - { - "additionalProperties": false, - "properties": { - "afterColon": { - "type": "boolean", - }, - "beforeColon": { - "type": "boolean", - }, - "mode": { - "enum": [ - "strict", - "minimum", - ], - }, - "on": { - "enum": [ - "colon", - "value", - ], - }, - }, - "type": "object", - }, - ], - }, - "beforeColon": { - "type": "boolean", - }, - "mode": { - "enum": [ - "strict", - "minimum", - ], - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "multiLine": { - "additionalProperties": false, - "properties": { - "afterColon": { - "type": "boolean", - }, - "align": { - "anyOf": [ - { - "enum": [ - "colon", - "value", - ], - }, - { - "additionalProperties": false, - "properties": { - "afterColon": { - "type": "boolean", - }, - "beforeColon": { - "type": "boolean", - }, - "mode": { - "enum": [ - "strict", - "minimum", - ], - }, - "on": { - "enum": [ - "colon", - "value", - ], - }, - }, - "type": "object", - }, - ], - }, - "beforeColon": { - "type": "boolean", - }, - "mode": { - "enum": [ - "strict", - "minimum", - ], - }, - }, - "type": "object", - }, - "singleLine": { - "additionalProperties": false, - "properties": { - "afterColon": { - "type": "boolean", - }, - "beforeColon": { - "type": "boolean", - }, - "mode": { - "enum": [ - "strict", - "minimum", - ], - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - { - "additionalProperties": false, - "properties": { - "align": { - "additionalProperties": false, - "properties": { - "afterColon": { - "type": "boolean", - }, - "beforeColon": { - "type": "boolean", - }, - "mode": { - "enum": [ - "strict", - "minimum", - ], - }, - "on": { - "enum": [ - "colon", - "value", - ], - }, - }, - "type": "object", - }, - "multiLine": { - "additionalProperties": false, - "properties": { - "afterColon": { - "type": "boolean", - }, - "beforeColon": { - "type": "boolean", - }, - "mode": { - "enum": [ - "strict", - "minimum", - ], - }, - }, - "type": "object", - }, - "singleLine": { - "additionalProperties": false, - "properties": { - "afterColon": { - "type": "boolean", - }, - "beforeColon": { - "type": "boolean", - }, - "mode": { - "enum": [ - "strict", - "minimum", - ], - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "layout", - }, - }, - "keyword-spacing": { - "create": [Function], - "defaultOptions": [ - {}, - ], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce consistent spacing before and after keywords", - "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/keyword-spacing", - }, - "fixable": "whitespace", - "hasSuggestions": undefined, - "messages": { - "expectedAfter": "Expected space(s) after "{{value}}".", - "expectedBefore": "Expected space(s) before "{{value}}".", - "unexpectedAfter": "Unexpected space(s) after "{{value}}".", - "unexpectedBefore": "Unexpected space(s) before "{{value}}".", - }, - "replacedBy": [ - "@stylistic/ts/keyword-spacing", - ], - "schema": [ - { - "additionalProperties": false, - "properties": { - "after": { - "default": true, - "type": "boolean", - }, - "before": { - "default": true, - "type": "boolean", - }, - "overrides": { - "additionalProperties": false, - "properties": { - "abstract": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "as": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "async": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "await": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "boolean": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "break": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "byte": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "case": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "catch": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "char": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "class": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "const": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "continue": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "debugger": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "default": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "delete": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "do": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "double": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "else": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "enum": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "export": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "extends": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "false": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "final": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "finally": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "float": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "for": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "from": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "function": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "get": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "goto": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "if": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "implements": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "import": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "in": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "instanceof": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "int": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "interface": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "let": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "long": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "native": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "new": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "null": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "of": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "package": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "private": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "protected": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "public": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "return": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "set": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "short": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "static": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "super": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "switch": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "synchronized": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "this": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "throw": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "throws": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "transient": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "true": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "try": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "type": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "typeof": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "var": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "void": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "volatile": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "while": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "with": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - "yield": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - "lines-around-comment": { - "create": [Function], - "defaultOptions": [ - { - "beforeBlockComment": true, - }, - ], - "meta": { - "deprecated": true, - "docs": { - "description": "Require empty lines around comments", - "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/lines-around-comment", - }, - "fixable": "whitespace", - "hasSuggestions": undefined, - "messages": { - "after": "Expected line after comment.", - "before": "Expected line before comment.", - }, - "replacedBy": [ - "@stylistic/ts/lines-around-comment", - ], - "schema": [ - { - "additionalProperties": false, - "properties": { - "afterBlockComment": { - "default": false, - "type": "boolean", - }, - "afterLineComment": { - "default": false, - "type": "boolean", - }, - "allowArrayEnd": { - "type": "boolean", - }, - "allowArrayStart": { - "type": "boolean", - }, - "allowBlockEnd": { - "default": false, - "type": "boolean", - }, - "allowBlockStart": { - "default": false, - "type": "boolean", - }, - "allowClassEnd": { - "type": "boolean", - }, - "allowClassStart": { - "type": "boolean", - }, - "allowEnumEnd": { - "type": "boolean", - }, - "allowEnumStart": { - "type": "boolean", - }, - "allowInterfaceEnd": { - "type": "boolean", - }, - "allowInterfaceStart": { - "type": "boolean", - }, - "allowModuleEnd": { - "type": "boolean", - }, - "allowModuleStart": { - "type": "boolean", - }, - "allowObjectEnd": { - "type": "boolean", - }, - "allowObjectStart": { - "type": "boolean", - }, - "allowTypeEnd": { - "type": "boolean", - }, - "allowTypeStart": { - "type": "boolean", - }, - "applyDefaultIgnorePatterns": { - "type": "boolean", - }, - "beforeBlockComment": { - "default": true, - "type": "boolean", - }, - "beforeLineComment": { - "default": false, - "type": "boolean", - }, - "ignorePattern": { - "type": "string", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - "lines-between-class-members": { - "create": [Function], - "defaultOptions": [ - "always", - { - "exceptAfterOverload": true, - "exceptAfterSingleLine": false, - }, - ], - "meta": { - "deprecated": true, - "docs": { - "description": "Require or disallow an empty line between class members", - "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/lines-between-class-members", - }, - "fixable": "whitespace", - "hasSuggestions": undefined, - "messages": { - "always": "Expected blank line between class members.", - "never": "Unexpected blank line between class members.", - }, - "replacedBy": [ - "@stylistic/ts/lines-between-class-members", - ], - "schema": [ - { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "enforce": { - "items": { - "additionalProperties": false, - "properties": { - "blankLine": { - "enum": [ - "always", - "never", - ], - }, - "next": { - "enum": [ - "method", - "field", - "*", - ], - }, - "prev": { - "enum": [ - "method", - "field", - "*", - ], - }, - }, - "required": [ - "blankLine", - "prev", - "next", - ], - "type": "object", - }, - "minItems": 1, - "type": "array", - }, - }, - "required": [ - "enforce", - ], - "type": "object", - }, - { - "enum": [ - "always", - "never", - ], - }, - ], - }, - { - "additionalProperties": false, - "properties": { - "exceptAfterOverload": { - "default": true, - "type": "boolean", - }, - "exceptAfterSingleLine": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, - "max-params": { - "create": [Function], - "defaultOptions": [ - { - "countVoidThis": false, - "max": 3, - }, - ], - "meta": { - "docs": { - "description": "Enforce a maximum number of parameters in function definitions", - "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/max-params", - }, - "messages": { - "exceed": "{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}.", - }, - "schema": [ - { - "additionalProperties": false, - "properties": { - "countVoidThis": { - "type": "boolean", - }, - "max": { - "minimum": 0, - "type": "integer", - }, - "maximum": { - "minimum": 0, - "type": "integer", + "maximum": { + "minimum": 0, + "type": "integer", }, }, "type": "object", @@ -3661,138 +1826,6 @@ You must still type the parameters of the function.", "type": "suggestion", }, }, - "member-delimiter-style": { - "create": [Function], - "defaultOptions": [ - { - "multiline": { - "delimiter": "semi", - "requireLast": true, - }, - "multilineDetection": "brackets", - "singleline": { - "delimiter": "semi", - "requireLast": false, - }, - }, - ], - "meta": { - "deprecated": true, - "docs": { - "description": "Require a specific member delimiter style for interfaces and type literals", - "url": "https://typescript-eslint.io/rules/member-delimiter-style", - }, - "fixable": "whitespace", - "messages": { - "expectedComma": "Expected a comma.", - "expectedSemi": "Expected a semicolon.", - "unexpectedComma": "Unexpected separator (,).", - "unexpectedSemi": "Unexpected separator (;).", - }, - "replacedBy": [ - "@stylistic/ts/member-delimiter-style", - ], - "schema": [ - { - "$defs": { - "delimiterConfig": { - "additionalProperties": false, - "properties": { - "multiline": { - "additionalProperties": false, - "properties": { - "delimiter": { - "$ref": "#/items/0/$defs/multiLineOption", - }, - "requireLast": { - "type": "boolean", - }, - }, - "type": "object", - }, - "singleline": { - "additionalProperties": false, - "properties": { - "delimiter": { - "$ref": "#/items/0/$defs/singleLineOption", - }, - "requireLast": { - "type": "boolean", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - "multiLineOption": { - "enum": [ - "none", - "semi", - "comma", - ], - "type": "string", - }, - "singleLineOption": { - "enum": [ - "semi", - "comma", - ], - "type": "string", - }, - }, - "additionalProperties": false, - "properties": { - "multiline": { - "additionalProperties": false, - "properties": { - "delimiter": { - "$ref": "#/items/0/$defs/multiLineOption", - }, - "requireLast": { - "type": "boolean", - }, - }, - "type": "object", - }, - "multilineDetection": { - "enum": [ - "brackets", - "last-member", - ], - "type": "string", - }, - "overrides": { - "additionalProperties": false, - "properties": { - "interface": { - "$ref": "#/items/0/$defs/delimiterConfig", - }, - "typeLiteral": { - "$ref": "#/items/0/$defs/delimiterConfig", - }, - }, - "type": "object", - }, - "singleline": { - "additionalProperties": false, - "properties": { - "delimiter": { - "$ref": "#/items/0/$defs/singleLineOption", - }, - "requireLast": { - "type": "boolean", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, "member-ordering": { "create": [Function], "defaultOptions": [ @@ -6272,7 +4305,7 @@ You must still type the parameters of the function.", "meta": { "docs": { "description": "Disallow using the \`delete\` operator on array values", - "recommended": "strict", + "recommended": "recommended", "requiresTypeChecking": true, "url": "https://typescript-eslint.io/rules/no-array-delete", }, @@ -6536,9 +4569,9 @@ You must still type the parameters of the function.", }, ], "meta": { + "deprecated": true, "docs": { "description": "Disallow the declaration of empty interfaces", - "recommended": "stylistic", "url": "https://typescript-eslint.io/rules/no-empty-interface", }, "fixable": "code", @@ -6547,6 +4580,9 @@ You must still type the parameters of the function.", "noEmpty": "An empty interface is equivalent to \`{}\`.", "noEmptyWithSuper": "An interface declaring no members is equivalent to its supertype.", }, + "replacedBy": [ + "@typescript-eslint/no-empty-object-type", + ], "schema": [ { "additionalProperties": false, @@ -6561,175 +4597,120 @@ You must still type the parameters of the function.", "type": "suggestion", }, }, - "no-explicit-any": { + "no-empty-object-type": { "create": [Function], "defaultOptions": [ { - "fixToUnknown": false, - "ignoreRestArgs": false, + "allowInterfaces": "never", + "allowObjectTypes": "never", }, ], "meta": { "docs": { - "description": "Disallow the \`any\` type", + "description": "Disallow accidentally using the "empty object" type", "recommended": "recommended", - "url": "https://typescript-eslint.io/rules/no-explicit-any", + "url": "https://typescript-eslint.io/rules/no-empty-object-type", }, - "fixable": "code", "hasSuggestions": true, "messages": { - "suggestNever": "Use \`never\` instead, this is useful when instantiating generic type parameters that you don't need to know the type of.", - "suggestUnknown": "Use \`unknown\` instead, this will force you to explicitly, and safely assert the type is correct.", - "unexpectedAny": "Unexpected any. Specify a different type.", + "noEmptyInterface": "An empty interface declaration allows any non-nullish value, including literals like \`0\` and \`""\`. +- If that's what you want, disable this lint rule with an inline comment or configure the '{{ option }}' rule option. +- If you want a type meaning "any object", you probably want \`object\` instead. +- If you want a type meaning "any value", you probably want \`unknown\` instead.", + "noEmptyInterfaceWithSuper": "An interface declaring no members is equivalent to its supertype.", + "noEmptyObject": "The \`{}\` ("empty object") type allows any non-nullish value, including literals like \`0\` and \`""\`. +- If that's what you want, disable this lint rule with an inline comment or configure the '{{ option }}' rule option. +- If you want a type meaning "any object", you probably want \`object\` instead. +- If you want a type meaning "any value", you probably want \`unknown\` instead.", + "replaceEmptyInterface": "Replace empty interface with \`{{replacement}}\`.", + "replaceEmptyInterfaceWithSuper": "Replace empty interface with a type alias.", + "replaceEmptyObjectType": "Replace \`{}\` with \`{{replacement}}\`.", }, "schema": [ { "additionalProperties": false, "properties": { - "fixToUnknown": { - "description": "Whether to enable auto-fixing in which the \`any\` type is converted to the \`unknown\` type.", - "type": "boolean", - }, - "ignoreRestArgs": { - "description": "Whether to ignore rest parameter arrays.", - "type": "boolean", + "allowInterfaces": { + "enum": [ + "always", + "never", + "with-single-extends", + ], + "type": "string", + }, + "allowObjectTypes": { + "enum": [ + "always", + "in-type-alias-with-name", + "never", + ], + "type": "string", + }, + "allowWithName": { + "type": "string", }, }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "no-extra-non-null-assertion": { - "create": [Function], - "defaultOptions": [], - "meta": { - "docs": { - "description": "Disallow extra non-null assertions", - "recommended": "recommended", - "url": "https://typescript-eslint.io/rules/no-extra-non-null-assertion", - }, - "fixable": "code", - "messages": { - "noExtraNonNullAssertion": "Forbidden extra non-null assertion.", - }, - "schema": [], - "type": "problem", - }, - }, - "no-extra-parens": { - "create": [Function], - "defaultOptions": [ - "all", - ], - "meta": { - "deprecated": true, - "docs": { - "description": "Disallow unnecessary parentheses", - "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/no-extra-parens", - }, - "fixable": "code", - "hasSuggestions": undefined, - "messages": { - "unexpected": "Unnecessary parentheses around expression.", - }, - "replacedBy": [ - "@stylistic/ts/no-extra-parens", - ], - "schema": { - "anyOf": [ - { - "items": [ - { - "enum": [ - "functions", - ], - }, - ], - "maxItems": 1, - "minItems": 0, - "type": "array", - }, - { - "items": [ - { - "enum": [ - "all", - ], - }, - { - "additionalProperties": false, - "properties": { - "allowParensAfterCommentPattern": { - "type": "string", - }, - "conditionalAssign": { - "type": "boolean", - }, - "enforceForArrowConditionals": { - "type": "boolean", - }, - "enforceForFunctionPrototypeMethods": { - "type": "boolean", - }, - "enforceForNewInMemberExpressions": { - "type": "boolean", - }, - "enforceForSequenceExpressions": { - "type": "boolean", - }, - "ignoreJSX": { - "enum": [ - "none", - "all", - "single-line", - "multi-line", - ], - }, - "nestedBinaryExpressions": { - "type": "boolean", - }, - "returnAssign": { - "type": "boolean", - }, - "ternaryOperandBinaryExpressions": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "maxItems": 2, - "minItems": 0, - "type": "array", - }, - ], + "type": "object", + }, + ], + "type": "suggestion", + }, + }, + "no-explicit-any": { + "create": [Function], + "defaultOptions": [ + { + "fixToUnknown": false, + "ignoreRestArgs": false, }, - "type": "layout", + ], + "meta": { + "docs": { + "description": "Disallow the \`any\` type", + "recommended": "recommended", + "url": "https://typescript-eslint.io/rules/no-explicit-any", + }, + "fixable": "code", + "hasSuggestions": true, + "messages": { + "suggestNever": "Use \`never\` instead, this is useful when instantiating generic type parameters that you don't need to know the type of.", + "suggestUnknown": "Use \`unknown\` instead, this will force you to explicitly, and safely assert the type is correct.", + "unexpectedAny": "Unexpected any. Specify a different type.", + }, + "schema": [ + { + "additionalProperties": false, + "properties": { + "fixToUnknown": { + "description": "Whether to enable auto-fixing in which the \`any\` type is converted to the \`unknown\` type.", + "type": "boolean", + }, + "ignoreRestArgs": { + "description": "Whether to ignore rest parameter arrays.", + "type": "boolean", + }, + }, + "type": "object", + }, + ], + "type": "suggestion", }, }, - "no-extra-semi": { + "no-extra-non-null-assertion": { "create": [Function], "defaultOptions": [], "meta": { - "deprecated": true, "docs": { - "description": "Disallow unnecessary semicolons", - "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/no-extra-semi", + "description": "Disallow extra non-null assertions", + "recommended": "recommended", + "url": "https://typescript-eslint.io/rules/no-extra-non-null-assertion", }, "fixable": "code", - "hasSuggestions": undefined, "messages": { - "unexpected": "Unnecessary semicolon.", + "noExtraNonNullAssertion": "Forbidden extra non-null assertion.", }, - "replacedBy": [ - "@stylistic/ts/no-extra-semi", - ], "schema": [], - "type": "suggestion", + "type": "problem", }, }, "no-extraneous-class": { @@ -7015,10 +4996,10 @@ You must still type the parameters of the function.", "create": [Function], "defaultOptions": [], "meta": { + "deprecated": true, "docs": { "description": "Disallow literal numbers that lose precision", "extendsBaseRule": true, - "recommended": "recommended", "url": "https://typescript-eslint.io/rules/no-loss-of-precision", }, "hasSuggestions": undefined, @@ -7400,11 +5381,13 @@ You must still type the parameters of the function.", "defaultOptions": [ { "allow": [], + "allowAsImport": false, }, ], "meta": { "docs": { "description": "Disallow invocation of \`require()\`", + "recommended": "recommended", "url": "https://typescript-eslint.io/rules/no-require-imports", }, "messages": { @@ -7421,6 +5404,10 @@ You must still type the parameters of the function.", }, "type": "array", }, + "allowAsImport": { + "description": "Allows \`require\` statements in import declarations.", + "type": "boolean", + }, }, "type": "object", }, @@ -7731,46 +5718,6 @@ You must still type the parameters of the function.", "type": "suggestion", }, }, - "no-throw-literal": { - "create": [Function], - "defaultOptions": [ - { - "allowThrowingAny": true, - "allowThrowingUnknown": true, - }, - ], - "meta": { - "deprecated": true, - "docs": { - "description": "Disallow throwing literals as exceptions", - "extendsBaseRule": true, - "requiresTypeChecking": true, - "url": "https://typescript-eslint.io/rules/no-throw-literal", - }, - "messages": { - "object": "Expected an error object to be thrown.", - "undef": "Do not throw undefined.", - }, - "replacedBy": [ - "@typescript-eslint/only-throw-error", - ], - "schema": [ - { - "additionalProperties": false, - "properties": { - "allowThrowingAny": { - "type": "boolean", - }, - "allowThrowingUnknown": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "problem", - }, - }, "no-type-alias": { "create": [Function], "defaultOptions": [ @@ -8182,6 +6129,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or "meta": { "docs": { "description": "Require unary negation to take a number", + "recommended": "recommended", "requiresTypeChecking": true, "url": "https://typescript-eslint.io/rules/no-unsafe-unary-minus", }, @@ -8205,6 +6153,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or "docs": { "description": "Disallow unused expressions", "extendsBaseRule": true, + "recommended": "recommended", "url": "https://typescript-eslint.io/rules/no-unused-expressions", }, "hasSuggestions": undefined, @@ -8417,7 +6366,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or "meta": { "docs": { "description": "Disallow unnecessary template literals", - "recommended": "strict", + "recommended": "recommended", "requiresTypeChecking": true, "url": "https://typescript-eslint.io/rules/no-useless-template-literals", }, @@ -8437,14 +6386,17 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or }, ], "meta": { + "deprecated": true, "docs": { "description": "Disallow \`require\` statements except in import statements", - "recommended": "recommended", "url": "https://typescript-eslint.io/rules/no-var-requires", }, "messages": { "noVarReqs": "Require statement not part of import statement.", }, + "replacedBy": [ + "@typescript-eslint/no-require-imports", + ], "schema": [ { "additionalProperties": false, @@ -8481,51 +6433,6 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or "type": "suggestion", }, }, - "object-curly-spacing": { - "create": [Function], - "defaultOptions": [ - "never", - ], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce consistent spacing inside braces", - "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/object-curly-spacing", - }, - "fixable": "whitespace", - "messages": { - "requireSpaceAfter": "A space is required after '{{token}}'.", - "requireSpaceBefore": "A space is required before '{{token}}'.", - "unexpectedSpaceAfter": "There should be no space after '{{token}}'.", - "unexpectedSpaceBefore": "There should be no space before '{{token}}'.", - }, - "replacedBy": [ - "@stylistic/ts/object-curly-spacing", - ], - "schema": [ - { - "enum": [ - "always", - "never", - ], - }, - { - "additionalProperties": false, - "properties": { - "arraysInObjects": { - "type": "boolean", - }, - "objectsInObjects": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, "only-throw-error": { "create": [Function], "defaultOptions": [ @@ -8538,7 +6445,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or "docs": { "description": "Disallow throwing non-\`Error\` values as exceptions", "extendsBaseRule": "no-throw-literal", - "recommended": "strict", + "recommended": "recommended", "requiresTypeChecking": true, "url": "https://typescript-eslint.io/rules/only-throw-error", }, @@ -8563,162 +6470,6 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or "type": "problem", }, }, - "padding-line-between-statements": { - "create": [Function], - "defaultOptions": [], - "meta": { - "deprecated": true, - "docs": { - "description": "Require or disallow padding lines between statements", - "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/padding-line-between-statements", - }, - "fixable": "whitespace", - "hasSuggestions": false, - "messages": { - "expectedBlankLine": "Expected blank line before this statement.", - "unexpectedBlankLine": "Unexpected blank line before this statement.", - }, - "replacedBy": [ - "@stylistic/ts/padding-line-between-statements", - ], - "schema": { - "$defs": { - "paddingType": { - "enum": [ - "any", - "never", - "always", - ], - "type": "string", - }, - "statementType": { - "anyOf": [ - { - "enum": [ - "*", - "block-like", - "exports", - "require", - "directive", - "expression", - "iife", - "multiline-block-like", - "multiline-expression", - "multiline-const", - "multiline-let", - "multiline-var", - "singleline-const", - "singleline-let", - "singleline-var", - "block", - "empty", - "function", - "break", - "case", - "class", - "const", - "continue", - "debugger", - "default", - "do", - "export", - "for", - "if", - "import", - "let", - "return", - "switch", - "throw", - "try", - "var", - "while", - "with", - "interface", - "type", - ], - "type": "string", - }, - { - "additionalItems": false, - "items": { - "enum": [ - "*", - "block-like", - "exports", - "require", - "directive", - "expression", - "iife", - "multiline-block-like", - "multiline-expression", - "multiline-const", - "multiline-let", - "multiline-var", - "singleline-const", - "singleline-let", - "singleline-var", - "block", - "empty", - "function", - "break", - "case", - "class", - "const", - "continue", - "debugger", - "default", - "do", - "export", - "for", - "if", - "import", - "let", - "return", - "switch", - "throw", - "try", - "var", - "while", - "with", - "interface", - "type", - ], - "type": "string", - }, - "minItems": 1, - "type": "array", - "uniqueItems": true, - }, - ], - }, - }, - "additionalItems": false, - "items": { - "additionalProperties": false, - "properties": { - "blankLine": { - "$ref": "#/$defs/paddingType", - }, - "next": { - "$ref": "#/$defs/statementType", - }, - "prev": { - "$ref": "#/$defs/statementType", - }, - }, - "required": [ - "blankLine", - "prev", - "next", - ], - "type": "object", - }, - "type": "array", - }, - "type": "layout", - }, - }, "parameter-properties": { "create": [Function], "defaultOptions": [ @@ -8906,6 +6657,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or "meta": { "docs": { "description": "Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result", + "recommended": "stylistic", "requiresTypeChecking": true, "url": "https://typescript-eslint.io/rules/prefer-find", }, @@ -8958,7 +6710,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or "meta": { "docs": { "description": "Enforce \`includes\` method over \`indexOf\` method", - "recommended": "strict", + "recommended": "stylistic", "requiresTypeChecking": true, "url": "https://typescript-eslint.io/rules/prefer-includes", }, @@ -9008,7 +6760,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or "meta": { "docs": { "description": "Require using \`namespace\` keyword over \`module\` keyword to declare custom TypeScript modules", - "recommended": "stylistic", + "recommended": "recommended", "url": "https://typescript-eslint.io/rules/prefer-namespace-keyword", }, "fixable": "code", @@ -9024,7 +6776,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or "defaultOptions": [ { "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": false, - "ignoreConditionalTests": false, + "ignoreConditionalTests": true, "ignoreMixedLogicalExpressions": false, "ignorePrimitives": { "bigint": false, @@ -9180,7 +6932,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or "docs": { "description": "Require using Error objects as Promise rejection reasons", "extendsBaseRule": true, - "recommended": "strict", + "recommended": "recommended", "requiresTypeChecking": true, "url": "https://typescript-eslint.io/rules/prefer-promise-reject-errors", }, @@ -9405,6 +7157,7 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or "meta": { "docs": { "description": "Enforce \`RegExp#exec\` over \`String#match\` if no global flag is provided", + "recommended": "stylistic", "requiresTypeChecking": true, "url": "https://typescript-eslint.io/rules/prefer-regexp-exec", }, @@ -9538,68 +7291,11 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or "checkMethodDeclarations": { "type": "boolean", }, - }, - "type": "object", - }, - ], - "type": "suggestion", - }, - }, - "quotes": { - "create": [Function], - "defaultOptions": [ - "double", - { - "allowTemplateLiterals": false, - "avoidEscape": false, - }, - ], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce the consistent use of either backticks, double, or single quotes", - "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/quotes", - }, - "fixable": "code", - "hasSuggestions": undefined, - "messages": { - "wrongQuotes": "Strings must use {{description}}.", - }, - "replacedBy": [ - "@stylistic/ts/quotes", - ], - "schema": [ - { - "enum": [ - "single", - "double", - "backtick", - ], - }, - { - "anyOf": [ - { - "enum": [ - "avoid-escape", - ], - }, - { - "additionalProperties": false, - "properties": { - "allowTemplateLiterals": { - "type": "boolean", - }, - "avoidEscape": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], + }, + "type": "object", }, ], - "type": "layout", + "type": "suggestion", }, }, "require-array-sort-compare": { @@ -9825,91 +7521,11 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or "type": "problem", }, }, - "semi": { - "create": [Function], - "defaultOptions": [ - "always", - { - "beforeStatementContinuationChars": "any", - "omitLastInOneLineBlock": false, - }, - ], - "meta": { - "deprecated": true, - "docs": { - "description": "Require or disallow semicolons instead of ASI", - "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/semi", - }, - "fixable": "code", - "hasSuggestions": undefined, - "messages": { - "extraSemi": "Extra semicolon.", - "missingSemi": "Missing semicolon.", - }, - "replacedBy": [ - "@stylistic/ts/semi", - ], - "schema": { - "anyOf": [ - { - "items": [ - { - "enum": [ - "never", - ], - }, - { - "additionalProperties": false, - "properties": { - "beforeStatementContinuationChars": { - "enum": [ - "always", - "any", - "never", - ], - }, - }, - "type": "object", - }, - ], - "maxItems": 2, - "minItems": 0, - "type": "array", - }, - { - "items": [ - { - "enum": [ - "always", - ], - }, - { - "additionalProperties": false, - "properties": { - "omitLastInOneLineBlock": { - "type": "boolean", - }, - "omitLastInOneLineClassBody": { - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "maxItems": 2, - "minItems": 0, - "type": "array", - }, - ], - }, - "type": "layout", - }, - }, "sort-type-constituents": { "create": [Function], "defaultOptions": [ { + "caseSensitive": false, "checkIntersections": true, "checkUnions": true, "groupOrder": [ @@ -9944,6 +7560,10 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or { "additionalProperties": false, "properties": { + "caseSensitive": { + "description": "Whether to sort using case sensitive sorting.", + "type": "boolean", + }, "checkIntersections": { "description": "Whether to check intersection types.", "type": "boolean", @@ -9980,172 +7600,6 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or "type": "suggestion", }, }, - "space-before-blocks": { - "create": [Function], - "defaultOptions": [ - "always", - ], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce consistent spacing before blocks", - "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/space-before-blocks", - }, - "fixable": "whitespace", - "hasSuggestions": undefined, - "messages": { - "missingSpace": "Missing space before opening brace.", - "unexpectedSpace": "Unexpected space before opening brace.", - }, - "replacedBy": [ - "@stylistic/ts/space-before-blocks", - ], - "schema": [ - { - "oneOf": [ - { - "enum": [ - "always", - "never", - ], - }, - { - "additionalProperties": false, - "properties": { - "classes": { - "enum": [ - "always", - "never", - "off", - ], - }, - "functions": { - "enum": [ - "always", - "never", - "off", - ], - }, - "keywords": { - "enum": [ - "always", - "never", - "off", - ], - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "layout", - }, - }, - "space-before-function-paren": { - "create": [Function], - "defaultOptions": [ - "always", - ], - "meta": { - "deprecated": true, - "docs": { - "description": "Enforce consistent spacing before function parenthesis", - "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/space-before-function-paren", - }, - "fixable": "whitespace", - "messages": { - "missing": "Missing space before function parentheses.", - "unexpected": "Unexpected space before function parentheses.", - }, - "replacedBy": [ - "@stylistic/ts/space-before-function-paren", - ], - "schema": [ - { - "oneOf": [ - { - "enum": [ - "always", - "never", - ], - "type": "string", - }, - { - "additionalProperties": false, - "properties": { - "anonymous": { - "enum": [ - "always", - "never", - "ignore", - ], - "type": "string", - }, - "asyncArrow": { - "enum": [ - "always", - "never", - "ignore", - ], - "type": "string", - }, - "named": { - "enum": [ - "always", - "never", - "ignore", - ], - "type": "string", - }, - }, - "type": "object", - }, - ], - }, - ], - "type": "layout", - }, - }, - "space-infix-ops": { - "create": [Function], - "defaultOptions": [ - { - "int32Hint": false, - }, - ], - "meta": { - "deprecated": true, - "docs": { - "description": "Require spacing around infix operators", - "extendsBaseRule": true, - "url": "https://typescript-eslint.io/rules/space-infix-ops", - }, - "fixable": "whitespace", - "hasSuggestions": undefined, - "messages": { - "missingSpace": "Operator '{{operator}}' must be spaced.", - }, - "replacedBy": [ - "@stylistic/ts/space-infix-ops", - ], - "schema": [ - { - "additionalProperties": false, - "properties": { - "int32Hint": { - "default": false, - "type": "boolean", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, "strict-boolean-expressions": { "create": [Function], "defaultOptions": [ @@ -10322,83 +7776,6 @@ You can try to fix this by turning on the \`noImplicitThis\` compiler option, or "type": "suggestion", }, }, - "type-annotation-spacing": { - "create": [Function], - "defaultOptions": [ - {}, - ], - "meta": { - "deprecated": true, - "docs": { - "description": "Require consistent spacing around type annotations", - "url": "https://typescript-eslint.io/rules/type-annotation-spacing", - }, - "fixable": "whitespace", - "messages": { - "expectedSpaceAfter": "Expected a space after the '{{type}}'.", - "expectedSpaceBefore": "Expected a space before the '{{type}}'.", - "unexpectedSpaceAfter": "Unexpected space after the '{{type}}'.", - "unexpectedSpaceBefore": "Unexpected space before the '{{type}}'.", - "unexpectedSpaceBetween": "Unexpected space between the '{{previousToken}}' and the '{{type}}'.", - }, - "replacedBy": [ - "@stylistic/ts/type-annotation-spacing", - ], - "schema": [ - { - "$defs": { - "spacingConfig": { - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - }, - "type": "object", - }, - }, - "additionalProperties": false, - "properties": { - "after": { - "type": "boolean", - }, - "before": { - "type": "boolean", - }, - "overrides": { - "additionalProperties": false, - "properties": { - "arrow": { - "$ref": "#/items/0/$defs/spacingConfig", - }, - "colon": { - "$ref": "#/items/0/$defs/spacingConfig", - }, - "parameter": { - "$ref": "#/items/0/$defs/spacingConfig", - }, - "property": { - "$ref": "#/items/0/$defs/spacingConfig", - }, - "returnType": { - "$ref": "#/items/0/$defs/spacingConfig", - }, - "variable": { - "$ref": "#/items/0/$defs/spacingConfig", - }, - }, - "type": "object", - }, - }, - "type": "object", - }, - ], - "type": "layout", - }, - }, "typedef": { "create": [Function], "defaultOptions": [ @@ -10561,6 +7938,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void "**/*.mts", "**/*.cts", ], + "name": "typescript-eslint/eslint-recommended", "rules": { "constructor-super": "off", "getter-return": "off", @@ -10570,6 +7948,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void "no-dupe-keys": "off", "no-func-assign": "off", "no-import-assign": "off", + "no-new-native-nonconstructor": "off", "no-new-symbol": "off", "no-obj-calls": "off", "no-redeclare": "off", @@ -10585,26 +7964,29 @@ If your function does not access \`this\`, you can annotate it with \`this: void }, }, { + "name": "typescript-eslint/recommended", "rules": { "@typescript-eslint/ban-ts-comment": "error", "@typescript-eslint/ban-types": "error", "@typescript-eslint/no-array-constructor": "error", "@typescript-eslint/no-duplicate-enum-values": "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-loss-of-precision": "error", "@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-namespace": "error", "@typescript-eslint/no-non-null-asserted-optional-chain": "error", + "@typescript-eslint/no-require-imports": "error", "@typescript-eslint/no-this-alias": "error", "@typescript-eslint/no-unnecessary-type-constraint": "error", "@typescript-eslint/no-unsafe-declaration-merging": "error", + "@typescript-eslint/no-unused-expressions": "error", "@typescript-eslint/no-unused-vars": "error", - "@typescript-eslint/no-var-requires": "error", "@typescript-eslint/prefer-as-const": "error", + "@typescript-eslint/prefer-namespace-keyword": "error", "@typescript-eslint/triple-slash-reference": "error", "no-array-constructor": "off", - "no-loss-of-precision": "off", + "no-unused-expressions": "off", "no-unused-vars": "off", }, }, @@ -10642,7 +8024,9 @@ If your function does not access \`this\`, you can annotate it with \`this: void "AudioScheduledSourceNode": false, "AudioSinkInfo": false, "AudioWorklet": false, + "AudioWorkletGlobalScope": false, "AudioWorkletNode": false, + "AudioWorkletProcessor": false, "AuthenticatorAssertionResponse": false, "AuthenticatorAttestationResponse": false, "AuthenticatorResponse": false, @@ -10704,6 +8088,8 @@ If your function does not access \`this\`, you can annotate it with \`this: void "CSSNumericValue": false, "CSSPageRule": false, "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, "CSSPositionValue": false, "CSSPropertyRule": false, "CSSRotate": false, @@ -10751,6 +8137,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void "ContentVisibilityAutoStateChangeEvent": false, "ConvolverNode": false, "CookieChangeEvent": false, + "CookieDeprecationLabel": false, "CookieStore": false, "CookieStoreManager": false, "CountQueuingStrategy": false, @@ -10813,6 +8200,9 @@ If your function does not access \`this\`, you can annotate it with \`this: void "EyeDropper": false, "FeaturePolicy": false, "FederatedCredential": false, + "Fence": false, + "FencedFrameConfig": false, + "FetchLaterResult": false, "File": false, "FileList": false, "FileReader": false, @@ -10914,6 +8304,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void "HTMLDocument": false, "HTMLElement": false, "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, "HTMLFieldSetElement": false, "HTMLFontElement": false, "HTMLFormControlsCollection": false, @@ -11065,6 +8456,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void "MediaStreamEvent": false, "MediaStreamTrack": false, "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, "MediaStreamTrackEvent": false, "MediaStreamTrackGenerator": false, "MediaStreamTrackProcessor": false, @@ -11074,6 +8466,8 @@ If your function does not access \`this\`, you can annotate it with \`this: void "MessagePort": false, "MimeType": false, "MimeTypeArray": false, + "ModelGenericSession": false, + "ModelManager": false, "MouseEvent": false, "MutationEvent": false, "MutationObserver": false, @@ -11097,6 +8491,8 @@ If your function does not access \`this\`, you can annotate it with \`this: void "NodeFilter": false, "NodeIterator": false, "NodeList": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, "Notification": false, "NotifyPaintEvent": false, "Number": false, @@ -11112,6 +8508,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void "OverconstrainedError": false, "PERSISTENT": false, "PageRevealEvent": false, + "PageSwapEvent": false, "PageTransitionEvent": false, "PannerNode": false, "PasswordCredential": false, @@ -11157,11 +8554,14 @@ If your function does not access \`this\`, you can annotate it with \`this: void "PresentationConnectionList": false, "PresentationReceiver": false, "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, "ProcessingInstruction": false, "Profiler": false, "ProgressEvent": false, "Promise": false, "PromiseRejectionEvent": false, + "ProtectedAudience": false, "Proxy": false, "PublicKeyCredential": false, "PushManager": false, @@ -11327,6 +8727,8 @@ If your function does not access \`this\`, you can annotate it with \`this: void "Set": false, "ShadowRoot": false, "SharedArrayBuffer": false, + "SharedStorage": false, + "SharedStorageWorklet": false, "SharedWorker": false, "SourceBuffer": false, "SourceBufferList": false, @@ -11421,6 +8823,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void "VideoPlaybackQuality": false, "ViewTimeline": false, "ViewTransition": false, + "ViewTransitionTypeSet": false, "VirtualKeyboard": false, "VirtualKeyboardGeometryChangeEvent": false, "VisibilityStateEntry": false, @@ -11450,6 +8853,8 @@ If your function does not access \`this\`, you can annotate it with \`this: void "WebGLUniformLocation": false, "WebGLVertexArrayObject": false, "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, "WebTransport": false, "WebTransportBidirectionalStream": false, "WebTransportDatagramDuplexStream": false, @@ -11462,6 +8867,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void "WindowControlsOverlayGeometryChangeEvent": false, "Worker": false, "Worklet": false, + "WorkletGlobalScope": false, "WritableStream": false, "WritableStreamDefaultController": false, "WritableStreamDefaultWriter": false, @@ -11536,6 +8942,8 @@ If your function does not access \`this\`, you can annotate it with \`this: void "credentialless": false, "crossOriginIsolated": false, "crypto": false, + "currentFrame": false, + "currentTime": false, "customElements": false, "decodeURI": false, "decodeURIComponent": false, @@ -11552,7 +8960,9 @@ If your function does not access \`this\`, you can annotate it with \`this: void "expect": false, "exports": true, "external": false, + "fence": false, "fetch": false, + "fetchLater": false, "find": false, "fit": false, "focus": false, @@ -11579,6 +8989,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void "locationbar": false, "matchMedia": false, "menubar": false, + "model": false, "module": false, "moveBy": false, "moveTo": false, @@ -11662,6 +9073,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void "onpagehide": true, "onpagereveal": true, "onpageshow": true, + "onpageswap": true, "onpaste": true, "onpause": true, "onplay": true, @@ -11725,6 +9137,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void "prompt": false, "queryLocalFonts": false, "queueMicrotask": false, + "registerProcessor": false, "removeEventListener": false, "reportError": false, "requestAnimationFrame": false, @@ -11732,6 +9145,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void "require": false, "resizeBy": false, "resizeTo": false, + "sampleRate": false, "scheduler": false, "screen": false, "screenLeft": false, @@ -11749,6 +9163,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void "setImmediate": false, "setInterval": false, "setTimeout": false, + "sharedStorage": false, "showDirectoryPicker": false, "showOpenFilePicker": false, "showSaveFilePicker": false, @@ -11849,7 +9264,6 @@ If your function does not access \`this\`, you can annotate it with \`this: void "@typescript-eslint/no-namespace": "off", "@typescript-eslint/no-non-null-asserted-optional-chain": "error", "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/no-throw-literal": "error", "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", "@typescript-eslint/no-unnecessary-qualifier": "error", "@typescript-eslint/no-unsafe-assignment": "off", @@ -11861,6 +9275,7 @@ If your function does not access \`this\`, you can annotate it with \`this: void "@typescript-eslint/no-use-before-define": "off", "@typescript-eslint/no-useless-constructor": "error", "@typescript-eslint/no-var-requires": "error", + "@typescript-eslint/only-throw-error": "error", "@typescript-eslint/prefer-as-const": "error", "@typescript-eslint/prefer-for-of": "error", "@typescript-eslint/prefer-includes": "error", From 8c2b3c47ab06115be4a8bed43d8691ca0fb71b49 Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Wed, 29 May 2024 00:48:08 +0200 Subject: [PATCH 08/14] fix: rename no-throw-literal to only-throw-error --- packages/eslint-config/src/index.ts | 2 +- packages/result/src/lib/Result/Err.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/eslint-config/src/index.ts b/packages/eslint-config/src/index.ts index ec87fe84b9..afee52fba3 100644 --- a/packages/eslint-config/src/index.ts +++ b/packages/eslint-config/src/index.ts @@ -117,7 +117,7 @@ const eslintConfig: TSESLint.FlatConfig.ConfigArray = tseslint.config( '@typescript-eslint/no-namespace': 'off', '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/no-throw-literal': 'error', + '@typescript-eslint/only-throw-error': 'error', '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error', '@typescript-eslint/no-unnecessary-qualifier': 'error', '@typescript-eslint/no-unsafe-assignment': 'off', diff --git a/packages/result/src/lib/Result/Err.ts b/packages/result/src/lib/Result/Err.ts index 9f99aa8bc3..65c0e80450 100644 --- a/packages/result/src/lib/Result/Err.ts +++ b/packages/result/src/lib/Result/Err.ts @@ -116,7 +116,7 @@ export class ResultErr implements IResult { } public unwrapRaw(): never { - // eslint-disable-next-line @typescript-eslint/no-throw-literal + // eslint-disable-next-line @typescript-eslint/only-throw-error throw this.error; } From 7073657a3b023e8850a32480ed71de45532d9465 Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Wed, 29 May 2024 00:48:48 +0200 Subject: [PATCH 09/14] fix: add missing dependencies for plugin result --- packages/eslint-plugin-result/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/eslint-plugin-result/package.json b/packages/eslint-plugin-result/package.json index 9b912cc865..5f97c2ed19 100644 --- a/packages/eslint-plugin-result/package.json +++ b/packages/eslint-plugin-result/package.json @@ -72,12 +72,14 @@ "@typescript-eslint/rule-tester": "rc-v8", "@typescript-eslint/typescript-estree": "rc-v8", "@vitest/coverage-v8": "^1.6.0", + "eslint": "^9.3.0", "tsup": "^8.0.2", "tsx": "^4.11.0", "typedoc-json-parser": "^10.0.0", "vitest": "^1.6.0" }, "dependencies": { + "@eslint/eslintrc": "^3.1.0", "@sapphire/result": "workspace:^", "@typescript-eslint/utils": "rc-v8", "tsutils": "^3.21.0", From fbdef6b5db6b3fb1d1bed97b820fea276f71481f Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Wed, 29 May 2024 00:48:57 +0200 Subject: [PATCH 10/14] chore: lock file --- yarn.lock | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yarn.lock b/yarn.lock index f8607875ca..fcdc664bbb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1351,12 +1351,14 @@ __metadata: version: 0.0.0-use.local resolution: "@sapphire/eslint-plugin-result@workspace:packages/eslint-plugin-result" dependencies: + "@eslint/eslintrc": "npm:^3.1.0" "@favware/cliff-jumper": "npm:^3.0.3" "@sapphire/result": "workspace:^" "@typescript-eslint/rule-tester": "npm:rc-v8" "@typescript-eslint/typescript-estree": "npm:rc-v8" "@typescript-eslint/utils": "npm:rc-v8" "@vitest/coverage-v8": "npm:^1.6.0" + eslint: "npm:^9.3.0" tsup: "npm:^8.0.2" tsutils: "npm:^3.21.0" tsx: "npm:^4.11.0" From fb8a360792ebc436319ff9546470a26201b9b7ab Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Wed, 29 May 2024 00:55:43 +0200 Subject: [PATCH 11/14] fix: update rule name to disable in utility type --- packages/utilities/src/lib/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/utilities/src/lib/types.ts b/packages/utilities/src/lib/types.ts index 765ae3ff08..614f9606d5 100644 --- a/packages/utilities/src/lib/types.ts +++ b/packages/utilities/src/lib/types.ts @@ -19,7 +19,7 @@ export type DeepRequired = T extends Builtin ? WeakSet> : T extends Promise ? Promise> - : T extends {} // eslint-disable-line @typescript-eslint/ban-types + : T extends {} // eslint-disable-line @typescript-eslint/no-empty-object-type ? { [K in keyof T]-?: DeepRequired } : NonNullable; @@ -94,7 +94,7 @@ export type NonNullableProperties = { /** * An object that is non nullable, to bypass TypeScript not easily working with `Record` in various instances. */ -// eslint-disable-next-line @typescript-eslint/ban-types + export type NonNullObject = {} & object; /** From 95818c74e6fd414987ec3bd3cd78863b632016b5 Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Wed, 29 May 2024 00:57:26 +0200 Subject: [PATCH 12/14] fix: ensure code lints correctly --- packages/lexure/src/lib/parser/ParserResult.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/lexure/src/lib/parser/ParserResult.ts b/packages/lexure/src/lib/parser/ParserResult.ts index 3003876fc1..53276fccd4 100644 --- a/packages/lexure/src/lib/parser/ParserResult.ts +++ b/packages/lexure/src/lib/parser/ParserResult.ts @@ -14,6 +14,7 @@ export class ParserResult { public parse(parameters: Iterable) { for (const parameter of parameters) { + // eslint-disable-next-line @typescript-eslint/no-unused-expressions this.parsePossibleFlag(parameter) || this.parsePossibleOptions(parameter) || this.parseOrdered(parameter); } From efcc81d6a6180a2d3c441a9e2732f717559aff6a Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Wed, 29 May 2024 00:58:01 +0200 Subject: [PATCH 13/14] test: re-disable test like before the pr --- .../eslint-plugin-result/tests/rules/no-discard-result.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin-result/tests/rules/no-discard-result.test.ts b/packages/eslint-plugin-result/tests/rules/no-discard-result.test.ts index da4fea6b6a..343d99080e 100644 --- a/packages/eslint-plugin-result/tests/rules/no-discard-result.test.ts +++ b/packages/eslint-plugin-result/tests/rules/no-discard-result.test.ts @@ -11,7 +11,7 @@ export const ruleTester = new RuleTester({ parser: '@typescript-eslint/parser' }); -describe('ESLint plugin result', () => { +describe.skip('ESLint plugin result', () => { ruleTester.run('no-discard-result', noDiscardResult, { valid: [ { From b687c687c495f8f0f9ef194ecf8e81d86385fd21 Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Wed, 29 May 2024 01:02:52 +0200 Subject: [PATCH 14/14] test(eslint-plugin-result): split code across test cases --- .../tests/rules/no-discard-result.test.ts | 155 +++++++++--------- 1 file changed, 82 insertions(+), 73 deletions(-) diff --git a/packages/eslint-plugin-result/tests/rules/no-discard-result.test.ts b/packages/eslint-plugin-result/tests/rules/no-discard-result.test.ts index 343d99080e..48161eb857 100644 --- a/packages/eslint-plugin-result/tests/rules/no-discard-result.test.ts +++ b/packages/eslint-plugin-result/tests/rules/no-discard-result.test.ts @@ -1,6 +1,6 @@ +import { RuleTester } from '@typescript-eslint/rule-tester'; import { fileURLToPath } from 'url'; import { noDiscardResult } from '../../src/rules/no-discard-result'; -import { RuleTester } from '@typescript-eslint/rule-tester'; export const ruleTester = new RuleTester({ parserOptions: { @@ -11,11 +11,12 @@ export const ruleTester = new RuleTester({ parser: '@typescript-eslint/parser' }); -describe.skip('ESLint plugin result', () => { - ruleTester.run('no-discard-result', noDiscardResult, { - valid: [ - { - code: `import { Result } from '@sapphire/result'; +describe('ESLint plugin result', () => { + test('GIVEN valid results THEN asserts that no-discard passes successfully', () => { + ruleTester.run('no-discard-result', noDiscardResult, { + valid: [ + { + code: `import { Result } from '@sapphire/result'; function foo(): Result {} async function bar(): Promise> {} const x = foo(); @@ -23,98 +24,106 @@ describe.skip('ESLint plugin result', () => { y = z = await bar(); const complex = foo() && (((Math.random() > 0.5 ? foo() : await bar()) || foo()) ?? await bar()); `, - name: 'Result is not discarded' - }, - { - code: `import { Result } from '@sapphire/result'; + name: 'Result is not discarded' + }, + { + code: `import { Result } from '@sapphire/result'; function foo(): Result {} void foo(); `, - name: 'Result is intentionally discarded' - }, - { - code: `import { Result } from '@sapphire/result'; + name: 'Result is intentionally discarded' + }, + { + code: `import { Result } from '@sapphire/result'; function foo(): Result {} function bar(result: Result) {} void bar(foo()); `, - name: 'Result is passed into another function' - } - ], - invalid: [ - { - code: `import { Result } from '@sapphire/result'; + name: 'Result is passed into another function' + } + ], + invalid: [] + }); + }); + + test('GIVEN invalid results THEN asserts that no-discard causes an error', () => { + ruleTester.run('no-discard-result', noDiscardResult, { + valid: [], + invalid: [ + { + code: `import { Result } from '@sapphire/result'; function foo(): Result {} foo();`, - name: 'simple discard', - errors: [ - { - messageId: 'discardedResult', - line: 4 - } - ] - }, - { - code: `import { Result } from '@sapphire/result'; + name: 'simple discard', + errors: [ + { + messageId: 'discardedResult', + line: 4 + } + ] + }, + { + code: `import { Result } from '@sapphire/result'; async function foo(): Promise> {} foo();`, - name: 'unawaited async function discarded', - errors: [ - { - messageId: 'discardedResult', - line: 4 - } - ] - }, - { - code: `import { Result } from '@sapphire/result'; + name: 'unawaited async function discarded', + errors: [ + { + messageId: 'discardedResult', + line: 4 + } + ] + }, + { + code: `import { Result } from '@sapphire/result'; async function foo(): Promise> {} await foo();`, - name: 'awaited async function discarded', - errors: [ - { - messageId: 'discardedResult', - line: 4 - } - ] - }, - { - code: `import { Result } from '@sapphire/result'; + name: 'awaited async function discarded', + errors: [ + { + messageId: 'discardedResult', + line: 4 + } + ] + }, + { + code: `import { Result } from '@sapphire/result'; function foo(): Promise> {} ( foo(), await foo() );`, - name: 'double discard', - errors: [ - { - messageId: 'discardedResult', - line: 5 - }, - { - messageId: 'discardedResult', - line: 6 - } - ] - }, - { - code: `import { Result } from '@sapphire/result'; + name: 'double discard', + errors: [ + { + messageId: 'discardedResult', + line: 5 + }, + { + messageId: 'discardedResult', + line: 6 + } + ] + }, + { + code: `import { Result } from '@sapphire/result'; function foo(): Promise> {} null ?? foo(); `, - name: 'potential discard (??)', - errors: [ - { - messageId: 'discardedResult', - line: 4 - } - ] - } - ] + name: 'potential discard (??)', + errors: [ + { + messageId: 'discardedResult', + line: 4 + } + ] + } + ] + }); }); });