diff --git a/.changeset/update-eslint-deps-and-configs.md b/.changeset/update-eslint-deps-and-configs.md new file mode 100644 index 00000000..575d6a94 --- /dev/null +++ b/.changeset/update-eslint-deps-and-configs.md @@ -0,0 +1,14 @@ +--- +"@mheob/eslint-config": major +--- + +Update ESLint dependencies and enhance React and perfectionist configs + +- Bump ESLint to v10, perfectionist to v5, and many other dependencies +- Add React Server Components support via react-rsc plugin +- Add type-aware React rules (no-implicit-key, no-leaked-conditional-rendering) +- Add React naming convention rules (context-name, ref-name, use-state) +- Update perfectionist sort-imports groups to v5 naming convention +- Enhance ignores config to support function-based userIgnores and TypeScript file ignoring +- Add GLOB_ASTRO_TS glob pattern and ignoresTypeAware type option +- Update generated type definitions for new plugin rules diff --git a/.coderabbit.yaml b/.coderabbit.yaml deleted file mode 100644 index 7ee335d0..00000000 --- a/.coderabbit.yaml +++ /dev/null @@ -1,144 +0,0 @@ -language: en-US -tone_instructions: "" -early_access: false -enable_free_tier: true -reviews: - profile: chill - request_changes_workflow: true - high_level_summary: true - high_level_summary_placeholder: "@coderabbitai summary" - high_level_summary_in_walkthrough: false - auto_title_placeholder: "@coderabbitai" - auto_title_instructions: "" - review_status: true - commit_status: true - fail_commit_status: false - collapse_walkthrough: false - changed_files_summary: true - sequence_diagrams: true - assess_linked_issues: true - related_issues: true - related_prs: true - suggested_labels: true - auto_apply_labels: false - suggested_reviewers: true - auto_assign_reviewers: false - poem: false - labeling_instructions: [] - path_filters: [] - path_instructions: [] - abort_on_close: true - disable_cache: false - auto_review: - enabled: true - auto_incremental_review: true - ignore_title_keywords: - - WIP - - chore(release) - labels: [] - drafts: false - base_branches: [] - finishing_touches: - docstrings: - enabled: true - unit_tests: - enabled: true - tools: - ast-grep: - rule_dirs: [] - util_dirs: [] - essential_rules: true - packages: [] - shellcheck: - enabled: true - ruff: - enabled: true - markdownlint: - enabled: true - github-checks: - enabled: true - timeout_ms: 90000 - languagetool: - enabled: true - enabled_rules: [] - disabled_rules: [] - enabled_categories: [] - disabled_categories: [] - enabled_only: false - level: default - biome: - enabled: true - hadolint: - enabled: true - swiftlint: - enabled: true - phpstan: - enabled: true - level: default - golangci-lint: - enabled: true - yamllint: - enabled: true - gitleaks: - enabled: true - checkov: - enabled: true - detekt: - enabled: true - eslint: - enabled: true - rubocop: - enabled: true - buf: - enabled: true - regal: - enabled: true - actionlint: - enabled: true - pmd: - enabled: true - cppcheck: - enabled: true - semgrep: - enabled: true - circleci: - enabled: true - sqlfluff: - enabled: true - prismaLint: - enabled: true - oxc: - enabled: true - shopifyThemeCheck: - enabled: true - luacheck: - enabled: true -chat: - auto_reply: true - integrations: - jira: - usage: auto - linear: - usage: auto -knowledge_base: - opt_out: false - web_search: - enabled: true - learnings: - scope: auto - issues: - scope: auto - jira: - usage: auto - project_keys: [] - linear: - usage: auto - team_keys: [] - pull_requests: - scope: auto -code_generation: - docstrings: - language: en-US - path_instructions: [] - unit_tests: - path_instructions: [] diff --git a/packages/eslint-config/src/cli/versions-map.generated.ts b/packages/eslint-config/src/cli/versions-map.generated.ts index d8b4d9d7..258a8ad5 100644 --- a/packages/eslint-config/src/cli/versions-map.generated.ts +++ b/packages/eslint-config/src/cli/versions-map.generated.ts @@ -1,12 +1,12 @@ export const versionsMap = { - '@eslint-react/eslint-plugin': '^2.3.13', - '@next/eslint-plugin-next': '^16.1.0', + '@eslint-react/eslint-plugin': '^2.12.4', + '@next/eslint-plugin-next': '^16.1.6', 'astro-eslint-parser': '^1.2.2', - eslint: '^9.39.2', + eslint: '^10.0.0', 'eslint-plugin-astro': '^1.5.0', 'eslint-plugin-react-hooks': '^7.0.1', - 'eslint-plugin-react-refresh': '^0.4.26', - 'eslint-plugin-svelte': '^3.13.1', + 'eslint-plugin-react-refresh': '^0.5.0', + 'eslint-plugin-svelte': '^3.15.0', 'prettier-plugin-astro': '^0.14.1', 'svelte-eslint-parser': '^1.4.1', }; diff --git a/packages/eslint-config/src/configs/ignores.ts b/packages/eslint-config/src/configs/ignores.ts index 862e3689..4a3f8800 100644 --- a/packages/eslint-config/src/configs/ignores.ts +++ b/packages/eslint-config/src/configs/ignores.ts @@ -1,4 +1,4 @@ -import { GLOB_EXCLUDE } from '../globs'; +import { GLOB_EXCLUDE, GLOB_TS, GLOB_TSX } from '../globs'; import type { TypedFlatConfigItem } from '../types'; /** @@ -9,12 +9,22 @@ import type { TypedFlatConfigItem } from '../types'; * and the userIgnores. * * @param userIgnores - The user's choices from the CLI prompt. + * @param ignoreTypeScript - Whether to ignore TypeScript files. * @returns Promise that resolves once the ignores ESLint rules are configured. */ -export async function ignores(userIgnores: string[] = []): Promise { +export async function ignores( + userIgnores: ((originals: string[]) => string[]) | string[] = [], + ignoreTypeScript = false, +): Promise { + let ignores = [...GLOB_EXCLUDE]; + + if (ignoreTypeScript) ignores.push(GLOB_TS, GLOB_TSX); + + ignores = typeof userIgnores === 'function' ? userIgnores(ignores) : [...ignores, ...userIgnores]; + return [ { - ignores: [...GLOB_EXCLUDE, ...userIgnores], + ignores, name: 'mheob/ignores', }, ]; diff --git a/packages/eslint-config/src/configs/perfectionist.ts b/packages/eslint-config/src/configs/perfectionist.ts index 85b18b38..648319a9 100644 --- a/packages/eslint-config/src/configs/perfectionist.ts +++ b/packages/eslint-config/src/configs/perfectionist.ts @@ -63,17 +63,23 @@ export async function perfectionist(): Promise { 'error', { groups: [ - 'type', - ['builtin-type', 'builtin'], - ['external-type', 'external'], - ['internal-type', 'internal'], - ['parent-type', 'parent', 'sibling-type', 'sibling', 'index-type', 'index'], + 'type-import', + 'value-builtin', + ['type-external', 'value-external'], + ['type-internal', 'value-internal'], + [ + 'type-parent', + 'value-parent', + 'type-sibling', + 'value-sibling', + 'type-index', + 'value-index', + ], 'side-effect', 'style', - 'object', + 'ts-equals-import', 'unknown', ], - internalPattern: ['^@/.*', '^~/.*'], type: 'natural', }, ], @@ -81,7 +87,7 @@ export async function perfectionist(): Promise { 'perfectionist/sort-intersection-types': ['error', { type: 'natural' }], 'perfectionist/sort-jsx-props': [ 'error', - { groups: ['multiline', 'unknown', 'shorthand'], type: 'natural' }, + { groups: ['multiline-prop', 'unknown', 'shorthand-prop'], type: 'natural' }, ], 'perfectionist/sort-maps': ['error', { type: 'natural' }], 'perfectionist/sort-named-exports': ['error', { type: 'natural' }], diff --git a/packages/eslint-config/src/configs/react.ts b/packages/eslint-config/src/configs/react.ts index c1b88551..0c4fb591 100644 --- a/packages/eslint-config/src/configs/react.ts +++ b/packages/eslint-config/src/configs/react.ts @@ -1,10 +1,10 @@ import { isPackageExists } from 'local-pkg'; -import { GLOB_TS, GLOB_TSX } from '../globs'; +import { GLOB_ASTRO_TS, GLOB_MARKDOWN, GLOB_TS, GLOB_TSX } from '../globs'; import type { OptionsFiles, - OptionsOverrides, OptionsReact, + OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, TypedFlatConfigItem, } from '../types'; @@ -35,10 +35,15 @@ const ReactCompilerPackages = ['babel-plugin-react-compiler']; * @returns Promise that resolves once the React ESLint rules are configured. */ export async function react( - options: OptionsFiles & OptionsOverrides & OptionsReact & OptionsTypeScriptWithTypes = {}, + options: OptionsFiles & + OptionsReact & + OptionsTypeScriptParserOptions & + OptionsTypeScriptWithTypes = {}, ): Promise { const { files = [GLOB_TS, GLOB_TSX], + filesTypeAware = [GLOB_TS, GLOB_TSX], + ignoresTypeAware = [`${GLOB_MARKDOWN}/**`, GLOB_ASTRO_TS], overrides = {}, reactCompiler = ReactCompilerPackages.some(i => isPackageExists(i)), } = options; @@ -52,6 +57,11 @@ export async function react( const tsconfigPath = options?.tsconfigPath ?? undefined; const isTypeAware = Boolean(tsconfigPath); + const typeAwareRules: TypedFlatConfigItem['rules'] = { + 'react/no-implicit-key': 'error', + 'react/no-leaked-conditional-rendering': 'warn', + }; + const [pluginReact, pluginReactHooks, pluginReactRefresh, parserTs] = await Promise.all([ interopDefault(import('@eslint-react/eslint-plugin')), interopDefault(import('eslint-plugin-react-hooks')), @@ -79,6 +89,7 @@ export async function react( 'react-hooks-extra': plugins['@eslint-react/hooks-extra'], 'react-naming-convention': plugins['@eslint-react/naming-convention'], 'react-refresh': pluginReactRefresh, + 'react-rsc': plugins['@eslint-react/rsc'], 'react-web-api': plugins['@eslint-react/web-api'], }, }, @@ -90,13 +101,6 @@ export async function react( ecmaFeatures: { jsx: true, }, - ...(isTypeAware - ? { - project: tsconfigPath, - projectService: true, - tsconfigRootDir: import.meta.dirname, - } - : {}), }, sourceType: 'module', }, @@ -144,14 +148,20 @@ export async function react( } : {}), + // recommended rules from eslint-plugin-react-naming-convention https://eslint-react.xyz/docs/rules/overview#naming-convention-rules + 'react-naming-convention/context-name': 'warn', + 'react-naming-convention/ref-name': 'warn', + 'react-naming-convention/use-state': 'warn', + // preconfigured rules from eslint-plugin-react-refresh https://github.com/ArnaudBarre/eslint-plugin-react-refresh/tree/main/src 'react-refresh/only-export-components': [ - 'warn', + 'error', { allowConstantExport: isAllowConstantExport, allowExportNames: [ ...(isUsingNext ? [ + // https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config 'dynamic', 'dynamicParams', 'revalidate', @@ -159,12 +169,18 @@ export async function react( 'runtime', 'preferredRegion', 'maxDuration', - 'config', + // https://nextjs.org/docs/app/api-reference/functions/generate-static-params 'generateStaticParams', + // https://nextjs.org/docs/app/api-reference/functions/generate-metadata 'metadata', 'generateMetadata', + // https://nextjs.org/docs/app/api-reference/functions/generate-viewport 'viewport', 'generateViewport', + // https://nextjs.org/docs/app/api-reference/functions/generate-image-metadata + 'generateImageMetadata', + // https://nextjs.org/docs/app/api-reference/functions/generate-sitemaps + 'generateSitemaps', ] : []), ...(isUsingRemix || isUsingReactRouter @@ -184,6 +200,9 @@ export async function react( }, ], + // recommended rules from eslint-plugin-react-rsc https://eslint-react.xyz/docs/rules/overview#rsc-rules + 'react-rsc/function-definition': 'error', + // recommended rules from eslint-plugin-react-web-api https://eslint-react.xyz/docs/rules/overview#web-api-rules 'react-web-api/no-leaked-event-listener': 'warn', 'react-web-api/no-leaked-interval': 'warn', @@ -227,6 +246,7 @@ export async function react( 'react/no-unsafe-component-will-mount': 'warn', 'react/no-unsafe-component-will-receive-props': 'warn', 'react/no-unsafe-component-will-update': 'warn', + 'react/no-unused-class-component-members': 'warn', 'react/no-use-context': 'warn', 'react/no-useless-forward-ref': 'warn', 'react/prefer-use-state-lazy-initialization': 'warn', @@ -234,5 +254,30 @@ export async function react( ...overrides, }, }, + { + files: filesTypeAware, + name: 'mheob/react/typescript', + rules: { + // Disables rules that are already handled by TypeScript + 'react-dom/no-string-style-prop': 'off', + 'react-dom/no-unknown-property': 'off', + 'react/jsx-no-duplicate-props': 'off', + 'react/jsx-no-undef': 'off', + 'react/jsx-uses-react': 'off', + 'react/jsx-uses-vars': 'off', + }, + }, + ...(isTypeAware + ? [ + { + files: filesTypeAware, + ignores: ignoresTypeAware, + name: 'mheob/react/type-aware-rules', + rules: { + ...typeAwareRules, + }, + }, + ] + : []), ]; } diff --git a/packages/eslint-config/src/factory.ts b/packages/eslint-config/src/factory.ts index f5a12707..e4f501c3 100644 --- a/packages/eslint-config/src/factory.ts +++ b/packages/eslint-config/src/factory.ts @@ -133,7 +133,7 @@ export function mheob( // Base configs configs.push( - ignores(options.ignores), + ignores(options.ignores, !enableTypeScript), javascript({ isInEditor, overrides: getOverrides(options, 'javascript'), diff --git a/packages/eslint-config/src/globs.ts b/packages/eslint-config/src/globs.ts index 236d0f3d..e07cec63 100644 --- a/packages/eslint-config/src/globs.ts +++ b/packages/eslint-config/src/globs.ts @@ -18,6 +18,7 @@ export const GLOB_JSON5 = '**/*.json5'; export const GLOB_JSONC = '**/*.jsonc'; export const GLOB_ASTRO = '**/*.astro'; +export const GLOB_ASTRO_TS = '**/*.astro/*.ts'; export const GLOB_GRAPHQL = '**/*.{g,graph}ql'; export const GLOB_HTML = '**/*.htm?(l)'; export const GLOB_MARKDOWN = '**/*.md'; diff --git a/packages/eslint-config/src/typegen.d.ts b/packages/eslint-config/src/typegen.d.ts index 419969e7..06538ed1 100644 --- a/packages/eslint-config/src/typegen.d.ts +++ b/packages/eslint-config/src/typegen.d.ts @@ -73,6 +73,11 @@ export interface RuleOptions { * @see https://eslint.style/rules/eol-last */ '@stylistic/eol-last'?: Linter.RuleEntry + /** + * Enforce consistent line break styles for JSX props + * @see https://eslint.style/rules/jsx-props-style + */ + '@stylistic/exp-jsx-props-style'?: Linter.RuleEntry /** * Enforce consistent spacing and line break styles inside brackets. * @see https://eslint.style/rules/list-style @@ -208,6 +213,7 @@ export interface RuleOptions { /** * Enforce props alphabetical sorting * @see https://eslint.style/rules/jsx-sort-props + * @deprecated */ '@stylistic/jsx-sort-props'?: Linter.RuleEntry /** @@ -3180,6 +3186,11 @@ export interface RuleOptions { * @see https://perfectionist.dev/rules/sort-enums */ 'perfectionist/sort-enums'?: Linter.RuleEntry + /** + * Enforce sorted export attributes. + * @see https://perfectionist.dev/rules/sort-export-attributes + */ + 'perfectionist/sort-export-attributes'?: Linter.RuleEntry /** * Enforce sorted exports. * @see https://perfectionist.dev/rules/sort-exports @@ -3190,6 +3201,11 @@ export interface RuleOptions { * @see https://perfectionist.dev/rules/sort-heritage-clauses */ 'perfectionist/sort-heritage-clauses'?: Linter.RuleEntry + /** + * Enforce sorted import attributes. + * @see https://perfectionist.dev/rules/sort-import-attributes + */ + 'perfectionist/sort-import-attributes'?: Linter.RuleEntry /** * Enforce sorted imports. * @see https://perfectionist.dev/rules/sort-imports @@ -3353,102 +3369,102 @@ export interface RuleOptions { */ 'quotes'?: Linter.RuleEntry /** - * Enforce the consistent use of the radix argument when using `parseInt()` + * Enforce the use of the radix argument when using `parseInt()` * @see https://eslint.org/docs/latest/rules/radix */ 'radix'?: Linter.RuleEntry /** - * Disallow `dangerouslySetInnerHTML`. + * Disallows DOM elements from using 'dangerouslySetInnerHTML'. * @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml */ 'react-dom/no-dangerously-set-innerhtml'?: Linter.RuleEntry<[]> /** - * Disallow `dangerouslySetInnerHTML` and `children` at the same time. + * Disallows DOM elements from using 'dangerouslySetInnerHTML' and 'children' at the same time. * @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml-with-children */ 'react-dom/no-dangerously-set-innerhtml-with-children'?: Linter.RuleEntry<[]> /** - * Disallow `findDOMNode`. + * Disallows 'findDOMNode'. * @see https://eslint-react.xyz/docs/rules/dom-no-find-dom-node */ 'react-dom/no-find-dom-node'?: Linter.RuleEntry<[]> /** - * Disallow `flushSync`. + * Disallows 'flushSync'. * @see https://eslint-react.xyz/docs/rules/dom-no-flush-sync */ 'react-dom/no-flush-sync'?: Linter.RuleEntry<[]> /** - * Replaces usages of `ReactDom.hydrate()` with `hydrateRoot()`. + * Replaces usage of 'ReactDOM.hydrate()' with 'hydrateRoot()'. * @see https://eslint-react.xyz/docs/rules/dom-no-hydrate */ 'react-dom/no-hydrate'?: Linter.RuleEntry<[]> /** - * Enforces explicit `type` attribute for `button` elements. + * Enforces an explicit 'type' attribute for 'button' elements. * @see https://eslint-react.xyz/docs/rules/dom-no-missing-button-type */ 'react-dom/no-missing-button-type'?: Linter.RuleEntry<[]> /** - * Enforces explicit `sandbox` prop for `iframe` elements. + * Enforces an explicit 'sandbox' attribute for 'iframe' elements. * @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox */ 'react-dom/no-missing-iframe-sandbox'?: Linter.RuleEntry<[]> /** - * Enforces the absence of a `namespace` in React elements. + * Enforces the absence of a 'namespace' in React elements. * @see https://eslint-react.xyz/docs/rules/dom-no-namespace */ 'react-dom/no-namespace'?: Linter.RuleEntry<[]> /** - * Replaces usages of `ReactDom.render()` with `createRoot(node).render()`. + * Replaces usage of 'ReactDOM.render()' with 'createRoot(node).render()'. * @see https://eslint-react.xyz/docs/rules/dom-no-render */ 'react-dom/no-render'?: Linter.RuleEntry<[]> /** - * Disallow the return value of `ReactDOM.render`. + * Disallows the return value of 'ReactDOM.render'. * @see https://eslint-react.xyz/docs/rules/dom-no-render-return-value */ 'react-dom/no-render-return-value'?: Linter.RuleEntry<[]> /** - * Disallow `javascript:` URLs as attribute values. + * Disallows 'javascript:' URLs as attribute values. * @see https://eslint-react.xyz/docs/rules/dom-no-script-url */ 'react-dom/no-script-url'?: Linter.RuleEntry<[]> /** - * Disallows the use of string style prop. + * Disallows the use of string style prop in JSX. Use an object instead. * @see https://eslint-react.xyz/docs/rules/dom-no-string-style-prop */ 'react-dom/no-string-style-prop'?: Linter.RuleEntry<[]> /** - * Disallow unknown `DOM` property. + * Disallows unknown 'DOM' properties. * @see https://eslint-react.xyz/docs/rules/dom-no-unknown-property */ 'react-dom/no-unknown-property'?: Linter.RuleEntry /** - * Enforces `sandbox` attribute for `iframe` elements is not set to unsafe combinations. + * Enforces that the 'sandbox' attribute for 'iframe' elements is not set to unsafe combinations. * @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox */ 'react-dom/no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]> /** - * Disallow `target="_blank"` without `rel="noreferrer noopener"`. + * Disallows 'target="_blank"' without 'rel="noreferrer noopener"'. * @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank */ 'react-dom/no-unsafe-target-blank'?: Linter.RuleEntry<[]> /** - * Replaces usages of `useFormState` with `useActionState`. + * Replaces usage of 'useFormState' with 'useActionState'. * @see https://eslint-react.xyz/docs/rules/dom-no-use-form-state */ 'react-dom/no-use-form-state'?: Linter.RuleEntry<[]> /** - * Disallow `children` in void DOM elements. + * Disallows 'children' in void DOM elements. * @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children */ 'react-dom/no-void-elements-with-children'?: Linter.RuleEntry<[]> /** - * Enforces React Dom is imported via a namespace import. + * Enforces importing React DOM via a namespace import. * @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import */ 'react-dom/prefer-namespace-import'?: Linter.RuleEntry<[]> /** - * Disallow direct calls to the `set` function of `useState` in `useEffect`. + * Disallows direct calls to the ['set' function](https://react.dev/reference/react/useState#setstate) of 'useState' in 'useEffect'. * @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect */ 'react-hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]> @@ -3576,199 +3592,209 @@ export interface RuleOptions { */ 'react-naming-convention/component-name'?: Linter.RuleEntry /** - * Enforces context name to be a valid component name with the suffix `Context`. + * Enforces the context name to be a valid component name with the suffix 'Context'. * @see https://eslint-react.xyz/docs/rules/naming-convention-context-name */ 'react-naming-convention/context-name'?: Linter.RuleEntry<[]> /** - * Enforces consistent file naming conventions. + * Enforces consistent file-naming conventions. * @see https://eslint-react.xyz/docs/rules/naming-convention-filename */ 'react-naming-convention/filename'?: Linter.RuleEntry /** - * Enforces consistent file naming conventions. + * Enforces consistent use of the JSX file extension. * @see https://eslint-react.xyz/docs/rules/naming-convention-filename-extension */ 'react-naming-convention/filename-extension'?: Linter.RuleEntry /** - * Enforces destructuring and symmetric naming of `useState` hook value and setter. + * Enforces identifier names assigned from 'useRef' calls to be either 'ref' or end with 'Ref'. + * @see https://eslint-react.xyz/docs/rules/naming-convention-ref-name + */ + 'react-naming-convention/ref-name'?: Linter.RuleEntry<[]> + /** + * Enforces destructuring and symmetric naming of the 'useState' hook value and setter. * @see https://eslint-react.xyz/docs/rules/naming-convention-use-state */ - 'react-naming-convention/use-state'?: Linter.RuleEntry<[]> + 'react-naming-convention/use-state'?: Linter.RuleEntry 'react-refresh/only-export-components'?: Linter.RuleEntry /** - * Prevents leaked `addEventListener` in a component or custom Hook. + * Validate and transform React Client/Server Function definitions. + * @see https://eslint-react.xyz/docs/rules/function-definition + */ + 'react-rsc/function-definition'?: Linter.RuleEntry<[]> + /** + * Enforces that every 'addEventListener' in a component or custom hook has a corresponding 'removeEventListener'. * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener */ 'react-web-api/no-leaked-event-listener'?: Linter.RuleEntry<[]> /** - * Prevents leaked `setInterval` in a component or custom Hook. + * Enforces that every 'setInterval' in a component or custom hook has a corresponding 'clearInterval'. * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval */ 'react-web-api/no-leaked-interval'?: Linter.RuleEntry<[]> /** - * Prevents leaked `ResizeObserver` in a component or custom Hook. + * Enforces that every 'ResizeObserver' created in a component or custom hook has a corresponding 'ResizeObserver.disconnect()'. * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-resize-observer */ 'react-web-api/no-leaked-resize-observer'?: Linter.RuleEntry<[]> /** - * Prevents leaked `setTimeout` in a component or custom Hook. + * Enforces that every 'setTimeout' in a component or custom hook has a corresponding 'clearTimeout'. * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout */ 'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]> /** - * Prevents dollar signs from being inserted as text nodes before expressions. + * Prevents unnecessary '$' symbols before JSX expressions. * @see https://eslint-react.xyz/docs/rules/jsx-dollar */ 'react/jsx-dollar'?: Linter.RuleEntry<[]> /** - * Enforces that the 'key' prop is placed before the spread prop in JSX elements. + * Enforces 'key' prop placement before spread props. * @see https://eslint-react.xyz/docs/rules/jsx-key-before-spread */ 'react/jsx-key-before-spread'?: Linter.RuleEntry<[]> /** - * Prevents comments from being inserted as text nodes. + * Prevents comment strings (e.g., beginning with '//' or '/*') from being accidentally inserted into a JSX element's text nodes. * @see https://eslint-react.xyz/docs/rules/jsx-no-comment-textnodes */ 'react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]> /** - * Disallow duplicate props in JSX elements. + * Disallows duplicate props in JSX elements. * @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props */ 'react/jsx-no-duplicate-props'?: Linter.RuleEntry<[]> /** - * Disallows 'IIFE' in JSX elements. + * Disallows immediately-invoked function expressions in JSX. * @see https://eslint-react.xyz/docs/rules/jsx-no-iife */ 'react/jsx-no-iife'?: Linter.RuleEntry<[]> /** - * Disallow undefined variables in JSX. + * Prevents using variables in JSX that are not defined in the scope. * @see https://eslint-react.xyz/docs/rules/jsx-no-undef */ 'react/jsx-no-undef'?: Linter.RuleEntry<[]> /** - * Enforces shorthand syntax for boolean attributes. + * Enforces shorthand syntax for boolean props. * @see https://eslint-react.xyz/docs/rules/jsx-shorthand-boolean */ 'react/jsx-shorthand-boolean'?: Linter.RuleEntry /** - * Enforces shorthand syntax for fragments. + * Enforces shorthand syntax for fragment elements. * @see https://eslint-react.xyz/docs/rules/jsx-shorthand-fragment */ 'react/jsx-shorthand-fragment'?: Linter.RuleEntry /** - * Marks React variables as used when JSX is used. + * Marks React variables as used when JSX is present. * @see https://eslint-react.xyz/docs/rules/jsx-uses-react */ 'react/jsx-uses-react'?: Linter.RuleEntry<[]> /** - * Marks variables used in JSX elements as used. + * Marks JSX element variables as used. * @see https://eslint-react.xyz/docs/rules/jsx-uses-vars */ 'react/jsx-uses-vars'?: Linter.RuleEntry<[]> /** - * Disallow accessing `this.state` inside `setState` calls. + * Disallows accessing 'this.state' inside 'setState' calls. * @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate */ 'react/no-access-state-in-setstate'?: Linter.RuleEntry<[]> /** - * Disallow an item's index in the array as its key. + * Disallows using an item's index in the array as its key. * @see https://eslint-react.xyz/docs/rules/no-array-index-key */ 'react/no-array-index-key'?: Linter.RuleEntry<[]> /** - * Disallow `Children.count`. + * Disallows the use of 'Children.count' from the 'react' package. * @see https://eslint-react.xyz/docs/rules/no-children-count */ 'react/no-children-count'?: Linter.RuleEntry<[]> /** - * Disallow 'Children.forEach'. + * Disallows the use of 'Children.forEach' from the 'react' package. * @see https://eslint-react.xyz/docs/rules/no-children-for-each */ 'react/no-children-for-each'?: Linter.RuleEntry<[]> /** - * Disallow `Children.map`. + * Disallows the use of 'Children.map' from the 'react' package. * @see https://eslint-react.xyz/docs/rules/no-children-map */ 'react/no-children-map'?: Linter.RuleEntry<[]> /** - * Disallow `Children.only`. + * Disallows the use of 'Children.only' from the 'react' package. * @see https://eslint-react.xyz/docs/rules/no-children-only */ 'react/no-children-only'?: Linter.RuleEntry<[]> /** - * Disallow passing `children` as a prop. + * Disallows passing 'children' as a prop. * @see https://eslint-react.xyz/docs/rules/no-children-prop */ 'react/no-children-prop'?: Linter.RuleEntry<[]> /** - * Disallow `Children.toArray`. + * Disallows the use of 'Children.toArray' from the 'react' package. * @see https://eslint-react.xyz/docs/rules/no-children-to-array */ 'react/no-children-to-array'?: Linter.RuleEntry<[]> /** - * Disallow class components except for error boundaries. + * Disallows class components except for error boundaries. * @see https://eslint-react.xyz/docs/rules/no-class-component */ 'react/no-class-component'?: Linter.RuleEntry<[]> /** - * Disallow `cloneElement`. + * Disallows 'cloneElement'. * @see https://eslint-react.xyz/docs/rules/no-clone-element */ 'react/no-clone-element'?: Linter.RuleEntry<[]> /** - * Replace usages of `componentWillMount` with `UNSAFE_componentWillMount`. + * Replaces usage of 'componentWillMount' with 'UNSAFE_componentWillMount'. * @see https://eslint-react.xyz/docs/rules/no-component-will-mount */ 'react/no-component-will-mount'?: Linter.RuleEntry<[]> /** - * Replace usages of `componentWillReceiveProps` with `UNSAFE_componentWillReceiveProps`. + * Replaces usage of 'componentWillReceiveProps' with 'UNSAFE_componentWillReceiveProps'. * @see https://eslint-react.xyz/docs/rules/no-component-will-receive-props */ 'react/no-component-will-receive-props'?: Linter.RuleEntry<[]> /** - * Replace usages of `componentWillUpdate` with `UNSAFE_componentWillUpdate`. + * Replaces usage of 'componentWillUpdate' with 'UNSAFE_componentWillUpdate'. * @see https://eslint-react.xyz/docs/rules/no-component-will-update */ 'react/no-component-will-update'?: Linter.RuleEntry<[]> /** - * Replace usages of `` with ``. + * Replaces usage of '' with ''. * @see https://eslint-react.xyz/docs/rules/no-context-provider */ 'react/no-context-provider'?: Linter.RuleEntry<[]> /** - * Disallow `createRef` in function components. + * Disallows 'createRef' in function components. * @see https://eslint-react.xyz/docs/rules/no-create-ref */ 'react/no-create-ref'?: Linter.RuleEntry<[]> /** - * Disallow `defaultProps` property in favor of ES6 default parameters. + * Disallows the 'defaultProps' property in favor of ES6 default parameters. * @see https://eslint-react.xyz/docs/rules/no-default-props */ 'react/no-default-props'?: Linter.RuleEntry<[]> /** - * Disallow direct mutation of `this.state`. + * Disallows direct mutation of 'this.state'. * @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state */ 'react/no-direct-mutation-state'?: Linter.RuleEntry<[]> /** - * Disallow duplicate `key` on elements in the same array or a list of `children`. + * Prevents duplicate 'key' props on sibling elements when rendering lists. * @see https://eslint-react.xyz/docs/rules/no-duplicate-key */ 'react/no-duplicate-key'?: Linter.RuleEntry<[]> /** - * Disallow certain props on components. + * Disallows certain props on components. * @see https://eslint-react.xyz/docs/rules/no-forbidden-props * @deprecated */ 'react/no-forbidden-props'?: Linter.RuleEntry /** - * Replaces usages of `forwardRef` with passing `ref` as a prop. + * Replaces usage of 'forwardRef' with passing 'ref' as a prop. * @see https://eslint-react.xyz/docs/rules/no-forward-ref */ 'react/no-forward-ref'?: Linter.RuleEntry<[]> /** - * Prevents `key` from not being explicitly specified (e.g. spreading `key` from objects). + * Prevents implicitly passing the 'key' prop to components. * @see https://eslint-react.xyz/docs/rules/no-implicit-key */ 'react/no-implicit-key'?: Linter.RuleEntry<[]> @@ -3778,57 +3804,57 @@ export interface RuleOptions { */ 'react/no-leaked-conditional-rendering'?: Linter.RuleEntry<[]> /** - * Enforces that all components have a `displayName` which can be used in devtools. + * Enforces that all components have a 'displayName' that can be used in DevTools. * @see https://eslint-react.xyz/docs/rules/no-missing-component-display-name */ 'react/no-missing-component-display-name'?: Linter.RuleEntry<[]> /** - * Enforces that all contexts have a `displayName` which can be used in devtools. + * Enforces that all contexts have a 'displayName' that can be used in DevTools. * @see https://eslint-react.xyz/docs/rules/no-missing-context-display-name */ 'react/no-missing-context-display-name'?: Linter.RuleEntry<[]> /** - * Disallow missing `key` on items in list rendering. + * Disallows missing 'key' on items in list rendering. * @see https://eslint-react.xyz/docs/rules/no-missing-key */ 'react/no-missing-key'?: Linter.RuleEntry<[]> /** - * Prevents incorrect usage of `captureOwnerStack`. + * Prevents incorrect usage of 'captureOwnerStack'. * @see https://eslint-react.xyz/docs/rules/no-misused-capture-owner-stack */ 'react/no-misused-capture-owner-stack'?: Linter.RuleEntry<[]> /** - * Disallow nesting component definitions inside other components. + * Disallows nesting component definitions inside other components. * @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions */ 'react/no-nested-component-definitions'?: Linter.RuleEntry<[]> /** - * Disallow nesting lazy component declarations inside other components. + * Disallows nesting lazy component declarations inside other components. * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations */ 'react/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]> /** - * Disallow `propTypes` in favor of TypeScript or another type-checking solution. + * Disallows 'propTypes' in favor of TypeScript or another type-checking solution. * @see https://eslint-react.xyz/docs/rules/no-prop-types */ 'react/no-prop-types'?: Linter.RuleEntry<[]> /** - * Disallow `shouldComponentUpdate` when extending `React.PureComponent`. + * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'. * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update */ 'react/no-redundant-should-component-update'?: Linter.RuleEntry<[]> /** - * Disallow calling `this.setState` in `componentDidMount` outside of functions, such as callbacks. + * Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks. * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount */ 'react/no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]> /** - * Disallow calling `this.setState` in `componentDidUpdate` outside of functions, such as callbacks. + * Disallows calling 'this.setState' in 'componentDidUpdate' outside functions such as callbacks. * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-update */ 'react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]> /** - * Disallow calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks. + * Disallows calling 'this.setState' in 'componentWillUpdate' outside functions such as callbacks. * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update */ 'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]> @@ -3838,42 +3864,47 @@ export interface RuleOptions { */ 'react/no-string-refs'?: Linter.RuleEntry<[]> /** - * Prevents the use of unnecessary `key` props on JSX elements when rendering lists. + * Disallows unnecessary 'key' props on nested child elements when rendering lists. * @see https://eslint-react.xyz/docs/rules/no-unnecessary-key */ 'react/no-unnecessary-key'?: Linter.RuleEntry<[]> /** - * Disallow unnecessary usage of `useCallback`. + * Disallows unnecessary usage of 'useCallback'. * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback */ 'react/no-unnecessary-use-callback'?: Linter.RuleEntry<[]> /** - * Disallow unnecessary usage of `useMemo`. + * Disallows unnecessary usage of 'useMemo'. * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo */ 'react/no-unnecessary-use-memo'?: Linter.RuleEntry<[]> /** - * Enforces that a function with the `use` prefix should use at least one Hook inside of it. + * Enforces that a function with the 'use' prefix uses at least one Hook inside it. * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix */ 'react/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]> /** - * Warns the usage of `UNSAFE_componentWillMount` in class components. + * Disallows unnecessary usage of 'useRef'. + * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-ref + */ + 'react/no-unnecessary-use-ref'?: Linter.RuleEntry<[]> + /** + * Warns about the use of 'UNSAFE_componentWillMount' in class components. * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount */ 'react/no-unsafe-component-will-mount'?: Linter.RuleEntry<[]> /** - * Warns the usage of `UNSAFE_componentWillReceiveProps` in class components. + * Warns about the use of 'UNSAFE_componentWillReceiveProps' in class components. * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props */ 'react/no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]> /** - * Warns the usage of `UNSAFE_componentWillUpdate` in class components. + * Warns about the use of 'UNSAFE_componentWillUpdate' in class components. * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update */ 'react/no-unsafe-component-will-update'?: Linter.RuleEntry<[]> /** - * Prevents non-stable values (i.e. object literals) from being used as a value for `Context.Provider`. + * Prevents non-stable values (i.e., object literals) from being used as a value for 'Context.Provider'. * @see https://eslint-react.xyz/docs/rules/no-unstable-context-value */ 'react/no-unstable-context-value'?: Linter.RuleEntry<[]> @@ -3883,32 +3914,32 @@ export interface RuleOptions { */ 'react/no-unstable-default-props'?: Linter.RuleEntry /** - * Warns unused class component methods and properties. + * Warns about unused class component methods and properties. * @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members */ 'react/no-unused-class-component-members'?: Linter.RuleEntry<[]> /** - * Warns component props that are defined but never used. + * Warns about component props that are defined but never used. * @see https://eslint-react.xyz/docs/rules/no-unused-props */ 'react/no-unused-props'?: Linter.RuleEntry<[]> /** - * Warns unused class component state. + * Warns about unused class component state. * @see https://eslint-react.xyz/docs/rules/no-unused-state */ 'react/no-unused-state'?: Linter.RuleEntry<[]> /** - * Replaces usages of `useContext` with `use`. + * Replaces usage of 'useContext' with 'use'. * @see https://eslint-react.xyz/docs/rules/no-use-context */ 'react/no-use-context'?: Linter.RuleEntry<[]> /** - * Disallow useless `forwardRef` calls on components that don't use `ref`s. + * Disallows useless 'forwardRef' calls on components that don't use 'ref's. * @see https://eslint-react.xyz/docs/rules/no-useless-forward-ref */ 'react/no-useless-forward-ref'?: Linter.RuleEntry<[]> /** - * Disallow useless fragment elements. + * Disallows useless fragment elements. * @see https://eslint-react.xyz/docs/rules/no-useless-fragment */ 'react/no-useless-fragment'?: Linter.RuleEntry @@ -3918,7 +3949,7 @@ export interface RuleOptions { */ 'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]> /** - * Enforces React is imported via a namespace import. + * Enforces importing React via a namespace import. * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import */ 'react/prefer-namespace-import'?: Linter.RuleEntry<[]> @@ -3928,7 +3959,7 @@ export interface RuleOptions { */ 'react/prefer-read-only-props'?: Linter.RuleEntry<[]> /** - * Enforces function calls made inside `useState` to be wrapped in an `initializer function`. + * Enforces wrapping function calls made inside 'useState' in an 'initializer function'. * @see https://eslint-react.xyz/docs/rules/prefer-use-state-lazy-initialization */ 'react/prefer-use-state-lazy-initialization'?: Linter.RuleEntry<[]> @@ -4918,7 +4949,7 @@ export interface RuleOptions { * disallow conditional expects * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-expect.md */ - 'test/no-conditional-expect'?: Linter.RuleEntry<[]> + 'test/no-conditional-expect'?: Linter.RuleEntry /** * disallow conditional tests * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-in-test.md @@ -5129,7 +5160,7 @@ export interface RuleOptions { * prefer dynamic import in mock * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-import-in-mock.md */ - 'test/prefer-import-in-mock'?: Linter.RuleEntry<[]> + 'test/prefer-import-in-mock'?: Linter.RuleEntry /** * enforce importing Vitest globals * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-importing-vitest-globals.md @@ -5145,6 +5176,11 @@ export interface RuleOptions { * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md */ 'test/prefer-mock-promise-shorthand'?: Linter.RuleEntry<[]> + /** + * Prefer mock return shorthands + * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-return-shorthand.md + */ + 'test/prefer-mock-return-shorthand'?: Linter.RuleEntry<[]> /** * enforce including a hint with external snapshots * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-snapshot-hint.md @@ -5230,6 +5266,11 @@ export interface RuleOptions { * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-mock-type-parameters.md */ 'test/require-mock-type-parameters'?: Linter.RuleEntry + /** + * require tests to declare a timeout + * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-test-timeout.md + */ + 'test/require-test-timeout'?: Linter.RuleEntry<[]> /** * require toThrow() to be called with an error message * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-to-throw-message.md @@ -5843,7 +5884,7 @@ export interface RuleOptions { * Disallow default values that will never be used * @see https://typescript-eslint.io/rules/no-useless-default-assignment */ - 'ts/no-useless-default-assignment'?: Linter.RuleEntry<[]> + 'ts/no-useless-default-assignment'?: Linter.RuleEntry /** * Disallow empty exports that don't change anything in a module file * @see https://typescript-eslint.io/rules/no-useless-empty-export @@ -6017,6 +6058,11 @@ export interface RuleOptions { * @see https://typescript-eslint.io/rules/strict-boolean-expressions */ 'ts/strict-boolean-expressions'?: Linter.RuleEntry + /** + * Disallow passing a value-returning function in a position accepting a void function + * @see https://typescript-eslint.io/rules/strict-void-return + */ + 'ts/strict-void-return'?: Linter.RuleEntry /** * Require switch-case statements to be exhaustive * @see https://typescript-eslint.io/rules/switch-exhaustiveness-check @@ -6055,725 +6101,730 @@ export interface RuleOptions { 'unicode-bom'?: Linter.RuleEntry /** * Improve regexes by making them shorter, consistent, and safer. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/better-regex.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/better-regex.md */ 'unicorn/better-regex'?: Linter.RuleEntry /** * Enforce a specific parameter name in catch clauses. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/catch-error-name.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/catch-error-name.md */ 'unicorn/catch-error-name'?: Linter.RuleEntry /** * Enforce consistent assertion style with `node:assert`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-assert.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-assert.md */ 'unicorn/consistent-assert'?: Linter.RuleEntry<[]> /** * Prefer passing `Date` directly to the constructor when cloning. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-date-clone.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-date-clone.md */ 'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]> /** * Use destructured variables over properties. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-destructuring.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-destructuring.md */ 'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]> /** * Prefer consistent types when spreading a ternary in an array literal. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-empty-array-spread.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-empty-array-spread.md */ 'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]> /** * Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-existence-index-check.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-existence-index-check.md */ 'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]> /** * Move function definitions to the highest possible scope. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-function-scoping.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-function-scoping.md */ 'unicorn/consistent-function-scoping'?: Linter.RuleEntry /** * Enforce correct `Error` subclassing. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/custom-error-definition.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/custom-error-definition.md */ 'unicorn/custom-error-definition'?: Linter.RuleEntry<[]> /** * Enforce no spaces between braces. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/empty-brace-spaces.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/empty-brace-spaces.md */ 'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]> /** * Enforce passing a `message` value when creating a built-in error. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/error-message.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/error-message.md */ 'unicorn/error-message'?: Linter.RuleEntry<[]> /** * Require escape sequences to use uppercase or lowercase values. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/escape-case.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/escape-case.md */ 'unicorn/escape-case'?: Linter.RuleEntry /** * Add expiration conditions to TODO comments. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/expiring-todo-comments.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/expiring-todo-comments.md */ 'unicorn/expiring-todo-comments'?: Linter.RuleEntry /** * Enforce explicitly comparing the `length` or `size` property of a value. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/explicit-length-check.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/explicit-length-check.md */ 'unicorn/explicit-length-check'?: Linter.RuleEntry /** * Enforce a case style for filenames. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/filename-case.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/filename-case.md */ 'unicorn/filename-case'?: Linter.RuleEntry /** * Enforce specific import styles per module. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/import-style.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/import-style.md */ 'unicorn/import-style'?: Linter.RuleEntry + /** + * Prevent usage of variables from outside the scope of isolated functions. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/isolated-functions.md + */ + 'unicorn/isolated-functions'?: Linter.RuleEntry /** * Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/new-for-builtins.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/new-for-builtins.md */ 'unicorn/new-for-builtins'?: Linter.RuleEntry<[]> /** * Enforce specifying rules to disable in `eslint-disable` comments. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-abusive-eslint-disable.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-abusive-eslint-disable.md */ 'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]> /** * Disallow recursive access to `this` within getters and setters. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-accessor-recursion.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-accessor-recursion.md */ 'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]> /** * Disallow anonymous functions and classes as the default export. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-anonymous-default-export.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-anonymous-default-export.md */ 'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]> /** * Prevent passing a function reference directly to iterator methods. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-callback-reference.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-callback-reference.md */ 'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]> /** * Prefer `for…of` over the `forEach` method. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-for-each.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-for-each.md */ 'unicorn/no-array-for-each'?: Linter.RuleEntry<[]> /** * Disallow using the `this` argument in array methods. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-method-this-argument.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-method-this-argument.md */ 'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]> /** * Replaced by `unicorn/prefer-single-call` which covers more cases. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-array-push-push + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push * @deprecated */ 'unicorn/no-array-push-push'?: Linter.RuleEntry<[]> /** * Disallow `Array#reduce()` and `Array#reduceRight()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reduce.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reduce.md */ 'unicorn/no-array-reduce'?: Linter.RuleEntry /** * Prefer `Array#toReversed()` over `Array#reverse()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reverse.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reverse.md */ 'unicorn/no-array-reverse'?: Linter.RuleEntry /** * Prefer `Array#toSorted()` over `Array#sort()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-sort.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-sort.md */ 'unicorn/no-array-sort'?: Linter.RuleEntry /** * Disallow member access from await expression. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-expression-member.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-expression-member.md */ 'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]> /** * Disallow using `await` in `Promise` method parameters. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-in-promise-methods.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-in-promise-methods.md */ 'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]> /** * Do not use leading/trailing space between `console.log` parameters. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-console-spaces.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-console-spaces.md */ 'unicorn/no-console-spaces'?: Linter.RuleEntry<[]> /** * Do not use `document.cookie` directly. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-document-cookie.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-document-cookie.md */ 'unicorn/no-document-cookie'?: Linter.RuleEntry<[]> /** * Disallow empty files. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-empty-file.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-empty-file.md */ 'unicorn/no-empty-file'?: Linter.RuleEntry<[]> /** * Do not use a `for` loop that can be replaced with a `for-of` loop. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-for-loop.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-for-loop.md */ 'unicorn/no-for-loop'?: Linter.RuleEntry<[]> /** * Enforce the use of Unicode escapes instead of hexadecimal escapes. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-hex-escape.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-hex-escape.md */ 'unicorn/no-hex-escape'?: Linter.RuleEntry<[]> /** * Disallow immediate mutation after variable assignment. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-immediate-mutation.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-immediate-mutation.md */ 'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]> /** * Replaced by `unicorn/no-instanceof-builtins` which covers more cases. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-instanceof-array + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array * @deprecated */ 'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]> /** * Disallow `instanceof` with built-in objects - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-instanceof-builtins.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-instanceof-builtins.md */ 'unicorn/no-instanceof-builtins'?: Linter.RuleEntry /** * Disallow invalid options in `fetch()` and `new Request()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-fetch-options.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-fetch-options.md */ 'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]> /** * Prevent calling `EventTarget#removeEventListener()` with the result of an expression. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-remove-event-listener.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-remove-event-listener.md */ 'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]> /** * Disallow identifiers starting with `new` or `class`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-keyword-prefix.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-keyword-prefix.md */ 'unicorn/no-keyword-prefix'?: Linter.RuleEntry /** * Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-length-as-slice-end + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end * @deprecated */ 'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]> /** * Disallow `if` statements as the only statement in `if` blocks without `else`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-lonely-if.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-lonely-if.md */ 'unicorn/no-lonely-if'?: Linter.RuleEntry<[]> /** * Disallow a magic number as the `depth` argument in `Array#flat(…).` - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-magic-array-flat-depth.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-magic-array-flat-depth.md */ 'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]> /** * Disallow named usage of default import and export. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-named-default.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-named-default.md */ 'unicorn/no-named-default'?: Linter.RuleEntry<[]> /** * Disallow negated conditions. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negated-condition.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negated-condition.md */ 'unicorn/no-negated-condition'?: Linter.RuleEntry<[]> /** * Disallow negated expression in equality check. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negation-in-equality-check.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negation-in-equality-check.md */ 'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]> /** * Disallow nested ternary expressions. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-nested-ternary.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-nested-ternary.md */ 'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]> /** * Disallow `new Array()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-array.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-array.md */ 'unicorn/no-new-array'?: Linter.RuleEntry<[]> /** * Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-buffer.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-buffer.md */ 'unicorn/no-new-buffer'?: Linter.RuleEntry<[]> /** * Disallow the use of the `null` literal. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-null.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-null.md */ 'unicorn/no-null'?: Linter.RuleEntry /** * Disallow the use of objects as default parameters. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-object-as-default-parameter.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-object-as-default-parameter.md */ 'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]> /** * Disallow `process.exit()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-process-exit.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-process-exit.md */ 'unicorn/no-process-exit'?: Linter.RuleEntry<[]> /** * Disallow passing single-element arrays to `Promise` methods. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-single-promise-in-promise-methods.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-single-promise-in-promise-methods.md */ 'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]> /** * Disallow classes that only have static members. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-static-only-class.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-static-only-class.md */ 'unicorn/no-static-only-class'?: Linter.RuleEntry<[]> /** * Disallow `then` property. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-thenable.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-thenable.md */ 'unicorn/no-thenable'?: Linter.RuleEntry<[]> /** * Disallow assigning `this` to a variable. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-this-assignment.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-this-assignment.md */ 'unicorn/no-this-assignment'?: Linter.RuleEntry<[]> /** * Disallow comparing `undefined` using `typeof`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-typeof-undefined.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-typeof-undefined.md */ 'unicorn/no-typeof-undefined'?: Linter.RuleEntry /** * Disallow using `1` as the `depth` argument of `Array#flat()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-flat-depth.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-flat-depth.md */ 'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]> /** * Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-splice-count.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-splice-count.md */ 'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]> /** * Disallow awaiting non-promise values. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-await.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-await.md */ 'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]> /** * Enforce the use of built-in methods instead of unnecessary polyfills. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-polyfills.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-polyfills.md */ 'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry /** * Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-slice-end.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-slice-end.md */ 'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]> /** * Disallow unreadable array destructuring. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-array-destructuring.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-array-destructuring.md */ 'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]> /** * Disallow unreadable IIFEs. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-iife.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-iife.md */ 'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]> /** * Disallow unused object properties. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unused-properties.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unused-properties.md */ 'unicorn/no-unused-properties'?: Linter.RuleEntry<[]> /** * Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-collection-argument.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-collection-argument.md */ 'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]> /** * Disallow unnecessary `Error.captureStackTrace(…)`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-error-capture-stack-trace.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-error-capture-stack-trace.md */ 'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]> /** * Disallow useless fallback when spreading in object literals. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-fallback-in-spread.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-fallback-in-spread.md */ 'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]> /** * Disallow useless array length check. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-length-check.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-length-check.md */ 'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]> /** * Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-promise-resolve-reject.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-promise-resolve-reject.md */ 'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]> /** * Disallow unnecessary spread. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-spread.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-spread.md */ 'unicorn/no-useless-spread'?: Linter.RuleEntry<[]> /** * Disallow useless case in switch statements. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-switch-case.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-switch-case.md */ 'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]> /** * Disallow useless `undefined`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-undefined.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-undefined.md */ 'unicorn/no-useless-undefined'?: Linter.RuleEntry /** * Disallow number literals with zero fractions or dangling dots. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-zero-fractions.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-zero-fractions.md */ 'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]> /** * Enforce proper case for numeric literals. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/number-literal-case.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/number-literal-case.md */ 'unicorn/number-literal-case'?: Linter.RuleEntry /** * Enforce the style of numeric separators by correctly grouping digits. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/numeric-separators-style.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/numeric-separators-style.md */ 'unicorn/numeric-separators-style'?: Linter.RuleEntry /** * Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-add-event-listener.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-add-event-listener.md */ 'unicorn/prefer-add-event-listener'?: Linter.RuleEntry /** * Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-find.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-find.md */ 'unicorn/prefer-array-find'?: Linter.RuleEntry /** * Prefer `Array#flat()` over legacy techniques to flatten arrays. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat.md */ 'unicorn/prefer-array-flat'?: Linter.RuleEntry /** * Prefer `.flatMap(…)` over `.map(…).flat()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat-map.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat-map.md */ 'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]> /** * Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-index-of.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-index-of.md */ 'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]> /** * Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-some.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-some.md */ 'unicorn/prefer-array-some'?: Linter.RuleEntry<[]> /** * Prefer `.at()` method for index access and `String#charAt()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-at.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-at.md */ 'unicorn/prefer-at'?: Linter.RuleEntry /** * Prefer `BigInt` literals over the constructor. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-bigint-literals.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-bigint-literals.md */ 'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]> /** * Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-blob-reading-methods.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-blob-reading-methods.md */ 'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]> /** * Prefer class field declarations over `this` assignments in constructors. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-class-fields.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-class-fields.md */ 'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]> /** * Prefer using `Element#classList.toggle()` to toggle class names. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-classlist-toggle.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-classlist-toggle.md */ 'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]> /** * Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-code-point.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-code-point.md */ 'unicorn/prefer-code-point'?: Linter.RuleEntry<[]> /** * Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-date-now.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-date-now.md */ 'unicorn/prefer-date-now'?: Linter.RuleEntry<[]> /** * Prefer default parameters over reassignment. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-default-parameters.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-default-parameters.md */ 'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]> /** * Prefer `Node#append()` over `Node#appendChild()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-append.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-append.md */ 'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]> /** * Prefer using `.dataset` on DOM elements over calling attribute methods. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-dataset.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-dataset.md */ 'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]> /** * Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-remove.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-remove.md */ 'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]> /** * Prefer `.textContent` over `.innerText`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-text-content.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-text-content.md */ 'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]> /** * Prefer `EventTarget` over `EventEmitter`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-event-target.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-event-target.md */ 'unicorn/prefer-event-target'?: Linter.RuleEntry<[]> /** * Prefer `export…from` when re-exporting. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-export-from.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-export-from.md */ 'unicorn/prefer-export-from'?: Linter.RuleEntry /** * Prefer `globalThis` over `window`, `self`, and `global`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-global-this.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-global-this.md */ 'unicorn/prefer-global-this'?: Linter.RuleEntry<[]> /** * Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-import-meta-properties.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-import-meta-properties.md */ 'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]> /** * Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-includes.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-includes.md */ 'unicorn/prefer-includes'?: Linter.RuleEntry<[]> /** * Prefer reading a JSON file as a buffer. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-json-parse-buffer.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-json-parse-buffer.md */ 'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]> /** * Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-keyboard-event-key.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-keyboard-event-key.md */ 'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]> /** * Prefer using a logical operator over a ternary. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-logical-operator-over-ternary.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-logical-operator-over-ternary.md */ 'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]> /** * Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-min-max.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-min-max.md */ 'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]> /** * Enforce the use of `Math.trunc` instead of bitwise operators. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-trunc.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-trunc.md */ 'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]> /** * Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-dom-apis.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-dom-apis.md */ 'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]> /** * Prefer modern `Math` APIs over legacy patterns. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-math-apis.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-math-apis.md */ 'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]> /** * Prefer JavaScript modules (ESM) over CommonJS. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-module.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-module.md */ 'unicorn/prefer-module'?: Linter.RuleEntry<[]> /** * Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-native-coercion-functions.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-native-coercion-functions.md */ 'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]> /** * Prefer negative index over `.length - index` when possible. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-negative-index.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-negative-index.md */ 'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]> /** * Prefer using the `node:` protocol when importing Node.js builtin modules. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-node-protocol.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-node-protocol.md */ 'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]> /** * Prefer `Number` static properties over global ones. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-number-properties.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-number-properties.md */ 'unicorn/prefer-number-properties'?: Linter.RuleEntry /** * Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-object-from-entries.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-object-from-entries.md */ 'unicorn/prefer-object-from-entries'?: Linter.RuleEntry /** * Prefer omitting the `catch` binding parameter. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-optional-catch-binding.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-optional-catch-binding.md */ 'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]> /** * Prefer borrowing methods from the prototype instead of the instance. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-prototype-methods.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-prototype-methods.md */ 'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]> /** * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-query-selector.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-query-selector.md */ 'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]> /** * Prefer `Reflect.apply()` over `Function#apply()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-reflect-apply.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-reflect-apply.md */ 'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]> /** * Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-regexp-test.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-regexp-test.md */ 'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]> /** * Prefer `Response.json()` over `new Response(JSON.stringify())`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-response-static-json.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-response-static-json.md */ 'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]> /** * Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-has.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-has.md */ 'unicorn/prefer-set-has'?: Linter.RuleEntry<[]> /** * Prefer using `Set#size` instead of `Array#length`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-size.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-size.md */ 'unicorn/prefer-set-size'?: Linter.RuleEntry<[]> /** * Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-single-call.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-single-call.md */ 'unicorn/prefer-single-call'?: Linter.RuleEntry /** * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-spread.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-spread.md */ 'unicorn/prefer-spread'?: Linter.RuleEntry<[]> /** * Prefer using the `String.raw` tag to avoid escaping `\`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-raw.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-raw.md */ 'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]> /** * Prefer `String#replaceAll()` over regex searches with the global flag. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-replace-all.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-replace-all.md */ 'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]> /** * Prefer `String#slice()` over `String#substr()` and `String#substring()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-slice.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-slice.md */ 'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]> /** * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-starts-ends-with.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-starts-ends-with.md */ 'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]> /** * Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-trim-start-end.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-trim-start-end.md */ 'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]> /** * Prefer using `structuredClone` to create a deep clone. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-structured-clone.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-structured-clone.md */ 'unicorn/prefer-structured-clone'?: Linter.RuleEntry /** * Prefer `switch` over multiple `else-if`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-switch.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-switch.md */ 'unicorn/prefer-switch'?: Linter.RuleEntry /** * Prefer ternary expressions over simple `if-else` statements. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-ternary.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-ternary.md */ 'unicorn/prefer-ternary'?: Linter.RuleEntry /** * Prefer top-level await over top-level promises and async function calls. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-top-level-await.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-top-level-await.md */ 'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]> /** * Enforce throwing `TypeError` in type checking conditions. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-type-error.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-type-error.md */ 'unicorn/prefer-type-error'?: Linter.RuleEntry<[]> /** * Prevent abbreviations. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prevent-abbreviations.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prevent-abbreviations.md */ 'unicorn/prevent-abbreviations'?: Linter.RuleEntry /** * Enforce consistent relative URL style. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/relative-url-style.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/relative-url-style.md */ 'unicorn/relative-url-style'?: Linter.RuleEntry /** * Enforce using the separator argument with `Array#join()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-array-join-separator.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-array-join-separator.md */ 'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]> /** * Require non-empty module attributes for imports and exports - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-attributes.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-attributes.md */ 'unicorn/require-module-attributes'?: Linter.RuleEntry<[]> /** * Require non-empty specifier list in import and export statements. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-specifiers.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-specifiers.md */ 'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]> /** * Enforce using the digits argument with `Number#toFixed()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-number-to-fixed-digits-argument.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-number-to-fixed-digits-argument.md */ 'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]> /** * Enforce using the `targetOrigin` argument with `window.postMessage()`. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-post-message-target-origin.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-post-message-target-origin.md */ 'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]> /** * Enforce better string content. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/string-content.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/string-content.md */ 'unicorn/string-content'?: Linter.RuleEntry /** * Enforce consistent brace style for `case` clauses. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/switch-case-braces.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/switch-case-braces.md */ 'unicorn/switch-case-braces'?: Linter.RuleEntry /** * Fix whitespace-insensitive template indentation. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/template-indent.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/template-indent.md */ 'unicorn/template-indent'?: Linter.RuleEntry /** * Enforce consistent case for text encoding identifiers. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/text-encoding-identifier-case.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/text-encoding-identifier-case.md */ 'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry /** * Require `new` when creating an error. - * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/throw-new-error.md + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/throw-new-error.md */ 'unicorn/throw-new-error'?: Linter.RuleEntry<[]> /** @@ -7306,6 +7357,11 @@ export interface RuleOptions { * @see https://eslint.vuejs.org/rules/no-lifecycle-after-await.html */ 'vue/no-lifecycle-after-await'?: Linter.RuleEntry<[]> + /** + * disallow object, array, and function literals in template + * @see https://eslint.vuejs.org/rules/no-literals-in-template.html + */ + 'vue/no-literals-in-template'?: Linter.RuleEntry<[]> /** * disallow unnecessary `