From a1cde8a798684d4a24c09aa54fd23bd1f6306c92 Mon Sep 17 00:00:00 2001 From: "Marcus R. Brown" Date: Tue, 14 Apr 2026 22:25:08 -0700 Subject: [PATCH 1/2] feat(eslint-config)!: upgrade @eslint-react/eslint-plugin to v4 unified architecture --- .changeset/eslint-react-v4.md | 13 + packages/eslint-config/package.json | 4 +- packages/eslint-config/src/configs/react.ts | 85 +- packages/eslint-config/src/rules.d.ts | 6590 ++++++++++--------- pnpm-lock.yaml | 288 +- 5 files changed, 3470 insertions(+), 3510 deletions(-) create mode 100644 .changeset/eslint-react-v4.md diff --git a/.changeset/eslint-react-v4.md b/.changeset/eslint-react-v4.md new file mode 100644 index 000000000..3cc489e0d --- /dev/null +++ b/.changeset/eslint-react-v4.md @@ -0,0 +1,13 @@ +--- +"@bfra.me/eslint-config": minor +--- + +Upgrade `@eslint-react/eslint-plugin` from v2 to v4 + +Adopts the unified plugin architecture introduced in v4. Key changes: + +- **Unified plugin**: Sub-plugins (`@eslint-react/dom`, `@eslint-react/hooks-extra`, `@eslint-react/naming-convention`, `@eslint-react/web-api`) are now merged into a single `@eslint-react` plugin +- **Recommended ruleset**: Uses `pluginReact.configs.recommended.rules` spread instead of manually listing ~40 individual rules, keeping the config aligned with upstream defaults +- **Removed rules**: Rules deleted in v4 (`no-default-props`, `no-prop-types`, `jsx-no-duplicate-props`, `jsx-uses-vars`, `no-string-refs`, `no-useless-forward-ref`, `prefer-use-state-lazy-initialization`) are no longer configured +- **Hooks coverage**: v4's unified plugin includes hooks rules (`rules-of-hooks`, `exhaustive-deps`) via the recommended config; `eslint-plugin-react-hooks` remains as a peer dependency for consumers using it directly +- **Peer dependency**: Updated from `^2.2.3` to `^4.2.3` diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 91359bc07..3f62d8e1d 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -75,7 +75,7 @@ "@bfra.me/prettier-config": "workspace:*", "@bfra.me/tsconfig": "workspace:*", "@bfra.me/works": "workspace:*", - "@eslint-react/eslint-plugin": "2.13.0", + "@eslint-react/eslint-plugin": "4.2.3", "@eslint/config-inspector": "1.5.0", "@eslint/core": "1.2.1", "@next/eslint-plugin-next": "16.2.3", @@ -97,7 +97,7 @@ "eslint-typegen": "2.3.1" }, "peerDependencies": { - "@eslint-react/eslint-plugin": "^2.2.3", + "@eslint-react/eslint-plugin": "^4.2.3", "@next/eslint-plugin-next": ">=15.5.3", "@vitest/eslint-plugin": "^1.1.21", "astro-eslint-parser": "^1.2.2", diff --git a/packages/eslint-config/src/configs/react.ts b/packages/eslint-config/src/configs/react.ts index 72f672f0e..55ca253cc 100644 --- a/packages/eslint-config/src/configs/react.ts +++ b/packages/eslint-config/src/configs/react.ts @@ -1,4 +1,3 @@ -import type {Plugin} from '@eslint/core' import type {Config} from '../config' import type { Flatten, @@ -77,15 +76,14 @@ export async function react(options: ReactOptions = {}): Promise { const isTypeAware = typeof tsconfigPath === 'string' && tsconfigPath.trim().length > 0 return requireOf( - ['@eslint-react/eslint-plugin', 'eslint-plugin-react-hooks', 'eslint-plugin-react-refresh'], + ['@eslint-react/eslint-plugin', 'eslint-plugin-react-refresh'], async () => { - const [pluginReact, pluginReactHooks, pluginReactRefresh] = await Promise.all([ + const [pluginReact, pluginReactRefresh] = await Promise.all([ interopDefault(import('@eslint-react/eslint-plugin')), - interopDefault(import('eslint-plugin-react-hooks')), import('eslint-plugin-react-refresh').then(m => m.reactRefresh), ] as const) - const plugins = (pluginReact.configs.all as {plugins: Record}).plugins + const plugins = pluginReact.configs.all.plugins as NonNullable const isAllowConstantExport = ReactRefreshAllowConstantExportPackages.some(i => isPackageExists(i), ) @@ -97,13 +95,8 @@ export async function react(options: ReactOptions = {}): Promise { { name: '@bfra.me/react/setup', plugins: { - react: plugins['@eslint-react'], - 'react-dom': plugins['@eslint-react/dom'], - 'react-hooks': pluginReactHooks, - 'react-hooks-extra': plugins['@eslint-react/hooks-extra'], - 'react-naming-convention': plugins['@eslint-react/naming-convention'], + ...plugins, 'react-refresh': pluginReactRefresh.plugin, - 'react-web-api': plugins['@eslint-react/web-api'], } as Config['plugins'], }, { @@ -118,28 +111,7 @@ export async function react(options: ReactOptions = {}): Promise { sourceType: 'module', }, rules: { - // recommended rules from eslint-plugin-react-dom https://eslint-react.xyz/docs/rules/overview#dom-rules - 'react-dom/no-namespace': 'error', - 'react-dom/no-dangerously-set-innerhtml': 'warn', - 'react-dom/no-dangerously-set-innerhtml-with-children': 'error', - 'react-dom/no-find-dom-node': 'error', - 'react-dom/no-flush-sync': 'error', - 'react-dom/no-hydrate': 'error', - 'react-dom/no-missing-button-type': 'warn', - 'react-dom/no-missing-iframe-sandbox': 'warn', - 'react-dom/no-render': 'error', - 'react-dom/no-render-return-value': 'error', - 'react-dom/no-script-url': 'warn', - 'react-dom/no-unsafe-iframe-sandbox': 'warn', - 'react-dom/no-unsafe-target-blank': 'warn', - 'react-dom/no-use-form-state': 'error', - 'react-dom/no-void-elements-with-children': 'error', - - // recommended rules from eslint-plugin-react-hooks-extra https://eslint-react.xyz/docs/rules/overview#hooks-extra-rules - 'react-hooks-extra/no-direct-set-state-in-use-effect': 'warn', - - // recommended rules eslint-plugin-react-hooks https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks/src/rules - ...pluginReactHooks.configs.recommended.rules, + ...pluginReact.configs.recommended.rules, // preconfigured rules from eslint-plugin-react-refresh https://github.com/ArnaudBarre/eslint-plugin-react-refresh/tree/main/src 'react-refresh/only-export-components': [ @@ -181,53 +153,6 @@ export async function react(options: ReactOptions = {}): Promise { }, ], - // 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', - 'react-web-api/no-leaked-resize-observer': 'warn', - 'react-web-api/no-leaked-timeout': 'warn', - - // recommended rules from eslint-plugin-react-x https://eslint-react.xyz/docs/rules/overview#core-rules - 'react/jsx-no-comment-textnodes': 'warn', - 'react/jsx-no-duplicate-props': 'warn', - 'react/jsx-uses-vars': 'warn', - 'react/no-access-state-in-setstate': 'error', - 'react/no-array-index-key': 'warn', - 'react/no-children-count': 'warn', - 'react/no-children-for-each': 'warn', - 'react/no-children-map': 'warn', - 'react/no-children-only': 'warn', - 'react/no-children-to-array': 'warn', - 'react/no-clone-element': 'warn', - 'react/no-component-will-mount': 'error', - 'react/no-component-will-receive-props': 'error', - 'react/no-component-will-update': 'error', - 'react/no-context-provider': 'warn', - 'react/no-create-ref': 'error', - 'react/no-default-props': 'error', - 'react/no-direct-mutation-state': 'error', - 'react/no-duplicate-key': 'warn', - 'react/no-forward-ref': 'warn', - 'react/no-missing-key': 'error', - 'react/no-nested-component-definitions': 'error', - 'react/no-prop-types': 'error', - 'react/no-redundant-should-component-update': 'error', - 'react/no-set-state-in-component-did-mount': 'warn', - 'react/no-set-state-in-component-did-update': 'warn', - 'react/no-set-state-in-component-will-update': 'warn', - 'react/no-string-refs': 'error', - 'react/no-unnecessary-use-prefix': 'warn', - 'react/no-unsafe-component-will-mount': 'warn', - 'react/no-unsafe-component-will-receive-props': 'warn', - 'react/no-unsafe-component-will-update': 'warn', - 'react/no-unstable-context-value': 'warn', - 'react/no-unstable-default-props': 'warn', - 'react/no-unused-class-component-members': 'warn', - 'react/no-unused-state': 'warn', - 'react/no-use-context': 'warn', - 'react/no-useless-forward-ref': 'warn', - 'react/prefer-use-state-lazy-initialization': 'warn', - ...overrides, }, }, diff --git a/packages/eslint-config/src/rules.d.ts b/packages/eslint-config/src/rules.d.ts index 01fb283c4..7dacd742f 100644 --- a/packages/eslint-config/src/rules.d.ts +++ b/packages/eslint-config/src/rules.d.ts @@ -10,5158 +10,5304 @@ export interface Rules { */ '@bfra.me/missing-module-for-config'?: Linter.RuleEntry /** - * Enforce font-display behavior with Google Fonts. - * @see https://nextjs.org/docs/messages/google-font-display + * Disallows higher order functions that define components or hooks inside them. + * @see https://eslint-react.xyz/docs/rules/component-hook-factories */ - '@next/next/google-font-display'?: Linter.RuleEntry<[]> + '@eslint-react/component-hook-factories'?: Linter.RuleEntry<[]> /** - * Ensure `preconnect` is used with Google Fonts. - * @see https://nextjs.org/docs/messages/google-font-preconnect + * Disallows DOM elements from using 'dangerouslySetInnerHTML'. + * @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml */ - '@next/next/google-font-preconnect'?: Linter.RuleEntry<[]> + '@eslint-react/dom-no-dangerously-set-innerhtml'?: Linter.RuleEntry<[]> /** - * Enforce `id` attribute on `next/script` components with inline content. - * @see https://nextjs.org/docs/messages/inline-script-id + * 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 */ - '@next/next/inline-script-id'?: Linter.RuleEntry<[]> + '@eslint-react/dom-no-dangerously-set-innerhtml-with-children'?: Linter.RuleEntry<[]> /** - * Prefer `@next/third-parties/google` when using the inline script for Google Analytics and Tag Manager. - * @see https://nextjs.org/docs/messages/next-script-for-ga + * Disallows 'findDOMNode'. + * @see https://eslint-react.xyz/docs/rules/dom-no-find-dom-node */ - '@next/next/next-script-for-ga'?: Linter.RuleEntry<[]> + '@eslint-react/dom-no-find-dom-node'?: Linter.RuleEntry<[]> /** - * Prevent assignment to the `module` variable. - * @see https://nextjs.org/docs/messages/no-assign-module-variable + * Disallows 'flushSync'. + * @see https://eslint-react.xyz/docs/rules/dom-no-flush-sync */ - '@next/next/no-assign-module-variable'?: Linter.RuleEntry<[]> + '@eslint-react/dom-no-flush-sync'?: Linter.RuleEntry<[]> /** - * Prevent Client Components from being async functions. - * @see https://nextjs.org/docs/messages/no-async-client-component + * Replaces usage of 'ReactDOM.hydrate()' with 'hydrateRoot()'. + * @see https://eslint-react.xyz/docs/rules/dom-no-hydrate */ - '@next/next/no-async-client-component'?: Linter.RuleEntry<[]> + '@eslint-react/dom-no-hydrate'?: Linter.RuleEntry<[]> /** - * Prevent usage of `next/script`'s `beforeInteractive` strategy outside of `pages/_document.js`. - * @see https://nextjs.org/docs/messages/no-before-interactive-script-outside-document + * Enforces an explicit 'type' attribute for 'button' elements. + * @see https://eslint-react.xyz/docs/rules/dom-no-missing-button-type */ - '@next/next/no-before-interactive-script-outside-document'?: Linter.RuleEntry<[]> + '@eslint-react/dom-no-missing-button-type'?: Linter.RuleEntry<[]> /** - * Prevent manual stylesheet tags. - * @see https://nextjs.org/docs/messages/no-css-tags + * Enforces an explicit 'sandbox' attribute for 'iframe' elements. + * @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox */ - '@next/next/no-css-tags'?: Linter.RuleEntry<[]> + '@eslint-react/dom-no-missing-iframe-sandbox'?: Linter.RuleEntry<[]> /** - * Prevent importing `next/document` outside of `pages/_document.js`. - * @see https://nextjs.org/docs/messages/no-document-import-in-page + * Replaces usage of 'ReactDOM.render()' with 'createRoot(node).render()'. + * @see https://eslint-react.xyz/docs/rules/dom-no-render */ - '@next/next/no-document-import-in-page'?: Linter.RuleEntry<[]> + '@eslint-react/dom-no-render'?: Linter.RuleEntry<[]> /** - * Prevent duplicate usage of `` in `pages/_document.js`. - * @see https://nextjs.org/docs/messages/no-duplicate-head + * Disallows the return value of 'ReactDOM.render'. + * @see https://eslint-react.xyz/docs/rules/dom-no-render-return-value */ - '@next/next/no-duplicate-head'?: Linter.RuleEntry<[]> + '@eslint-react/dom-no-render-return-value'?: Linter.RuleEntry<[]> /** - * Prevent usage of `` element. - * @see https://nextjs.org/docs/messages/no-head-element + * Disallows 'javascript:' URLs as attribute values. + * @see https://eslint-react.xyz/docs/rules/dom-no-script-url */ - '@next/next/no-head-element'?: Linter.RuleEntry<[]> + '@eslint-react/dom-no-script-url'?: Linter.RuleEntry<[]> /** - * Prevent usage of `next/head` in `pages/_document.js`. - * @see https://nextjs.org/docs/messages/no-head-import-in-document + * 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 */ - '@next/next/no-head-import-in-document'?: Linter.RuleEntry<[]> + '@eslint-react/dom-no-string-style-prop'?: Linter.RuleEntry<[]> /** - * Prevent usage of `` elements to navigate to internal Next.js pages. - * @see https://nextjs.org/docs/messages/no-html-link-for-pages + * Disallows unknown 'DOM' properties. + * @see https://eslint-react.xyz/docs/rules/dom-no-unknown-property */ - '@next/next/no-html-link-for-pages'?: Linter.RuleEntry + '@eslint-react/dom-no-unknown-property'?: Linter.RuleEntry /** - * Prevent usage of `` element due to slower LCP and higher bandwidth. - * @see https://nextjs.org/docs/messages/no-img-element + * 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 */ - '@next/next/no-img-element'?: Linter.RuleEntry<[]> + '@eslint-react/dom-no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]> /** - * Prevent page-only custom fonts. - * @see https://nextjs.org/docs/messages/no-page-custom-font + * Disallows 'target="_blank"' without 'rel="noreferrer noopener"'. + * @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank */ - '@next/next/no-page-custom-font'?: Linter.RuleEntry<[]> + '@eslint-react/dom-no-unsafe-target-blank'?: Linter.RuleEntry<[]> /** - * Prevent usage of `next/script` in `next/head` component. - * @see https://nextjs.org/docs/messages/no-script-component-in-head + * Replaces usage of 'useFormState' with 'useActionState'. + * @see https://eslint-react.xyz/docs/rules/dom-no-use-form-state */ - '@next/next/no-script-component-in-head'?: Linter.RuleEntry<[]> + '@eslint-react/dom-no-use-form-state'?: Linter.RuleEntry<[]> /** - * Prevent usage of `styled-jsx` in `pages/_document.js`. - * @see https://nextjs.org/docs/messages/no-styled-jsx-in-document + * Disallows 'children' in void DOM elements. + * @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children */ - '@next/next/no-styled-jsx-in-document'?: Linter.RuleEntry<[]> + '@eslint-react/dom-no-void-elements-with-children'?: Linter.RuleEntry<[]> /** - * Prevent synchronous scripts. - * @see https://nextjs.org/docs/messages/no-sync-scripts + * Enforces importing React DOM via a namespace import. + * @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import */ - '@next/next/no-sync-scripts'?: Linter.RuleEntry<[]> + '@eslint-react/dom-prefer-namespace-import'?: Linter.RuleEntry<[]> /** - * Prevent usage of `` with `Head` component from `next/document`. - * @see https://nextjs.org/docs/messages/no-title-in-document-head + * Validates usage of Error Boundaries instead of try/catch for errors in child components. + * @see https://eslint-react.xyz/docs/rules/error-boundaries */ - '@next/next/no-title-in-document-head'?: Linter.RuleEntry<[]> + '@eslint-react/error-boundaries'?: Linter.RuleEntry<[]> /** - * Prevent common typos in Next.js data fetching functions. + * Verifies the list of dependencies for Hooks like 'useEffect' and similar. + * @see https://github.com/facebook/react/issues/14920 */ - '@next/next/no-typos'?: Linter.RuleEntry<[]> + '@eslint-react/exhaustive-deps'?: Linter.RuleEntry<EslintReactExhaustiveDeps> /** - * Prevent duplicate polyfills from Polyfill.io. - * @see https://nextjs.org/docs/messages/no-unwanted-polyfillio + * Validates against mutating props, state, and other values that are immutable. + * @see https://eslint-react.xyz/docs/rules/immutability */ - '@next/next/no-unwanted-polyfillio'?: Linter.RuleEntry<[]> + '@eslint-react/immutability'?: Linter.RuleEntry<[]> /** - * Enforce linebreaks after opening and before closing array brackets - * @see https://eslint.style/rules/array-bracket-newline + * Disallows passing 'children' as a prop. + * @see https://eslint-react.xyz/docs/rules/no-children-prop */ - '@stylistic/array-bracket-newline'?: Linter.RuleEntry<StylisticArrayBracketNewline> + '@eslint-react/jsx-no-children-prop'?: Linter.RuleEntry<[]> /** - * Enforce consistent spacing inside array brackets - * @see https://eslint.style/rules/array-bracket-spacing + * Disallows passing 'children' as a prop when children are also passed as nested content. + * @see https://eslint-react.xyz/docs/rules/no-children-prop-with-children */ - '@stylistic/array-bracket-spacing'?: Linter.RuleEntry<StylisticArrayBracketSpacing> + '@eslint-react/jsx-no-children-prop-with-children'?: Linter.RuleEntry<[]> /** - * Enforce line breaks after each array element - * @see https://eslint.style/rules/array-element-newline + * Prevents comment strings from being accidentally inserted into a JSX element's text nodes. + * @see https://eslint-react.xyz/docs/rules/no-comment-textnodes */ - '@stylistic/array-element-newline'?: Linter.RuleEntry<StylisticArrayElementNewline> + '@eslint-react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]> /** - * Require parentheses around arrow function arguments - * @see https://eslint.style/rules/arrow-parens + * Prevent patterns that cause deoptimization when using the automatic JSX runtime. + * @see https://eslint-react.xyz/docs/rules/no-key-after-spread */ - '@stylistic/arrow-parens'?: Linter.RuleEntry<StylisticArrowParens> + '@eslint-react/jsx-no-key-after-spread'?: Linter.RuleEntry<[]> /** - * Enforce consistent spacing before and after the arrow in arrow functions - * @see https://eslint.style/rules/arrow-spacing + * Catches `$` before `{expr}` in JSX — typically from template literal `${expr}` being copy-pasted into JSX without removing the `$`. The `$` "leaks" into the rendered output. + * @see https://eslint-react.xyz/docs/rules/no-leaked-dollar */ - '@stylistic/arrow-spacing'?: Linter.RuleEntry<StylisticArrowSpacing> + '@eslint-react/jsx-no-leaked-dollar'?: Linter.RuleEntry<[]> /** - * Disallow or enforce spaces inside of blocks after opening block and before closing block - * @see https://eslint.style/rules/block-spacing + * Catches `;` at the start of JSX text nodes — typically from accidentally placing a statement-ending `;` inside JSX. The `;` "leaks" into the rendered output. + * @see https://eslint-react.xyz/docs/rules/no-leaked-semicolon */ - '@stylistic/block-spacing'?: Linter.RuleEntry<StylisticBlockSpacing> + '@eslint-react/jsx-no-leaked-semicolon'?: Linter.RuleEntry<[]> /** - * Enforce consistent brace style for blocks - * @see https://eslint.style/rules/brace-style + * Disallow JSX namespace syntax, as React does not support them. + * @see https://eslint-react.xyz/docs/rules/no-namespace */ - '@stylistic/brace-style'?: Linter.RuleEntry<StylisticBraceStyle> + '@eslint-react/jsx-no-namespace'?: Linter.RuleEntry<[]> /** - * Require or disallow trailing commas - * @see https://eslint.style/rules/comma-dangle + * Disallows useless fragment elements. + * @see https://eslint-react.xyz/docs/rules/no-useless-fragment */ - '@stylistic/comma-dangle'?: Linter.RuleEntry<StylisticCommaDangle> + '@eslint-react/jsx-no-useless-fragment'?: Linter.RuleEntry<EslintReactJsxNoUselessFragment> /** - * Enforce consistent spacing before and after commas - * @see https://eslint.style/rules/comma-spacing + * 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 */ - '@stylistic/comma-spacing'?: Linter.RuleEntry<StylisticCommaSpacing> + '@eslint-react/naming-convention-context-name'?: Linter.RuleEntry<[]> /** - * Enforce consistent comma style - * @see https://eslint.style/rules/comma-style + * Enforces identifier names assigned from 'useId' calls to be either 'id' or end with 'Id'. + * @see https://eslint-react.xyz/docs/rules/naming-convention-id-name */ - '@stylistic/comma-style'?: Linter.RuleEntry<StylisticCommaStyle> + '@eslint-react/naming-convention-id-name'?: Linter.RuleEntry<[]> /** - * Enforce consistent spacing inside computed property brackets - * @see https://eslint.style/rules/computed-property-spacing + * 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 */ - '@stylistic/computed-property-spacing'?: Linter.RuleEntry<StylisticComputedPropertySpacing> + '@eslint-react/naming-convention-ref-name'?: Linter.RuleEntry<[]> /** - * Enforce consistent line breaks after opening and before closing braces - * @see https://eslint.style/rules/curly-newline + * Disallows accessing 'this.state' inside 'setState' calls. + * @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate */ - '@stylistic/curly-newline'?: Linter.RuleEntry<StylisticCurlyNewline> + '@eslint-react/no-access-state-in-setstate'?: Linter.RuleEntry<[]> /** - * Enforce consistent newlines before and after dots - * @see https://eslint.style/rules/dot-location + * Disallows using an item's index in the array as its key. + * @see https://eslint-react.xyz/docs/rules/no-array-index-key */ - '@stylistic/dot-location'?: Linter.RuleEntry<StylisticDotLocation> + '@eslint-react/no-array-index-key'?: Linter.RuleEntry<[]> /** - * Require or disallow newline at the end of files - * @see https://eslint.style/rules/eol-last + * Disallows the use of 'Children.count' from the 'react' package. + * @see https://eslint-react.xyz/docs/rules/no-children-count */ - '@stylistic/eol-last'?: Linter.RuleEntry<StylisticEolLast> + '@eslint-react/no-children-count'?: Linter.RuleEntry<[]> /** - * Enforce consistent line break styles for JSX props - * @see https://eslint.style/rules/jsx-props-style + * Disallows the use of 'Children.forEach' from the 'react' package. + * @see https://eslint-react.xyz/docs/rules/no-children-for-each */ - '@stylistic/exp-jsx-props-style'?: Linter.RuleEntry<StylisticExpJsxPropsStyle> + '@eslint-react/no-children-for-each'?: Linter.RuleEntry<[]> /** - * Enforce consistent spacing and line break styles inside brackets. - * @see https://eslint.style/rules/list-style + * Disallows the use of 'Children.map' from the 'react' package. + * @see https://eslint-react.xyz/docs/rules/no-children-map */ - '@stylistic/exp-list-style'?: Linter.RuleEntry<StylisticExpListStyle> + '@eslint-react/no-children-map'?: Linter.RuleEntry<[]> /** - * Enforce line breaks between arguments of a function call - * @see https://eslint.style/rules/function-call-argument-newline + * Disallows the use of 'Children.only' from the 'react' package. + * @see https://eslint-react.xyz/docs/rules/no-children-only */ - '@stylistic/function-call-argument-newline'?: Linter.RuleEntry<StylisticFunctionCallArgumentNewline> + '@eslint-react/no-children-only'?: Linter.RuleEntry<[]> /** - * Require or disallow spacing between function identifiers and their invocations - * @see https://eslint.style/rules/function-call-spacing + * Disallows the use of 'Children.toArray' from the 'react' package. + * @see https://eslint-react.xyz/docs/rules/no-children-to-array */ - '@stylistic/function-call-spacing'?: Linter.RuleEntry<StylisticFunctionCallSpacing> + '@eslint-react/no-children-to-array'?: Linter.RuleEntry<[]> /** - * Enforce consistent line breaks inside function parentheses - * @see https://eslint.style/rules/function-paren-newline + * Disallows class components except for error boundaries. + * @see https://eslint-react.xyz/docs/rules/no-class-component */ - '@stylistic/function-paren-newline'?: Linter.RuleEntry<StylisticFunctionParenNewline> + '@eslint-react/no-class-component'?: Linter.RuleEntry<[]> /** - * Enforce consistent spacing around `*` operators in generator functions - * @see https://eslint.style/rules/generator-star-spacing + * Disallows 'cloneElement'. + * @see https://eslint-react.xyz/docs/rules/no-clone-element */ - '@stylistic/generator-star-spacing'?: Linter.RuleEntry<StylisticGeneratorStarSpacing> + '@eslint-react/no-clone-element'?: Linter.RuleEntry<[]> /** - * Enforce the location of arrow function bodies - * @see https://eslint.style/rules/implicit-arrow-linebreak + * Replaces usage of 'componentWillMount' with 'UNSAFE_componentWillMount'. + * @see https://eslint-react.xyz/docs/rules/no-component-will-mount */ - '@stylistic/implicit-arrow-linebreak'?: Linter.RuleEntry<StylisticImplicitArrowLinebreak> + '@eslint-react/no-component-will-mount'?: Linter.RuleEntry<[]> /** - * Enforce consistent indentation - * @see https://eslint.style/rules/indent + * Replaces usage of 'componentWillReceiveProps' with 'UNSAFE_componentWillReceiveProps'. + * @see https://eslint-react.xyz/docs/rules/no-component-will-receive-props */ - '@stylistic/indent'?: Linter.RuleEntry<StylisticIndent> + '@eslint-react/no-component-will-receive-props'?: Linter.RuleEntry<[]> /** - * Indentation for binary operators - * @see https://eslint.style/rules/indent-binary-ops + * Replaces usage of 'componentWillUpdate' with 'UNSAFE_componentWillUpdate'. + * @see https://eslint-react.xyz/docs/rules/no-component-will-update */ - '@stylistic/indent-binary-ops'?: Linter.RuleEntry<StylisticIndentBinaryOps> + '@eslint-react/no-component-will-update'?: Linter.RuleEntry<[]> /** - * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions - * @see https://eslint.style/rules/jsx-child-element-spacing + * Replaces usage of '<Context.Provider>' with '<Context>'. + * @see https://eslint-react.xyz/docs/rules/no-context-provider */ - '@stylistic/jsx-child-element-spacing'?: Linter.RuleEntry<[]> + '@eslint-react/no-context-provider'?: Linter.RuleEntry<[]> /** - * Enforce closing bracket location in JSX - * @see https://eslint.style/rules/jsx-closing-bracket-location + * Disallows 'createRef' in function components. + * @see https://eslint-react.xyz/docs/rules/no-create-ref */ - '@stylistic/jsx-closing-bracket-location'?: Linter.RuleEntry<StylisticJsxClosingBracketLocation> + '@eslint-react/no-create-ref'?: Linter.RuleEntry<[]> /** - * Enforce closing tag location for multiline JSX - * @see https://eslint.style/rules/jsx-closing-tag-location + * Disallows direct mutation of 'this.state'. + * @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state */ - '@stylistic/jsx-closing-tag-location'?: Linter.RuleEntry<StylisticJsxClosingTagLocation> + '@eslint-react/no-direct-mutation-state'?: Linter.RuleEntry<[]> /** - * Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes - * @see https://eslint.style/rules/jsx-curly-brace-presence + * Prevents duplicate 'key' props on sibling elements when rendering lists. + * @see https://eslint-react.xyz/docs/rules/no-duplicate-key */ - '@stylistic/jsx-curly-brace-presence'?: Linter.RuleEntry<StylisticJsxCurlyBracePresence> + '@eslint-react/no-duplicate-key'?: Linter.RuleEntry<[]> /** - * Enforce consistent linebreaks in curly braces in JSX attributes and expressions - * @see https://eslint.style/rules/jsx-curly-newline + * Replaces usage of 'forwardRef' with passing 'ref' as a prop. + * @see https://eslint-react.xyz/docs/rules/no-forward-ref */ - '@stylistic/jsx-curly-newline'?: Linter.RuleEntry<StylisticJsxCurlyNewline> + '@eslint-react/no-forward-ref'?: Linter.RuleEntry<[]> /** - * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions - * @see https://eslint.style/rules/jsx-curly-spacing + * Prevents implicitly passing the 'children' prop to components. + * @see https://eslint-react.xyz/docs/rules/no-implicit-children */ - '@stylistic/jsx-curly-spacing'?: Linter.RuleEntry<StylisticJsxCurlySpacing> + '@eslint-react/no-implicit-children'?: Linter.RuleEntry<[]> /** - * Enforce or disallow spaces around equal signs in JSX attributes - * @see https://eslint.style/rules/jsx-equals-spacing + * Prevents implicitly passing the 'key' prop to components. + * @see https://eslint-react.xyz/docs/rules/no-implicit-key */ - '@stylistic/jsx-equals-spacing'?: Linter.RuleEntry<StylisticJsxEqualsSpacing> + '@eslint-react/no-implicit-key'?: Linter.RuleEntry<[]> /** - * Enforce proper position of the first property in JSX - * @see https://eslint.style/rules/jsx-first-prop-new-line + * Prevents implicitly passing the 'ref' prop to components. + * @see https://eslint-react.xyz/docs/rules/no-implicit-ref */ - '@stylistic/jsx-first-prop-new-line'?: Linter.RuleEntry<StylisticJsxFirstPropNewLine> + '@eslint-react/no-implicit-ref'?: Linter.RuleEntry<[]> /** - * Enforce line breaks before and after JSX elements when they are used as arguments to a function. - * @see https://eslint.style/rules/jsx-function-call-newline + * Prevents problematic leaked values from being rendered. + * @see https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering */ - '@stylistic/jsx-function-call-newline'?: Linter.RuleEntry<StylisticJsxFunctionCallNewline> + '@eslint-react/no-leaked-conditional-rendering'?: Linter.RuleEntry<[]> /** - * Enforce JSX indentation. Deprecated, use `indent` rule instead. - * @see https://eslint.style/rules/jsx-indent - * @deprecated + * 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 */ - '@stylistic/jsx-indent'?: Linter.RuleEntry<StylisticJsxIndent> + '@eslint-react/no-missing-component-display-name'?: Linter.RuleEntry<[]> /** - * Enforce props indentation in JSX - * @see https://eslint.style/rules/jsx-indent-props + * 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 */ - '@stylistic/jsx-indent-props'?: Linter.RuleEntry<StylisticJsxIndentProps> + '@eslint-react/no-missing-context-display-name'?: Linter.RuleEntry<[]> /** - * Enforce maximum of props on a single line in JSX - * @see https://eslint.style/rules/jsx-max-props-per-line + * Disallows missing 'key' on items in list rendering. + * @see https://eslint-react.xyz/docs/rules/no-missing-key */ - '@stylistic/jsx-max-props-per-line'?: Linter.RuleEntry<StylisticJsxMaxPropsPerLine> + '@eslint-react/no-missing-key'?: Linter.RuleEntry<[]> /** - * Require or prevent a new line after jsx elements and expressions. - * @see https://eslint.style/rules/jsx-newline + * Prevents incorrect usage of 'captureOwnerStack'. + * @see https://eslint-react.xyz/docs/rules/no-misused-capture-owner-stack */ - '@stylistic/jsx-newline'?: Linter.RuleEntry<StylisticJsxNewline> + '@eslint-react/no-misused-capture-owner-stack'?: Linter.RuleEntry<[]> /** - * Require one JSX element per line - * @see https://eslint.style/rules/jsx-one-expression-per-line + * Disallows nesting component definitions inside other components. + * @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions */ - '@stylistic/jsx-one-expression-per-line'?: Linter.RuleEntry<StylisticJsxOneExpressionPerLine> + '@eslint-react/no-nested-component-definitions'?: Linter.RuleEntry<[]> /** - * Enforce PascalCase for user-defined JSX components - * @see https://eslint.style/rules/jsx-pascal-case + * Disallows nesting lazy component declarations inside other components or hooks. + * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations */ - '@stylistic/jsx-pascal-case'?: Linter.RuleEntry<StylisticJsxPascalCase> + '@eslint-react/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]> /** - * Disallow multiple spaces between inline JSX props. Deprecated, use `no-multi-spaces` rule instead. - * @see https://eslint.style/rules/jsx-props-no-multi-spaces - * @deprecated + * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'. + * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update */ - '@stylistic/jsx-props-no-multi-spaces'?: Linter.RuleEntry<[]> + '@eslint-react/no-redundant-should-component-update'?: Linter.RuleEntry<[]> /** - * Enforce the consistent use of either double or single quotes in JSX attributes - * @see https://eslint.style/rules/jsx-quotes + * 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 */ - '@stylistic/jsx-quotes'?: Linter.RuleEntry<StylisticJsxQuotes> + '@eslint-react/no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]> /** - * Disallow extra closing tags for components without children - * @see https://eslint.style/rules/jsx-self-closing-comp + * 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 */ - '@stylistic/jsx-self-closing-comp'?: Linter.RuleEntry<StylisticJsxSelfClosingComp> + '@eslint-react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]> /** - * Enforce props alphabetical sorting - * @see https://eslint.style/rules/jsx-sort-props - * @deprecated + * 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 */ - '@stylistic/jsx-sort-props'?: Linter.RuleEntry<StylisticJsxSortProps> + '@eslint-react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]> /** - * Enforce whitespace in and around the JSX opening and closing brackets - * @see https://eslint.style/rules/jsx-tag-spacing + * Disallows unnecessary usage of 'useCallback'. + * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback */ - '@stylistic/jsx-tag-spacing'?: Linter.RuleEntry<StylisticJsxTagSpacing> + '@eslint-react/no-unnecessary-use-callback'?: Linter.RuleEntry<[]> /** - * Disallow missing parentheses around multiline JSX - * @see https://eslint.style/rules/jsx-wrap-multilines + * Disallows unnecessary usage of 'useMemo'. + * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo */ - '@stylistic/jsx-wrap-multilines'?: Linter.RuleEntry<StylisticJsxWrapMultilines> + '@eslint-react/no-unnecessary-use-memo'?: Linter.RuleEntry<[]> /** - * Enforce consistent spacing between property names and type annotations in types and interfaces - * @see https://eslint.style/rules/key-spacing + * 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 */ - '@stylistic/key-spacing'?: Linter.RuleEntry<StylisticKeySpacing> + '@eslint-react/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]> /** - * Enforce consistent spacing before and after keywords - * @see https://eslint.style/rules/keyword-spacing + * Warns about the use of 'UNSAFE_componentWillMount' in class components. + * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount */ - '@stylistic/keyword-spacing'?: Linter.RuleEntry<StylisticKeywordSpacing> + '@eslint-react/no-unsafe-component-will-mount'?: Linter.RuleEntry<[]> /** - * Enforce position of line comments - * @see https://eslint.style/rules/line-comment-position + * Warns about the use of 'UNSAFE_componentWillReceiveProps' in class components. + * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props */ - '@stylistic/line-comment-position'?: Linter.RuleEntry<StylisticLineCommentPosition> + '@eslint-react/no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]> /** - * Enforce consistent linebreak style - * @see https://eslint.style/rules/linebreak-style + * Warns about the use of 'UNSAFE_componentWillUpdate' in class components. + * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update */ - '@stylistic/linebreak-style'?: Linter.RuleEntry<StylisticLinebreakStyle> + '@eslint-react/no-unsafe-component-will-update'?: Linter.RuleEntry<[]> /** - * Require empty lines around comments - * @see https://eslint.style/rules/lines-around-comment + * 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 */ - '@stylistic/lines-around-comment'?: Linter.RuleEntry<StylisticLinesAroundComment> + '@eslint-react/no-unstable-context-value'?: Linter.RuleEntry<[]> /** - * Require or disallow an empty line between class members - * @see https://eslint.style/rules/lines-between-class-members + * Prevents using referential-type values as default props in object destructuring. + * @see https://eslint-react.xyz/docs/rules/no-unstable-default-props */ - '@stylistic/lines-between-class-members'?: Linter.RuleEntry<StylisticLinesBetweenClassMembers> + '@eslint-react/no-unstable-default-props'?: Linter.RuleEntry<EslintReactNoUnstableDefaultProps> /** - * Enforce a maximum line length - * @see https://eslint.style/rules/max-len + * Warns about unused class component methods and properties. + * @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members */ - '@stylistic/max-len'?: Linter.RuleEntry<StylisticMaxLen> + '@eslint-react/no-unused-class-component-members'?: Linter.RuleEntry<[]> /** - * Enforce a maximum number of statements allowed per line - * @see https://eslint.style/rules/max-statements-per-line + * Warns about component props that are defined but never used. + * @see https://eslint-react.xyz/docs/rules/no-unused-props */ - '@stylistic/max-statements-per-line'?: Linter.RuleEntry<StylisticMaxStatementsPerLine> + '@eslint-react/no-unused-props'?: Linter.RuleEntry<[]> /** - * Require a specific member delimiter style for interfaces and type literals - * @see https://eslint.style/rules/member-delimiter-style + * Warns about unused class component state. + * @see https://eslint-react.xyz/docs/rules/no-unused-state */ - '@stylistic/member-delimiter-style'?: Linter.RuleEntry<StylisticMemberDelimiterStyle> + '@eslint-react/no-unused-state'?: Linter.RuleEntry<[]> /** - * Enforce a particular style for multiline comments - * @see https://eslint.style/rules/multiline-comment-style + * Replaces usage of 'useContext' with 'use'. + * @see https://eslint-react.xyz/docs/rules/no-use-context */ - '@stylistic/multiline-comment-style'?: Linter.RuleEntry<StylisticMultilineCommentStyle> + '@eslint-react/no-use-context'?: Linter.RuleEntry<[]> /** - * Enforce newlines between operands of ternary expressions - * @see https://eslint.style/rules/multiline-ternary + * Enforces destructuring assignment for component props and context. + * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment */ - '@stylistic/multiline-ternary'?: Linter.RuleEntry<StylisticMultilineTernary> + '@eslint-react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]> /** - * Enforce or disallow parentheses when invoking a constructor with no arguments - * @see https://eslint.style/rules/new-parens + * Enforces importing React via a namespace import. + * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import */ - '@stylistic/new-parens'?: Linter.RuleEntry<StylisticNewParens> + '@eslint-react/prefer-namespace-import'?: Linter.RuleEntry<[]> /** - * Require a newline after each call in a method chain - * @see https://eslint.style/rules/newline-per-chained-call + * Validates that components and hooks are pure by checking that they do not call known-impure functions during render. + * @see https://eslint-react.xyz/docs/rules/purity */ - '@stylistic/newline-per-chained-call'?: Linter.RuleEntry<StylisticNewlinePerChainedCall> + '@eslint-react/purity'?: Linter.RuleEntry<[]> /** - * Disallow arrow functions where they could be confused with comparisons - * @see https://eslint.style/rules/no-confusing-arrow + * Validates correct usage of refs by checking that 'ref.current' is not read or written during render. + * @see https://eslint-react.xyz/docs/rules/refs */ - '@stylistic/no-confusing-arrow'?: Linter.RuleEntry<StylisticNoConfusingArrow> + '@eslint-react/refs'?: Linter.RuleEntry<[]> /** - * Disallow unnecessary parentheses - * @see https://eslint.style/rules/no-extra-parens + * Validates and transforms React Client/Server Function definitions. + * @see https://eslint-react.xyz/docs/rules/function-definition */ - '@stylistic/no-extra-parens'?: Linter.RuleEntry<StylisticNoExtraParens> + '@eslint-react/rsc-function-definition'?: Linter.RuleEntry<[]> /** - * Disallow unnecessary semicolons - * @see https://eslint.style/rules/no-extra-semi + * Enforces the Rules of Hooks. + * @see https://react.dev/reference/rules/rules-of-hooks */ - '@stylistic/no-extra-semi'?: Linter.RuleEntry<[]> + '@eslint-react/rules-of-hooks'?: Linter.RuleEntry<EslintReactRulesOfHooks> /** - * Disallow leading or trailing decimal points in numeric literals - * @see https://eslint.style/rules/no-floating-decimal + * Validates against setting state synchronously in an effect, which can lead to re-renders that degrade performance. + * @see https://eslint-react.xyz/docs/rules/set-state-in-effect */ - '@stylistic/no-floating-decimal'?: Linter.RuleEntry<[]> + '@eslint-react/set-state-in-effect'?: Linter.RuleEntry<[]> /** - * Disallow mixed binary operators - * @see https://eslint.style/rules/no-mixed-operators + * Validates against unconditionally setting state during render, which can trigger additional renders and potential infinite render loops. + * @see https://eslint-react.xyz/docs/rules/set-state-in-render */ - '@stylistic/no-mixed-operators'?: Linter.RuleEntry<StylisticNoMixedOperators> + '@eslint-react/set-state-in-render'?: Linter.RuleEntry<[]> /** - * Disallow mixed spaces and tabs for indentation - * @see https://eslint.style/rules/no-mixed-spaces-and-tabs + * Validates against syntax that React Compiler does not support. + * @see https://eslint-react.xyz/docs/rules/unsupported-syntax */ - '@stylistic/no-mixed-spaces-and-tabs'?: Linter.RuleEntry<StylisticNoMixedSpacesAndTabs> + '@eslint-react/unsupported-syntax'?: Linter.RuleEntry<[]> /** - * Disallow multiple spaces - * @see https://eslint.style/rules/no-multi-spaces + * Validates that 'useMemo' is called with a callback that returns a value. + * @see https://eslint-react.xyz/docs/rules/use-memo */ - '@stylistic/no-multi-spaces'?: Linter.RuleEntry<StylisticNoMultiSpaces> + '@eslint-react/use-memo'?: Linter.RuleEntry<[]> /** - * Disallow multiple empty lines - * @see https://eslint.style/rules/no-multiple-empty-lines + * Enforces correct usage of 'useState', including destructuring, symmetric naming of the value and setter, and wrapping expensive initializers in a lazy initializer function. + * @see https://eslint-react.xyz/docs/rules/use-state */ - '@stylistic/no-multiple-empty-lines'?: Linter.RuleEntry<StylisticNoMultipleEmptyLines> + '@eslint-react/use-state'?: Linter.RuleEntry<EslintReactUseState> /** - * Disallow all tabs - * @see https://eslint.style/rules/no-tabs + * 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 */ - '@stylistic/no-tabs'?: Linter.RuleEntry<StylisticNoTabs> + '@eslint-react/web-api-no-leaked-event-listener'?: Linter.RuleEntry<[]> /** - * Disallow trailing whitespace at the end of lines - * @see https://eslint.style/rules/no-trailing-spaces + * 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 */ - '@stylistic/no-trailing-spaces'?: Linter.RuleEntry<StylisticNoTrailingSpaces> + '@eslint-react/web-api-no-leaked-interval'?: Linter.RuleEntry<[]> /** - * Disallow whitespace before properties - * @see https://eslint.style/rules/no-whitespace-before-property + * 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 */ - '@stylistic/no-whitespace-before-property'?: Linter.RuleEntry<[]> + '@eslint-react/web-api-no-leaked-resize-observer'?: Linter.RuleEntry<[]> /** - * Enforce the location of single-line statements - * @see https://eslint.style/rules/nonblock-statement-body-position + * 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 */ - '@stylistic/nonblock-statement-body-position'?: Linter.RuleEntry<StylisticNonblockStatementBodyPosition> + '@eslint-react/web-api-no-leaked-timeout'?: Linter.RuleEntry<[]> /** - * Enforce consistent line breaks after opening and before closing braces - * @see https://eslint.style/rules/object-curly-newline + * Disallows higher order functions that define components or hooks inside them. + * @see https://eslint-react.xyz/docs/rules/component-hook-factories */ - '@stylistic/object-curly-newline'?: Linter.RuleEntry<StylisticObjectCurlyNewline> + '@eslint-react/x-component-hook-factories'?: Linter.RuleEntry<[]> /** - * Enforce consistent spacing inside braces - * @see https://eslint.style/rules/object-curly-spacing + * Validates usage of Error Boundaries instead of try/catch for errors in child components. + * @see https://eslint-react.xyz/docs/rules/error-boundaries */ - '@stylistic/object-curly-spacing'?: Linter.RuleEntry<StylisticObjectCurlySpacing> + '@eslint-react/x-error-boundaries'?: Linter.RuleEntry<[]> /** - * Enforce placing object properties on separate lines - * @see https://eslint.style/rules/object-property-newline + * Verifies the list of dependencies for Hooks like 'useEffect' and similar. + * @see https://github.com/facebook/react/issues/14920 */ - '@stylistic/object-property-newline'?: Linter.RuleEntry<StylisticObjectPropertyNewline> + '@eslint-react/x-exhaustive-deps'?: Linter.RuleEntry<EslintReactXExhaustiveDeps> /** - * Require or disallow newlines around variable declarations - * @see https://eslint.style/rules/one-var-declaration-per-line + * Validates against mutating props, state, and other values that are immutable. + * @see https://eslint-react.xyz/docs/rules/immutability */ - '@stylistic/one-var-declaration-per-line'?: Linter.RuleEntry<StylisticOneVarDeclarationPerLine> + '@eslint-react/x-immutability'?: Linter.RuleEntry<[]> /** - * Enforce consistent linebreak style for operators - * @see https://eslint.style/rules/operator-linebreak + * Disallows accessing 'this.state' inside 'setState' calls. + * @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate */ - '@stylistic/operator-linebreak'?: Linter.RuleEntry<StylisticOperatorLinebreak> + '@eslint-react/x-no-access-state-in-setstate'?: Linter.RuleEntry<[]> /** - * Require or disallow padding within blocks - * @see https://eslint.style/rules/padded-blocks + * Disallows using an item's index in the array as its key. + * @see https://eslint-react.xyz/docs/rules/no-array-index-key */ - '@stylistic/padded-blocks'?: Linter.RuleEntry<StylisticPaddedBlocks> + '@eslint-react/x-no-array-index-key'?: Linter.RuleEntry<[]> /** - * Require or disallow padding lines between statements - * @see https://eslint.style/rules/padding-line-between-statements + * Disallows the use of 'Children.count' from the 'react' package. + * @see https://eslint-react.xyz/docs/rules/no-children-count */ - '@stylistic/padding-line-between-statements'?: Linter.RuleEntry<StylisticPaddingLineBetweenStatements> + '@eslint-react/x-no-children-count'?: Linter.RuleEntry<[]> /** - * Require quotes around object literal, type literal, interfaces and enums property names - * @see https://eslint.style/rules/quote-props + * Disallows the use of 'Children.forEach' from the 'react' package. + * @see https://eslint-react.xyz/docs/rules/no-children-for-each */ - '@stylistic/quote-props'?: Linter.RuleEntry<StylisticQuoteProps> + '@eslint-react/x-no-children-for-each'?: Linter.RuleEntry<[]> /** - * Enforce the consistent use of either backticks, double, or single quotes - * @see https://eslint.style/rules/quotes + * Disallows the use of 'Children.map' from the 'react' package. + * @see https://eslint-react.xyz/docs/rules/no-children-map */ - '@stylistic/quotes'?: Linter.RuleEntry<StylisticQuotes> + '@eslint-react/x-no-children-map'?: Linter.RuleEntry<[]> /** - * Enforce spacing between rest and spread operators and their expressions - * @see https://eslint.style/rules/rest-spread-spacing + * Disallows the use of 'Children.only' from the 'react' package. + * @see https://eslint-react.xyz/docs/rules/no-children-only */ - '@stylistic/rest-spread-spacing'?: Linter.RuleEntry<StylisticRestSpreadSpacing> + '@eslint-react/x-no-children-only'?: Linter.RuleEntry<[]> /** - * Require or disallow semicolons instead of ASI - * @see https://eslint.style/rules/semi + * Disallows the use of 'Children.toArray' from the 'react' package. + * @see https://eslint-react.xyz/docs/rules/no-children-to-array */ - '@stylistic/semi'?: Linter.RuleEntry<StylisticSemi> + '@eslint-react/x-no-children-to-array'?: Linter.RuleEntry<[]> /** - * Enforce consistent spacing before and after semicolons - * @see https://eslint.style/rules/semi-spacing + * Disallows class components except for error boundaries. + * @see https://eslint-react.xyz/docs/rules/no-class-component */ - '@stylistic/semi-spacing'?: Linter.RuleEntry<StylisticSemiSpacing> + '@eslint-react/x-no-class-component'?: Linter.RuleEntry<[]> /** - * Enforce location of semicolons - * @see https://eslint.style/rules/semi-style + * Disallows 'cloneElement'. + * @see https://eslint-react.xyz/docs/rules/no-clone-element */ - '@stylistic/semi-style'?: Linter.RuleEntry<StylisticSemiStyle> + '@eslint-react/x-no-clone-element'?: Linter.RuleEntry<[]> /** - * Enforce consistent spacing before blocks - * @see https://eslint.style/rules/space-before-blocks + * Replaces usage of 'componentWillMount' with 'UNSAFE_componentWillMount'. + * @see https://eslint-react.xyz/docs/rules/no-component-will-mount */ - '@stylistic/space-before-blocks'?: Linter.RuleEntry<StylisticSpaceBeforeBlocks> + '@eslint-react/x-no-component-will-mount'?: Linter.RuleEntry<[]> /** - * Enforce consistent spacing before function parenthesis - * @see https://eslint.style/rules/space-before-function-paren + * Replaces usage of 'componentWillReceiveProps' with 'UNSAFE_componentWillReceiveProps'. + * @see https://eslint-react.xyz/docs/rules/no-component-will-receive-props */ - '@stylistic/space-before-function-paren'?: Linter.RuleEntry<StylisticSpaceBeforeFunctionParen> + '@eslint-react/x-no-component-will-receive-props'?: Linter.RuleEntry<[]> /** - * Enforce consistent spacing inside parentheses - * @see https://eslint.style/rules/space-in-parens + * Replaces usage of 'componentWillUpdate' with 'UNSAFE_componentWillUpdate'. + * @see https://eslint-react.xyz/docs/rules/no-component-will-update */ - '@stylistic/space-in-parens'?: Linter.RuleEntry<StylisticSpaceInParens> + '@eslint-react/x-no-component-will-update'?: Linter.RuleEntry<[]> /** - * Require spacing around infix operators - * @see https://eslint.style/rules/space-infix-ops + * Replaces usage of '<Context.Provider>' with '<Context>'. + * @see https://eslint-react.xyz/docs/rules/no-context-provider */ - '@stylistic/space-infix-ops'?: Linter.RuleEntry<StylisticSpaceInfixOps> + '@eslint-react/x-no-context-provider'?: Linter.RuleEntry<[]> /** - * Enforce consistent spacing before or after unary operators - * @see https://eslint.style/rules/space-unary-ops + * Disallows 'createRef' in function components. + * @see https://eslint-react.xyz/docs/rules/no-create-ref */ - '@stylistic/space-unary-ops'?: Linter.RuleEntry<StylisticSpaceUnaryOps> + '@eslint-react/x-no-create-ref'?: Linter.RuleEntry<[]> /** - * Enforce consistent spacing after the `//` or `/*` in a comment - * @see https://eslint.style/rules/spaced-comment + * Disallows direct mutation of 'this.state'. + * @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state */ - '@stylistic/spaced-comment'?: Linter.RuleEntry<StylisticSpacedComment> + '@eslint-react/x-no-direct-mutation-state'?: Linter.RuleEntry<[]> /** - * Enforce spacing around colons of switch statements - * @see https://eslint.style/rules/switch-colon-spacing + * Prevents duplicate 'key' props on sibling elements when rendering lists. + * @see https://eslint-react.xyz/docs/rules/no-duplicate-key */ - '@stylistic/switch-colon-spacing'?: Linter.RuleEntry<StylisticSwitchColonSpacing> + '@eslint-react/x-no-duplicate-key'?: Linter.RuleEntry<[]> /** - * Require or disallow spacing around embedded expressions of template strings - * @see https://eslint.style/rules/template-curly-spacing + * Replaces usage of 'forwardRef' with passing 'ref' as a prop. + * @see https://eslint-react.xyz/docs/rules/no-forward-ref */ - '@stylistic/template-curly-spacing'?: Linter.RuleEntry<StylisticTemplateCurlySpacing> + '@eslint-react/x-no-forward-ref'?: Linter.RuleEntry<[]> /** - * Require or disallow spacing between template tags and their literals - * @see https://eslint.style/rules/template-tag-spacing + * Prevents implicitly passing the 'children' prop to components. + * @see https://eslint-react.xyz/docs/rules/no-implicit-children */ - '@stylistic/template-tag-spacing'?: Linter.RuleEntry<StylisticTemplateTagSpacing> + '@eslint-react/x-no-implicit-children'?: Linter.RuleEntry<[]> /** - * Require consistent spacing around type annotations - * @see https://eslint.style/rules/type-annotation-spacing + * Prevents implicitly passing the 'key' prop to components. + * @see https://eslint-react.xyz/docs/rules/no-implicit-key */ - '@stylistic/type-annotation-spacing'?: Linter.RuleEntry<StylisticTypeAnnotationSpacing> + '@eslint-react/x-no-implicit-key'?: Linter.RuleEntry<[]> /** - * Enforces consistent spacing inside TypeScript type generics - * @see https://eslint.style/rules/type-generic-spacing + * Prevents implicitly passing the 'ref' prop to components. + * @see https://eslint-react.xyz/docs/rules/no-implicit-ref */ - '@stylistic/type-generic-spacing'?: Linter.RuleEntry<[]> + '@eslint-react/x-no-implicit-ref'?: Linter.RuleEntry<[]> /** - * Expect space before the type declaration in the named tuple - * @see https://eslint.style/rules/type-named-tuple-spacing + * Prevents problematic leaked values from being rendered. + * @see https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering */ - '@stylistic/type-named-tuple-spacing'?: Linter.RuleEntry<[]> + '@eslint-react/x-no-leaked-conditional-rendering'?: Linter.RuleEntry<[]> /** - * Require parentheses around immediate `function` invocations - * @see https://eslint.style/rules/wrap-iife + * 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 */ - '@stylistic/wrap-iife'?: Linter.RuleEntry<StylisticWrapIife> + '@eslint-react/x-no-missing-component-display-name'?: Linter.RuleEntry<[]> /** - * Require parenthesis around regex literals - * @see https://eslint.style/rules/wrap-regex + * 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 */ - '@stylistic/wrap-regex'?: Linter.RuleEntry<[]> + '@eslint-react/x-no-missing-context-display-name'?: Linter.RuleEntry<[]> /** - * Require or disallow spacing around the `*` in `yield*` expressions - * @see https://eslint.style/rules/yield-star-spacing + * Disallows missing 'key' on items in list rendering. + * @see https://eslint-react.xyz/docs/rules/no-missing-key */ - '@stylistic/yield-star-spacing'?: Linter.RuleEntry<StylisticYieldStarSpacing> + '@eslint-react/x-no-missing-key'?: Linter.RuleEntry<[]> /** - * Require that function overload signatures be consecutive - * @see https://typescript-eslint.io/rules/adjacent-overload-signatures + * Prevents incorrect usage of 'captureOwnerStack'. + * @see https://eslint-react.xyz/docs/rules/no-misused-capture-owner-stack */ - '@typescript-eslint/adjacent-overload-signatures'?: Linter.RuleEntry<[]> + '@eslint-react/x-no-misused-capture-owner-stack'?: Linter.RuleEntry<[]> /** - * Require consistently using either `T[]` or `Array<T>` for arrays - * @see https://typescript-eslint.io/rules/array-type + * Disallows nesting component definitions inside other components. + * @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions */ - '@typescript-eslint/array-type'?: Linter.RuleEntry<TypescriptEslintArrayType> + '@eslint-react/x-no-nested-component-definitions'?: Linter.RuleEntry<[]> /** - * Disallow awaiting a value that is not a Thenable - * @see https://typescript-eslint.io/rules/await-thenable + * Disallows nesting lazy component declarations inside other components or hooks. + * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations */ - '@typescript-eslint/await-thenable'?: Linter.RuleEntry<[]> + '@eslint-react/x-no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]> /** - * Disallow `@ts-<directive>` comments or require descriptions after directives - * @see https://typescript-eslint.io/rules/ban-ts-comment + * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'. + * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update */ - '@typescript-eslint/ban-ts-comment'?: Linter.RuleEntry<TypescriptEslintBanTsComment> + '@eslint-react/x-no-redundant-should-component-update'?: Linter.RuleEntry<[]> /** - * Disallow `// tslint:<rule-flag>` comments - * @see https://typescript-eslint.io/rules/ban-tslint-comment + * 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 */ - '@typescript-eslint/ban-tslint-comment'?: Linter.RuleEntry<[]> + '@eslint-react/x-no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]> /** - * Enforce that literals on classes are exposed in a consistent style - * @see https://typescript-eslint.io/rules/class-literal-property-style + * 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 */ - '@typescript-eslint/class-literal-property-style'?: Linter.RuleEntry<TypescriptEslintClassLiteralPropertyStyle> + '@eslint-react/x-no-set-state-in-component-did-update'?: Linter.RuleEntry<[]> /** - * Enforce that class methods utilize `this` - * @see https://typescript-eslint.io/rules/class-methods-use-this + * 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 */ - '@typescript-eslint/class-methods-use-this'?: Linter.RuleEntry<TypescriptEslintClassMethodsUseThis> + '@eslint-react/x-no-set-state-in-component-will-update'?: Linter.RuleEntry<[]> /** - * Enforce specifying generic type arguments on type annotation or constructor name of a constructor call - * @see https://typescript-eslint.io/rules/consistent-generic-constructors + * Disallows unnecessary usage of 'useCallback'. + * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback */ - '@typescript-eslint/consistent-generic-constructors'?: Linter.RuleEntry<TypescriptEslintConsistentGenericConstructors> + '@eslint-react/x-no-unnecessary-use-callback'?: Linter.RuleEntry<[]> /** - * Require or disallow the `Record` type - * @see https://typescript-eslint.io/rules/consistent-indexed-object-style + * Disallows unnecessary usage of 'useMemo'. + * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo */ - '@typescript-eslint/consistent-indexed-object-style'?: Linter.RuleEntry<TypescriptEslintConsistentIndexedObjectStyle> + '@eslint-react/x-no-unnecessary-use-memo'?: Linter.RuleEntry<[]> /** - * Require `return` statements to either always or never specify values - * @see https://typescript-eslint.io/rules/consistent-return + * 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 */ - '@typescript-eslint/consistent-return'?: Linter.RuleEntry<TypescriptEslintConsistentReturn> + '@eslint-react/x-no-unnecessary-use-prefix'?: Linter.RuleEntry<[]> /** - * Enforce consistent usage of type assertions - * @see https://typescript-eslint.io/rules/consistent-type-assertions + * Warns about the use of 'UNSAFE_componentWillMount' in class components. + * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount */ - '@typescript-eslint/consistent-type-assertions'?: Linter.RuleEntry<TypescriptEslintConsistentTypeAssertions> + '@eslint-react/x-no-unsafe-component-will-mount'?: Linter.RuleEntry<[]> /** - * Enforce type definitions to consistently use either `interface` or `type` - * @see https://typescript-eslint.io/rules/consistent-type-definitions + * Warns about the use of 'UNSAFE_componentWillReceiveProps' in class components. + * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props */ - '@typescript-eslint/consistent-type-definitions'?: Linter.RuleEntry<TypescriptEslintConsistentTypeDefinitions> + '@eslint-react/x-no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]> /** - * Enforce consistent usage of type exports - * @see https://typescript-eslint.io/rules/consistent-type-exports + * Warns about the use of 'UNSAFE_componentWillUpdate' in class components. + * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update */ - '@typescript-eslint/consistent-type-exports'?: Linter.RuleEntry<TypescriptEslintConsistentTypeExports> + '@eslint-react/x-no-unsafe-component-will-update'?: Linter.RuleEntry<[]> /** - * Enforce consistent usage of type imports - * @see https://typescript-eslint.io/rules/consistent-type-imports + * 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 */ - '@typescript-eslint/consistent-type-imports'?: Linter.RuleEntry<TypescriptEslintConsistentTypeImports> + '@eslint-react/x-no-unstable-context-value'?: Linter.RuleEntry<[]> /** - * Enforce default parameters to be last - * @see https://typescript-eslint.io/rules/default-param-last + * Prevents using referential-type values as default props in object destructuring. + * @see https://eslint-react.xyz/docs/rules/no-unstable-default-props */ - '@typescript-eslint/default-param-last'?: Linter.RuleEntry<[]> + '@eslint-react/x-no-unstable-default-props'?: Linter.RuleEntry<EslintReactXNoUnstableDefaultProps> /** - * Enforce dot notation whenever possible - * @see https://typescript-eslint.io/rules/dot-notation + * Warns about unused class component methods and properties. + * @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members */ - '@typescript-eslint/dot-notation'?: Linter.RuleEntry<TypescriptEslintDotNotation> + '@eslint-react/x-no-unused-class-component-members'?: Linter.RuleEntry<[]> /** - * Require explicit return types on functions and class methods - * @see https://typescript-eslint.io/rules/explicit-function-return-type + * Warns about component props that are defined but never used. + * @see https://eslint-react.xyz/docs/rules/no-unused-props */ - '@typescript-eslint/explicit-function-return-type'?: Linter.RuleEntry<TypescriptEslintExplicitFunctionReturnType> + '@eslint-react/x-no-unused-props'?: Linter.RuleEntry<[]> /** - * Require explicit accessibility modifiers on class properties and methods - * @see https://typescript-eslint.io/rules/explicit-member-accessibility + * Warns about unused class component state. + * @see https://eslint-react.xyz/docs/rules/no-unused-state */ - '@typescript-eslint/explicit-member-accessibility'?: Linter.RuleEntry<TypescriptEslintExplicitMemberAccessibility> + '@eslint-react/x-no-unused-state'?: Linter.RuleEntry<[]> /** - * Require explicit return and argument types on exported functions' and classes' public class methods - * @see https://typescript-eslint.io/rules/explicit-module-boundary-types + * Replaces usage of 'useContext' with 'use'. + * @see https://eslint-react.xyz/docs/rules/no-use-context */ - '@typescript-eslint/explicit-module-boundary-types'?: Linter.RuleEntry<TypescriptEslintExplicitModuleBoundaryTypes> + '@eslint-react/x-no-use-context'?: Linter.RuleEntry<[]> /** - * Require or disallow initialization in variable declarations - * @see https://typescript-eslint.io/rules/init-declarations + * Enforces destructuring assignment for component props and context. + * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment */ - '@typescript-eslint/init-declarations'?: Linter.RuleEntry<TypescriptEslintInitDeclarations> + '@eslint-react/x-prefer-destructuring-assignment'?: Linter.RuleEntry<[]> /** - * Enforce a maximum number of parameters in function definitions - * @see https://typescript-eslint.io/rules/max-params + * Enforces importing React via a namespace import. + * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import */ - '@typescript-eslint/max-params'?: Linter.RuleEntry<TypescriptEslintMaxParams> + '@eslint-react/x-prefer-namespace-import'?: Linter.RuleEntry<[]> /** - * Require a consistent member declaration order - * @see https://typescript-eslint.io/rules/member-ordering + * Validates that components and hooks are pure by checking that they do not call known-impure functions during render. + * @see https://eslint-react.xyz/docs/rules/purity */ - '@typescript-eslint/member-ordering'?: Linter.RuleEntry<TypescriptEslintMemberOrdering> + '@eslint-react/x-purity'?: Linter.RuleEntry<[]> /** - * Enforce using a particular method signature syntax - * @see https://typescript-eslint.io/rules/method-signature-style + * Validates correct usage of refs by checking that 'ref.current' is not read or written during render. + * @see https://eslint-react.xyz/docs/rules/refs */ - '@typescript-eslint/method-signature-style'?: Linter.RuleEntry<TypescriptEslintMethodSignatureStyle> + '@eslint-react/x-refs'?: Linter.RuleEntry<[]> /** - * Enforce naming conventions for everything across a codebase - * @see https://typescript-eslint.io/rules/naming-convention + * Enforces the Rules of Hooks. + * @see https://react.dev/reference/rules/rules-of-hooks */ - '@typescript-eslint/naming-convention'?: Linter.RuleEntry<TypescriptEslintNamingConvention> + '@eslint-react/x-rules-of-hooks'?: Linter.RuleEntry<EslintReactXRulesOfHooks> /** - * Disallow generic `Array` constructors - * @see https://typescript-eslint.io/rules/no-array-constructor + * Validates against setting state synchronously in an effect, which can lead to re-renders that degrade performance. + * @see https://eslint-react.xyz/docs/rules/set-state-in-effect */ - '@typescript-eslint/no-array-constructor'?: Linter.RuleEntry<[]> + '@eslint-react/x-set-state-in-effect'?: Linter.RuleEntry<[]> /** - * Disallow using the `delete` operator on array values - * @see https://typescript-eslint.io/rules/no-array-delete + * Validates against unconditionally setting state during render, which can trigger additional renders and potential infinite render loops. + * @see https://eslint-react.xyz/docs/rules/set-state-in-render */ - '@typescript-eslint/no-array-delete'?: Linter.RuleEntry<[]> + '@eslint-react/x-set-state-in-render'?: Linter.RuleEntry<[]> /** - * Require `.toString()` and `.toLocaleString()` to only be called on objects which provide useful information when stringified - * @see https://typescript-eslint.io/rules/no-base-to-string + * Validates against syntax that React Compiler does not support. + * @see https://eslint-react.xyz/docs/rules/unsupported-syntax */ - '@typescript-eslint/no-base-to-string'?: Linter.RuleEntry<TypescriptEslintNoBaseToString> + '@eslint-react/x-unsupported-syntax'?: Linter.RuleEntry<[]> /** - * Disallow non-null assertion in locations that may be confusing - * @see https://typescript-eslint.io/rules/no-confusing-non-null-assertion + * Validates that 'useMemo' is called with a callback that returns a value. + * @see https://eslint-react.xyz/docs/rules/use-memo */ - '@typescript-eslint/no-confusing-non-null-assertion'?: Linter.RuleEntry<[]> + '@eslint-react/x-use-memo'?: Linter.RuleEntry<[]> /** - * Require expressions of type void to appear in statement position - * @see https://typescript-eslint.io/rules/no-confusing-void-expression + * Enforces correct usage of 'useState', including destructuring, symmetric naming of the value and setter, and wrapping expensive initializers in a lazy initializer function. + * @see https://eslint-react.xyz/docs/rules/use-state */ - '@typescript-eslint/no-confusing-void-expression'?: Linter.RuleEntry<TypescriptEslintNoConfusingVoidExpression> + '@eslint-react/x-use-state'?: Linter.RuleEntry<EslintReactXUseState> /** - * Disallow using code marked as `@deprecated` - * @see https://typescript-eslint.io/rules/no-deprecated + * Enforce font-display behavior with Google Fonts. + * @see https://nextjs.org/docs/messages/google-font-display */ - '@typescript-eslint/no-deprecated'?: Linter.RuleEntry<TypescriptEslintNoDeprecated> + '@next/next/google-font-display'?: Linter.RuleEntry<[]> /** - * Disallow duplicate class members - * @see https://typescript-eslint.io/rules/no-dupe-class-members + * Ensure `preconnect` is used with Google Fonts. + * @see https://nextjs.org/docs/messages/google-font-preconnect */ - '@typescript-eslint/no-dupe-class-members'?: Linter.RuleEntry<[]> + '@next/next/google-font-preconnect'?: Linter.RuleEntry<[]> /** - * Disallow duplicate enum member values - * @see https://typescript-eslint.io/rules/no-duplicate-enum-values + * Enforce `id` attribute on `next/script` components with inline content. + * @see https://nextjs.org/docs/messages/inline-script-id */ - '@typescript-eslint/no-duplicate-enum-values'?: Linter.RuleEntry<[]> + '@next/next/inline-script-id'?: Linter.RuleEntry<[]> /** - * Disallow duplicate constituents of union or intersection types - * @see https://typescript-eslint.io/rules/no-duplicate-type-constituents + * Prefer `@next/third-parties/google` when using the inline script for Google Analytics and Tag Manager. + * @see https://nextjs.org/docs/messages/next-script-for-ga */ - '@typescript-eslint/no-duplicate-type-constituents'?: Linter.RuleEntry<TypescriptEslintNoDuplicateTypeConstituents> + '@next/next/next-script-for-ga'?: Linter.RuleEntry<[]> /** - * Disallow using the `delete` operator on computed key expressions - * @see https://typescript-eslint.io/rules/no-dynamic-delete + * Prevent assignment to the `module` variable. + * @see https://nextjs.org/docs/messages/no-assign-module-variable */ - '@typescript-eslint/no-dynamic-delete'?: Linter.RuleEntry<[]> + '@next/next/no-assign-module-variable'?: Linter.RuleEntry<[]> /** - * Disallow empty functions - * @see https://typescript-eslint.io/rules/no-empty-function + * Prevent Client Components from being async functions. + * @see https://nextjs.org/docs/messages/no-async-client-component */ - '@typescript-eslint/no-empty-function'?: Linter.RuleEntry<TypescriptEslintNoEmptyFunction> + '@next/next/no-async-client-component'?: Linter.RuleEntry<[]> /** - * Disallow the declaration of empty interfaces - * @see https://typescript-eslint.io/rules/no-empty-interface - * @deprecated + * Prevent usage of `next/script`'s `beforeInteractive` strategy outside of `pages/_document.js`. + * @see https://nextjs.org/docs/messages/no-before-interactive-script-outside-document */ - '@typescript-eslint/no-empty-interface'?: Linter.RuleEntry<TypescriptEslintNoEmptyInterface> + '@next/next/no-before-interactive-script-outside-document'?: Linter.RuleEntry<[]> /** - * Disallow accidentally using the "empty object" type - * @see https://typescript-eslint.io/rules/no-empty-object-type + * Prevent manual stylesheet tags. + * @see https://nextjs.org/docs/messages/no-css-tags */ - '@typescript-eslint/no-empty-object-type'?: Linter.RuleEntry<TypescriptEslintNoEmptyObjectType> + '@next/next/no-css-tags'?: Linter.RuleEntry<[]> /** - * Disallow the `any` type - * @see https://typescript-eslint.io/rules/no-explicit-any + * Prevent importing `next/document` outside of `pages/_document.js`. + * @see https://nextjs.org/docs/messages/no-document-import-in-page */ - '@typescript-eslint/no-explicit-any'?: Linter.RuleEntry<TypescriptEslintNoExplicitAny> + '@next/next/no-document-import-in-page'?: Linter.RuleEntry<[]> /** - * Disallow extra non-null assertions - * @see https://typescript-eslint.io/rules/no-extra-non-null-assertion + * Prevent duplicate usage of `<Head>` in `pages/_document.js`. + * @see https://nextjs.org/docs/messages/no-duplicate-head */ - '@typescript-eslint/no-extra-non-null-assertion'?: Linter.RuleEntry<[]> + '@next/next/no-duplicate-head'?: Linter.RuleEntry<[]> /** - * Disallow classes used as namespaces - * @see https://typescript-eslint.io/rules/no-extraneous-class + * Prevent usage of `<head>` element. + * @see https://nextjs.org/docs/messages/no-head-element */ - '@typescript-eslint/no-extraneous-class'?: Linter.RuleEntry<TypescriptEslintNoExtraneousClass> + '@next/next/no-head-element'?: Linter.RuleEntry<[]> /** - * Require Promise-like statements to be handled appropriately - * @see https://typescript-eslint.io/rules/no-floating-promises + * Prevent usage of `next/head` in `pages/_document.js`. + * @see https://nextjs.org/docs/messages/no-head-import-in-document */ - '@typescript-eslint/no-floating-promises'?: Linter.RuleEntry<TypescriptEslintNoFloatingPromises> + '@next/next/no-head-import-in-document'?: Linter.RuleEntry<[]> /** - * Disallow iterating over an array with a for-in loop - * @see https://typescript-eslint.io/rules/no-for-in-array + * Prevent usage of `<a>` elements to navigate to internal Next.js pages. + * @see https://nextjs.org/docs/messages/no-html-link-for-pages */ - '@typescript-eslint/no-for-in-array'?: Linter.RuleEntry<[]> + '@next/next/no-html-link-for-pages'?: Linter.RuleEntry<NextNextNoHtmlLinkForPages> /** - * Disallow the use of `eval()`-like functions - * @see https://typescript-eslint.io/rules/no-implied-eval + * Prevent usage of `<img>` element due to slower LCP and higher bandwidth. + * @see https://nextjs.org/docs/messages/no-img-element */ - '@typescript-eslint/no-implied-eval'?: Linter.RuleEntry<[]> + '@next/next/no-img-element'?: Linter.RuleEntry<[]> /** - * Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers - * @see https://typescript-eslint.io/rules/no-import-type-side-effects + * Prevent page-only custom fonts. + * @see https://nextjs.org/docs/messages/no-page-custom-font */ - '@typescript-eslint/no-import-type-side-effects'?: Linter.RuleEntry<[]> + '@next/next/no-page-custom-font'?: Linter.RuleEntry<[]> /** - * Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean - * @see https://typescript-eslint.io/rules/no-inferrable-types + * Prevent usage of `next/script` in `next/head` component. + * @see https://nextjs.org/docs/messages/no-script-component-in-head */ - '@typescript-eslint/no-inferrable-types'?: Linter.RuleEntry<TypescriptEslintNoInferrableTypes> + '@next/next/no-script-component-in-head'?: Linter.RuleEntry<[]> /** - * Disallow `this` keywords outside of classes or class-like objects - * @see https://typescript-eslint.io/rules/no-invalid-this + * Prevent usage of `styled-jsx` in `pages/_document.js`. + * @see https://nextjs.org/docs/messages/no-styled-jsx-in-document */ - '@typescript-eslint/no-invalid-this'?: Linter.RuleEntry<TypescriptEslintNoInvalidThis> + '@next/next/no-styled-jsx-in-document'?: Linter.RuleEntry<[]> /** - * Disallow `void` type outside of generic or return types - * @see https://typescript-eslint.io/rules/no-invalid-void-type + * Prevent synchronous scripts. + * @see https://nextjs.org/docs/messages/no-sync-scripts */ - '@typescript-eslint/no-invalid-void-type'?: Linter.RuleEntry<TypescriptEslintNoInvalidVoidType> + '@next/next/no-sync-scripts'?: Linter.RuleEntry<[]> /** - * Disallow function declarations that contain unsafe references inside loop statements - * @see https://typescript-eslint.io/rules/no-loop-func + * Prevent usage of `<title>` with `Head` component from `next/document`. + * @see https://nextjs.org/docs/messages/no-title-in-document-head */ - '@typescript-eslint/no-loop-func'?: Linter.RuleEntry<[]> + '@next/next/no-title-in-document-head'?: Linter.RuleEntry<[]> /** - * Disallow literal numbers that lose precision - * @see https://typescript-eslint.io/rules/no-loss-of-precision - * @deprecated + * Prevent common typos in Next.js data fetching functions. */ - '@typescript-eslint/no-loss-of-precision'?: Linter.RuleEntry<[]> + '@next/next/no-typos'?: Linter.RuleEntry<[]> /** - * Disallow magic numbers - * @see https://typescript-eslint.io/rules/no-magic-numbers + * Prevent duplicate polyfills from Polyfill.io. + * @see https://nextjs.org/docs/messages/no-unwanted-polyfillio */ - '@typescript-eslint/no-magic-numbers'?: Linter.RuleEntry<TypescriptEslintNoMagicNumbers> + '@next/next/no-unwanted-polyfillio'?: Linter.RuleEntry<[]> /** - * Disallow the `void` operator except when used to discard a value - * @see https://typescript-eslint.io/rules/no-meaningless-void-operator + * Enforce linebreaks after opening and before closing array brackets + * @see https://eslint.style/rules/array-bracket-newline */ - '@typescript-eslint/no-meaningless-void-operator'?: Linter.RuleEntry<TypescriptEslintNoMeaninglessVoidOperator> + '@stylistic/array-bracket-newline'?: Linter.RuleEntry<StylisticArrayBracketNewline> /** - * Enforce valid definition of `new` and `constructor` - * @see https://typescript-eslint.io/rules/no-misused-new + * Enforce consistent spacing inside array brackets + * @see https://eslint.style/rules/array-bracket-spacing */ - '@typescript-eslint/no-misused-new'?: Linter.RuleEntry<[]> + '@stylistic/array-bracket-spacing'?: Linter.RuleEntry<StylisticArrayBracketSpacing> /** - * Disallow Promises in places not designed to handle them - * @see https://typescript-eslint.io/rules/no-misused-promises + * Enforce line breaks after each array element + * @see https://eslint.style/rules/array-element-newline */ - '@typescript-eslint/no-misused-promises'?: Linter.RuleEntry<TypescriptEslintNoMisusedPromises> + '@stylistic/array-element-newline'?: Linter.RuleEntry<StylisticArrayElementNewline> /** - * Disallow using the spread operator when it might cause unexpected behavior - * @see https://typescript-eslint.io/rules/no-misused-spread + * Require parentheses around arrow function arguments + * @see https://eslint.style/rules/arrow-parens */ - '@typescript-eslint/no-misused-spread'?: Linter.RuleEntry<TypescriptEslintNoMisusedSpread> + '@stylistic/arrow-parens'?: Linter.RuleEntry<StylisticArrowParens> /** - * Disallow enums from having both number and string members - * @see https://typescript-eslint.io/rules/no-mixed-enums + * Enforce consistent spacing before and after the arrow in arrow functions + * @see https://eslint.style/rules/arrow-spacing */ - '@typescript-eslint/no-mixed-enums'?: Linter.RuleEntry<[]> + '@stylistic/arrow-spacing'?: Linter.RuleEntry<StylisticArrowSpacing> /** - * Disallow TypeScript namespaces - * @see https://typescript-eslint.io/rules/no-namespace + * Disallow or enforce spaces inside of blocks after opening block and before closing block + * @see https://eslint.style/rules/block-spacing */ - '@typescript-eslint/no-namespace'?: Linter.RuleEntry<TypescriptEslintNoNamespace> + '@stylistic/block-spacing'?: Linter.RuleEntry<StylisticBlockSpacing> /** - * Disallow non-null assertions in the left operand of a nullish coalescing operator - * @see https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing + * Enforce consistent brace style for blocks + * @see https://eslint.style/rules/brace-style */ - '@typescript-eslint/no-non-null-asserted-nullish-coalescing'?: Linter.RuleEntry<[]> + '@stylistic/brace-style'?: Linter.RuleEntry<StylisticBraceStyle> /** - * Disallow non-null assertions after an optional chain expression - * @see https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain + * Require or disallow trailing commas + * @see https://eslint.style/rules/comma-dangle */ - '@typescript-eslint/no-non-null-asserted-optional-chain'?: Linter.RuleEntry<[]> + '@stylistic/comma-dangle'?: Linter.RuleEntry<StylisticCommaDangle> /** - * Disallow non-null assertions using the `!` postfix operator - * @see https://typescript-eslint.io/rules/no-non-null-assertion + * Enforce consistent spacing before and after commas + * @see https://eslint.style/rules/comma-spacing */ - '@typescript-eslint/no-non-null-assertion'?: Linter.RuleEntry<[]> + '@stylistic/comma-spacing'?: Linter.RuleEntry<StylisticCommaSpacing> /** - * Disallow variable redeclaration - * @see https://typescript-eslint.io/rules/no-redeclare + * Enforce consistent comma style + * @see https://eslint.style/rules/comma-style */ - '@typescript-eslint/no-redeclare'?: Linter.RuleEntry<TypescriptEslintNoRedeclare> + '@stylistic/comma-style'?: Linter.RuleEntry<StylisticCommaStyle> /** - * Disallow members of unions and intersections that do nothing or override type information - * @see https://typescript-eslint.io/rules/no-redundant-type-constituents + * Enforce consistent spacing inside computed property brackets + * @see https://eslint.style/rules/computed-property-spacing */ - '@typescript-eslint/no-redundant-type-constituents'?: Linter.RuleEntry<[]> + '@stylistic/computed-property-spacing'?: Linter.RuleEntry<StylisticComputedPropertySpacing> /** - * Disallow invocation of `require()` - * @see https://typescript-eslint.io/rules/no-require-imports + * Enforce consistent line breaks after opening and before closing braces + * @see https://eslint.style/rules/curly-newline */ - '@typescript-eslint/no-require-imports'?: Linter.RuleEntry<TypescriptEslintNoRequireImports> + '@stylistic/curly-newline'?: Linter.RuleEntry<StylisticCurlyNewline> /** - * Disallow specified modules when loaded by `import` - * @see https://typescript-eslint.io/rules/no-restricted-imports + * Enforce consistent newlines before and after dots + * @see https://eslint.style/rules/dot-location */ - '@typescript-eslint/no-restricted-imports'?: Linter.RuleEntry<TypescriptEslintNoRestrictedImports> + '@stylistic/dot-location'?: Linter.RuleEntry<StylisticDotLocation> /** - * Disallow certain types - * @see https://typescript-eslint.io/rules/no-restricted-types + * Require or disallow newline at the end of files + * @see https://eslint.style/rules/eol-last */ - '@typescript-eslint/no-restricted-types'?: Linter.RuleEntry<TypescriptEslintNoRestrictedTypes> + '@stylistic/eol-last'?: Linter.RuleEntry<StylisticEolLast> /** - * Disallow variable declarations from shadowing variables declared in the outer scope - * @see https://typescript-eslint.io/rules/no-shadow + * Enforce consistent line break styles for JSX props + * @see https://eslint.style/rules/jsx-props-style */ - '@typescript-eslint/no-shadow'?: Linter.RuleEntry<TypescriptEslintNoShadow> + '@stylistic/exp-jsx-props-style'?: Linter.RuleEntry<StylisticExpJsxPropsStyle> /** - * Disallow aliasing `this` - * @see https://typescript-eslint.io/rules/no-this-alias + * Enforce consistent spacing and line break styles inside brackets. + * @see https://eslint.style/rules/list-style */ - '@typescript-eslint/no-this-alias'?: Linter.RuleEntry<TypescriptEslintNoThisAlias> + '@stylistic/exp-list-style'?: Linter.RuleEntry<StylisticExpListStyle> /** - * Disallow type aliases - * @see https://typescript-eslint.io/rules/no-type-alias - * @deprecated + * Enforce line breaks between arguments of a function call + * @see https://eslint.style/rules/function-call-argument-newline */ - '@typescript-eslint/no-type-alias'?: Linter.RuleEntry<TypescriptEslintNoTypeAlias> + '@stylistic/function-call-argument-newline'?: Linter.RuleEntry<StylisticFunctionCallArgumentNewline> /** - * Disallow unnecessary equality comparisons against boolean literals - * @see https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare + * Require or disallow spacing between function identifiers and their invocations + * @see https://eslint.style/rules/function-call-spacing */ - '@typescript-eslint/no-unnecessary-boolean-literal-compare'?: Linter.RuleEntry<TypescriptEslintNoUnnecessaryBooleanLiteralCompare> + '@stylistic/function-call-spacing'?: Linter.RuleEntry<StylisticFunctionCallSpacing> /** - * Disallow conditionals where the type is always truthy or always falsy - * @see https://typescript-eslint.io/rules/no-unnecessary-condition + * Enforce consistent line breaks inside function parentheses + * @see https://eslint.style/rules/function-paren-newline */ - '@typescript-eslint/no-unnecessary-condition'?: Linter.RuleEntry<TypescriptEslintNoUnnecessaryCondition> + '@stylistic/function-paren-newline'?: Linter.RuleEntry<StylisticFunctionParenNewline> /** - * Disallow unnecessary assignment of constructor property parameter - * @see https://typescript-eslint.io/rules/no-unnecessary-parameter-property-assignment + * Enforce consistent spacing around `*` operators in generator functions + * @see https://eslint.style/rules/generator-star-spacing */ - '@typescript-eslint/no-unnecessary-parameter-property-assignment'?: Linter.RuleEntry<[]> + '@stylistic/generator-star-spacing'?: Linter.RuleEntry<StylisticGeneratorStarSpacing> /** - * Disallow unnecessary namespace qualifiers - * @see https://typescript-eslint.io/rules/no-unnecessary-qualifier + * Enforce the location of arrow function bodies + * @see https://eslint.style/rules/implicit-arrow-linebreak */ - '@typescript-eslint/no-unnecessary-qualifier'?: Linter.RuleEntry<[]> + '@stylistic/implicit-arrow-linebreak'?: Linter.RuleEntry<StylisticImplicitArrowLinebreak> /** - * Disallow unnecessary template expressions - * @see https://typescript-eslint.io/rules/no-unnecessary-template-expression + * Enforce consistent indentation + * @see https://eslint.style/rules/indent */ - '@typescript-eslint/no-unnecessary-template-expression'?: Linter.RuleEntry<[]> + '@stylistic/indent'?: Linter.RuleEntry<StylisticIndent> /** - * Disallow type arguments that are equal to the default - * @see https://typescript-eslint.io/rules/no-unnecessary-type-arguments + * Indentation for binary operators + * @see https://eslint.style/rules/indent-binary-ops */ - '@typescript-eslint/no-unnecessary-type-arguments'?: Linter.RuleEntry<[]> + '@stylistic/indent-binary-ops'?: Linter.RuleEntry<StylisticIndentBinaryOps> /** - * Disallow type assertions that do not change the type of an expression - * @see https://typescript-eslint.io/rules/no-unnecessary-type-assertion + * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions + * @see https://eslint.style/rules/jsx-child-element-spacing */ - '@typescript-eslint/no-unnecessary-type-assertion'?: Linter.RuleEntry<TypescriptEslintNoUnnecessaryTypeAssertion> + '@stylistic/jsx-child-element-spacing'?: Linter.RuleEntry<[]> /** - * Disallow unnecessary constraints on generic types - * @see https://typescript-eslint.io/rules/no-unnecessary-type-constraint + * Enforce closing bracket location in JSX + * @see https://eslint.style/rules/jsx-closing-bracket-location */ - '@typescript-eslint/no-unnecessary-type-constraint'?: Linter.RuleEntry<[]> + '@stylistic/jsx-closing-bracket-location'?: Linter.RuleEntry<StylisticJsxClosingBracketLocation> /** - * Disallow conversion idioms when they do not change the type or value of the expression - * @see https://typescript-eslint.io/rules/no-unnecessary-type-conversion + * Enforce closing tag location for multiline JSX + * @see https://eslint.style/rules/jsx-closing-tag-location */ - '@typescript-eslint/no-unnecessary-type-conversion'?: Linter.RuleEntry<[]> + '@stylistic/jsx-closing-tag-location'?: Linter.RuleEntry<StylisticJsxClosingTagLocation> /** - * Disallow type parameters that aren't used multiple times - * @see https://typescript-eslint.io/rules/no-unnecessary-type-parameters + * Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes + * @see https://eslint.style/rules/jsx-curly-brace-presence */ - '@typescript-eslint/no-unnecessary-type-parameters'?: Linter.RuleEntry<[]> + '@stylistic/jsx-curly-brace-presence'?: Linter.RuleEntry<StylisticJsxCurlyBracePresence> /** - * Disallow calling a function with a value with type `any` - * @see https://typescript-eslint.io/rules/no-unsafe-argument + * Enforce consistent linebreaks in curly braces in JSX attributes and expressions + * @see https://eslint.style/rules/jsx-curly-newline */ - '@typescript-eslint/no-unsafe-argument'?: Linter.RuleEntry<[]> + '@stylistic/jsx-curly-newline'?: Linter.RuleEntry<StylisticJsxCurlyNewline> /** - * Disallow assigning a value with type `any` to variables and properties - * @see https://typescript-eslint.io/rules/no-unsafe-assignment + * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions + * @see https://eslint.style/rules/jsx-curly-spacing */ - '@typescript-eslint/no-unsafe-assignment'?: Linter.RuleEntry<[]> + '@stylistic/jsx-curly-spacing'?: Linter.RuleEntry<StylisticJsxCurlySpacing> /** - * Disallow calling a value with type `any` - * @see https://typescript-eslint.io/rules/no-unsafe-call + * Enforce or disallow spaces around equal signs in JSX attributes + * @see https://eslint.style/rules/jsx-equals-spacing */ - '@typescript-eslint/no-unsafe-call'?: Linter.RuleEntry<[]> + '@stylistic/jsx-equals-spacing'?: Linter.RuleEntry<StylisticJsxEqualsSpacing> /** - * Disallow unsafe declaration merging - * @see https://typescript-eslint.io/rules/no-unsafe-declaration-merging + * Enforce proper position of the first property in JSX + * @see https://eslint.style/rules/jsx-first-prop-new-line */ - '@typescript-eslint/no-unsafe-declaration-merging'?: Linter.RuleEntry<[]> + '@stylistic/jsx-first-prop-new-line'?: Linter.RuleEntry<StylisticJsxFirstPropNewLine> /** - * Disallow comparing an enum value with a non-enum value - * @see https://typescript-eslint.io/rules/no-unsafe-enum-comparison + * Enforce line breaks before and after JSX elements when they are used as arguments to a function. + * @see https://eslint.style/rules/jsx-function-call-newline */ - '@typescript-eslint/no-unsafe-enum-comparison'?: Linter.RuleEntry<[]> + '@stylistic/jsx-function-call-newline'?: Linter.RuleEntry<StylisticJsxFunctionCallNewline> /** - * Disallow using the unsafe built-in Function type - * @see https://typescript-eslint.io/rules/no-unsafe-function-type + * Enforce JSX indentation. Deprecated, use `indent` rule instead. + * @see https://eslint.style/rules/jsx-indent + * @deprecated */ - '@typescript-eslint/no-unsafe-function-type'?: Linter.RuleEntry<[]> + '@stylistic/jsx-indent'?: Linter.RuleEntry<StylisticJsxIndent> /** - * Disallow member access on a value with type `any` - * @see https://typescript-eslint.io/rules/no-unsafe-member-access + * Enforce props indentation in JSX + * @see https://eslint.style/rules/jsx-indent-props */ - '@typescript-eslint/no-unsafe-member-access'?: Linter.RuleEntry<TypescriptEslintNoUnsafeMemberAccess> + '@stylistic/jsx-indent-props'?: Linter.RuleEntry<StylisticJsxIndentProps> /** - * Disallow returning a value with type `any` from a function - * @see https://typescript-eslint.io/rules/no-unsafe-return + * Enforce maximum of props on a single line in JSX + * @see https://eslint.style/rules/jsx-max-props-per-line */ - '@typescript-eslint/no-unsafe-return'?: Linter.RuleEntry<[]> + '@stylistic/jsx-max-props-per-line'?: Linter.RuleEntry<StylisticJsxMaxPropsPerLine> /** - * Disallow type assertions that narrow a type - * @see https://typescript-eslint.io/rules/no-unsafe-type-assertion + * Require or prevent a new line after jsx elements and expressions. + * @see https://eslint.style/rules/jsx-newline */ - '@typescript-eslint/no-unsafe-type-assertion'?: Linter.RuleEntry<[]> + '@stylistic/jsx-newline'?: Linter.RuleEntry<StylisticJsxNewline> /** - * Require unary negation to take a number - * @see https://typescript-eslint.io/rules/no-unsafe-unary-minus + * Require one JSX element per line + * @see https://eslint.style/rules/jsx-one-expression-per-line */ - '@typescript-eslint/no-unsafe-unary-minus'?: Linter.RuleEntry<[]> + '@stylistic/jsx-one-expression-per-line'?: Linter.RuleEntry<StylisticJsxOneExpressionPerLine> /** - * Disallow unused expressions - * @see https://typescript-eslint.io/rules/no-unused-expressions + * Enforce PascalCase for user-defined JSX components + * @see https://eslint.style/rules/jsx-pascal-case */ - '@typescript-eslint/no-unused-expressions'?: Linter.RuleEntry<TypescriptEslintNoUnusedExpressions> + '@stylistic/jsx-pascal-case'?: Linter.RuleEntry<StylisticJsxPascalCase> /** - * Disallow unused private class members - * @see https://typescript-eslint.io/rules/no-unused-private-class-members + * Disallow multiple spaces between inline JSX props. Deprecated, use `no-multi-spaces` rule instead. + * @see https://eslint.style/rules/jsx-props-no-multi-spaces + * @deprecated */ - '@typescript-eslint/no-unused-private-class-members'?: Linter.RuleEntry<[]> + '@stylistic/jsx-props-no-multi-spaces'?: Linter.RuleEntry<[]> /** - * Disallow unused variables - * @see https://typescript-eslint.io/rules/no-unused-vars + * Enforce the consistent use of either double or single quotes in JSX attributes + * @see https://eslint.style/rules/jsx-quotes */ - '@typescript-eslint/no-unused-vars'?: Linter.RuleEntry<TypescriptEslintNoUnusedVars> + '@stylistic/jsx-quotes'?: Linter.RuleEntry<StylisticJsxQuotes> /** - * Disallow the use of variables before they are defined - * @see https://typescript-eslint.io/rules/no-use-before-define + * Disallow extra closing tags for components without children + * @see https://eslint.style/rules/jsx-self-closing-comp */ - '@typescript-eslint/no-use-before-define'?: Linter.RuleEntry<TypescriptEslintNoUseBeforeDefine> + '@stylistic/jsx-self-closing-comp'?: Linter.RuleEntry<StylisticJsxSelfClosingComp> /** - * Disallow unnecessary constructors - * @see https://typescript-eslint.io/rules/no-useless-constructor + * Enforce props alphabetical sorting + * @see https://eslint.style/rules/jsx-sort-props + * @deprecated */ - '@typescript-eslint/no-useless-constructor'?: Linter.RuleEntry<[]> + '@stylistic/jsx-sort-props'?: Linter.RuleEntry<StylisticJsxSortProps> /** - * Disallow default values that will never be used - * @see https://typescript-eslint.io/rules/no-useless-default-assignment + * Enforce whitespace in and around the JSX opening and closing brackets + * @see https://eslint.style/rules/jsx-tag-spacing */ - '@typescript-eslint/no-useless-default-assignment'?: Linter.RuleEntry<TypescriptEslintNoUselessDefaultAssignment> + '@stylistic/jsx-tag-spacing'?: Linter.RuleEntry<StylisticJsxTagSpacing> /** - * Disallow empty exports that don't change anything in a module file - * @see https://typescript-eslint.io/rules/no-useless-empty-export + * Disallow missing parentheses around multiline JSX + * @see https://eslint.style/rules/jsx-wrap-multilines */ - '@typescript-eslint/no-useless-empty-export'?: Linter.RuleEntry<[]> + '@stylistic/jsx-wrap-multilines'?: Linter.RuleEntry<StylisticJsxWrapMultilines> /** - * Disallow `require` statements except in import statements - * @see https://typescript-eslint.io/rules/no-var-requires - * @deprecated + * Enforce consistent spacing between property names and type annotations in types and interfaces + * @see https://eslint.style/rules/key-spacing */ - '@typescript-eslint/no-var-requires'?: Linter.RuleEntry<TypescriptEslintNoVarRequires> + '@stylistic/key-spacing'?: Linter.RuleEntry<StylisticKeySpacing> /** - * Disallow using confusing built-in primitive class wrappers - * @see https://typescript-eslint.io/rules/no-wrapper-object-types + * Enforce consistent spacing before and after keywords + * @see https://eslint.style/rules/keyword-spacing */ - '@typescript-eslint/no-wrapper-object-types'?: Linter.RuleEntry<[]> + '@stylistic/keyword-spacing'?: Linter.RuleEntry<StylisticKeywordSpacing> /** - * Enforce non-null assertions over explicit type assertions - * @see https://typescript-eslint.io/rules/non-nullable-type-assertion-style + * Enforce position of line comments + * @see https://eslint.style/rules/line-comment-position */ - '@typescript-eslint/non-nullable-type-assertion-style'?: Linter.RuleEntry<[]> + '@stylistic/line-comment-position'?: Linter.RuleEntry<StylisticLineCommentPosition> /** - * Disallow throwing non-`Error` values as exceptions - * @see https://typescript-eslint.io/rules/only-throw-error + * Enforce consistent linebreak style + * @see https://eslint.style/rules/linebreak-style */ - '@typescript-eslint/only-throw-error'?: Linter.RuleEntry<TypescriptEslintOnlyThrowError> + '@stylistic/linebreak-style'?: Linter.RuleEntry<StylisticLinebreakStyle> /** - * Require or disallow parameter properties in class constructors - * @see https://typescript-eslint.io/rules/parameter-properties + * Require empty lines around comments + * @see https://eslint.style/rules/lines-around-comment */ - '@typescript-eslint/parameter-properties'?: Linter.RuleEntry<TypescriptEslintParameterProperties> + '@stylistic/lines-around-comment'?: Linter.RuleEntry<StylisticLinesAroundComment> /** - * Enforce the use of `as const` over literal type - * @see https://typescript-eslint.io/rules/prefer-as-const + * Require or disallow an empty line between class members + * @see https://eslint.style/rules/lines-between-class-members */ - '@typescript-eslint/prefer-as-const'?: Linter.RuleEntry<[]> + '@stylistic/lines-between-class-members'?: Linter.RuleEntry<StylisticLinesBetweenClassMembers> /** - * Require destructuring from arrays and/or objects - * @see https://typescript-eslint.io/rules/prefer-destructuring + * Enforce a maximum line length + * @see https://eslint.style/rules/max-len */ - '@typescript-eslint/prefer-destructuring'?: Linter.RuleEntry<TypescriptEslintPreferDestructuring> + '@stylistic/max-len'?: Linter.RuleEntry<StylisticMaxLen> /** - * Require each enum member value to be explicitly initialized - * @see https://typescript-eslint.io/rules/prefer-enum-initializers + * Enforce a maximum number of statements allowed per line + * @see https://eslint.style/rules/max-statements-per-line */ - '@typescript-eslint/prefer-enum-initializers'?: Linter.RuleEntry<[]> + '@stylistic/max-statements-per-line'?: Linter.RuleEntry<StylisticMaxStatementsPerLine> /** - * Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result - * @see https://typescript-eslint.io/rules/prefer-find + * Require a specific member delimiter style for interfaces and type literals + * @see https://eslint.style/rules/member-delimiter-style */ - '@typescript-eslint/prefer-find'?: Linter.RuleEntry<[]> + '@stylistic/member-delimiter-style'?: Linter.RuleEntry<StylisticMemberDelimiterStyle> /** - * Enforce the use of `for-of` loop over the standard `for` loop where possible - * @see https://typescript-eslint.io/rules/prefer-for-of + * Enforce a particular style for multiline comments + * @see https://eslint.style/rules/multiline-comment-style */ - '@typescript-eslint/prefer-for-of'?: Linter.RuleEntry<[]> + '@stylistic/multiline-comment-style'?: Linter.RuleEntry<StylisticMultilineCommentStyle> /** - * Enforce using function types instead of interfaces with call signatures - * @see https://typescript-eslint.io/rules/prefer-function-type + * Enforce newlines between operands of ternary expressions + * @see https://eslint.style/rules/multiline-ternary */ - '@typescript-eslint/prefer-function-type'?: Linter.RuleEntry<[]> + '@stylistic/multiline-ternary'?: Linter.RuleEntry<StylisticMultilineTernary> /** - * Enforce `includes` method over `indexOf` method - * @see https://typescript-eslint.io/rules/prefer-includes + * Enforce or disallow parentheses when invoking a constructor with no arguments + * @see https://eslint.style/rules/new-parens */ - '@typescript-eslint/prefer-includes'?: Linter.RuleEntry<[]> + '@stylistic/new-parens'?: Linter.RuleEntry<StylisticNewParens> /** - * Require all enum members to be literal values - * @see https://typescript-eslint.io/rules/prefer-literal-enum-member + * Require a newline after each call in a method chain + * @see https://eslint.style/rules/newline-per-chained-call */ - '@typescript-eslint/prefer-literal-enum-member'?: Linter.RuleEntry<TypescriptEslintPreferLiteralEnumMember> + '@stylistic/newline-per-chained-call'?: Linter.RuleEntry<StylisticNewlinePerChainedCall> /** - * Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules - * @see https://typescript-eslint.io/rules/prefer-namespace-keyword + * Disallow arrow functions where they could be confused with comparisons + * @see https://eslint.style/rules/no-confusing-arrow */ - '@typescript-eslint/prefer-namespace-keyword'?: Linter.RuleEntry<[]> + '@stylistic/no-confusing-arrow'?: Linter.RuleEntry<StylisticNoConfusingArrow> /** - * Enforce using the nullish coalescing operator instead of logical assignments or chaining - * @see https://typescript-eslint.io/rules/prefer-nullish-coalescing + * Disallow unnecessary parentheses + * @see https://eslint.style/rules/no-extra-parens */ - '@typescript-eslint/prefer-nullish-coalescing'?: Linter.RuleEntry<TypescriptEslintPreferNullishCoalescing> + '@stylistic/no-extra-parens'?: Linter.RuleEntry<StylisticNoExtraParens> /** - * Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects - * @see https://typescript-eslint.io/rules/prefer-optional-chain + * Disallow unnecessary semicolons + * @see https://eslint.style/rules/no-extra-semi */ - '@typescript-eslint/prefer-optional-chain'?: Linter.RuleEntry<TypescriptEslintPreferOptionalChain> + '@stylistic/no-extra-semi'?: Linter.RuleEntry<[]> /** - * Require using Error objects as Promise rejection reasons - * @see https://typescript-eslint.io/rules/prefer-promise-reject-errors + * Disallow leading or trailing decimal points in numeric literals + * @see https://eslint.style/rules/no-floating-decimal */ - '@typescript-eslint/prefer-promise-reject-errors'?: Linter.RuleEntry<TypescriptEslintPreferPromiseRejectErrors> + '@stylistic/no-floating-decimal'?: Linter.RuleEntry<[]> /** - * Require private members to be marked as `readonly` if they're never modified outside of the constructor - * @see https://typescript-eslint.io/rules/prefer-readonly + * Disallow mixed binary operators + * @see https://eslint.style/rules/no-mixed-operators */ - '@typescript-eslint/prefer-readonly'?: Linter.RuleEntry<TypescriptEslintPreferReadonly> + '@stylistic/no-mixed-operators'?: Linter.RuleEntry<StylisticNoMixedOperators> /** - * Require function parameters to be typed as `readonly` to prevent accidental mutation of inputs - * @see https://typescript-eslint.io/rules/prefer-readonly-parameter-types + * Disallow mixed spaces and tabs for indentation + * @see https://eslint.style/rules/no-mixed-spaces-and-tabs */ - '@typescript-eslint/prefer-readonly-parameter-types'?: Linter.RuleEntry<TypescriptEslintPreferReadonlyParameterTypes> + '@stylistic/no-mixed-spaces-and-tabs'?: Linter.RuleEntry<StylisticNoMixedSpacesAndTabs> /** - * Enforce using type parameter when calling `Array#reduce` instead of using a type assertion - * @see https://typescript-eslint.io/rules/prefer-reduce-type-parameter + * Disallow multiple spaces + * @see https://eslint.style/rules/no-multi-spaces */ - '@typescript-eslint/prefer-reduce-type-parameter'?: Linter.RuleEntry<[]> + '@stylistic/no-multi-spaces'?: Linter.RuleEntry<StylisticNoMultiSpaces> /** - * Enforce `RegExp#exec` over `String#match` if no global flag is provided - * @see https://typescript-eslint.io/rules/prefer-regexp-exec + * Disallow multiple empty lines + * @see https://eslint.style/rules/no-multiple-empty-lines */ - '@typescript-eslint/prefer-regexp-exec'?: Linter.RuleEntry<[]> + '@stylistic/no-multiple-empty-lines'?: Linter.RuleEntry<StylisticNoMultipleEmptyLines> /** - * Enforce that `this` is used when only `this` type is returned - * @see https://typescript-eslint.io/rules/prefer-return-this-type + * Disallow all tabs + * @see https://eslint.style/rules/no-tabs */ - '@typescript-eslint/prefer-return-this-type'?: Linter.RuleEntry<[]> + '@stylistic/no-tabs'?: Linter.RuleEntry<StylisticNoTabs> /** - * Enforce using `String#startsWith` and `String#endsWith` over other equivalent methods of checking substrings - * @see https://typescript-eslint.io/rules/prefer-string-starts-ends-with + * Disallow trailing whitespace at the end of lines + * @see https://eslint.style/rules/no-trailing-spaces */ - '@typescript-eslint/prefer-string-starts-ends-with'?: Linter.RuleEntry<TypescriptEslintPreferStringStartsEndsWith> + '@stylistic/no-trailing-spaces'?: Linter.RuleEntry<StylisticNoTrailingSpaces> /** - * Enforce using `@ts-expect-error` over `@ts-ignore` - * @see https://typescript-eslint.io/rules/prefer-ts-expect-error - * @deprecated + * Disallow whitespace before properties + * @see https://eslint.style/rules/no-whitespace-before-property */ - '@typescript-eslint/prefer-ts-expect-error'?: Linter.RuleEntry<[]> + '@stylistic/no-whitespace-before-property'?: Linter.RuleEntry<[]> /** - * Require any function or method that returns a Promise to be marked async - * @see https://typescript-eslint.io/rules/promise-function-async + * Enforce the location of single-line statements + * @see https://eslint.style/rules/nonblock-statement-body-position */ - '@typescript-eslint/promise-function-async'?: Linter.RuleEntry<TypescriptEslintPromiseFunctionAsync> + '@stylistic/nonblock-statement-body-position'?: Linter.RuleEntry<StylisticNonblockStatementBodyPosition> /** - * Enforce that `get()` types should be assignable to their equivalent `set()` type - * @see https://typescript-eslint.io/rules/related-getter-setter-pairs + * Enforce consistent line breaks after opening and before closing braces + * @see https://eslint.style/rules/object-curly-newline */ - '@typescript-eslint/related-getter-setter-pairs'?: Linter.RuleEntry<[]> + '@stylistic/object-curly-newline'?: Linter.RuleEntry<StylisticObjectCurlyNewline> /** - * Require `Array#sort` and `Array#toSorted` calls to always provide a `compareFunction` - * @see https://typescript-eslint.io/rules/require-array-sort-compare + * Enforce consistent spacing inside braces + * @see https://eslint.style/rules/object-curly-spacing */ - '@typescript-eslint/require-array-sort-compare'?: Linter.RuleEntry<TypescriptEslintRequireArraySortCompare> + '@stylistic/object-curly-spacing'?: Linter.RuleEntry<StylisticObjectCurlySpacing> /** - * Disallow async functions which do not return promises and have no `await` expression - * @see https://typescript-eslint.io/rules/require-await + * Enforce placing object properties on separate lines + * @see https://eslint.style/rules/object-property-newline */ - '@typescript-eslint/require-await'?: Linter.RuleEntry<[]> + '@stylistic/object-property-newline'?: Linter.RuleEntry<StylisticObjectPropertyNewline> /** - * Require both operands of addition to be the same type and be `bigint`, `number`, or `string` - * @see https://typescript-eslint.io/rules/restrict-plus-operands + * Require or disallow newlines around variable declarations + * @see https://eslint.style/rules/one-var-declaration-per-line */ - '@typescript-eslint/restrict-plus-operands'?: Linter.RuleEntry<TypescriptEslintRestrictPlusOperands> + '@stylistic/one-var-declaration-per-line'?: Linter.RuleEntry<StylisticOneVarDeclarationPerLine> /** - * Enforce template literal expressions to be of `string` type - * @see https://typescript-eslint.io/rules/restrict-template-expressions + * Enforce consistent linebreak style for operators + * @see https://eslint.style/rules/operator-linebreak */ - '@typescript-eslint/restrict-template-expressions'?: Linter.RuleEntry<TypescriptEslintRestrictTemplateExpressions> + '@stylistic/operator-linebreak'?: Linter.RuleEntry<StylisticOperatorLinebreak> /** - * Enforce consistent awaiting of returned promises - * @see https://typescript-eslint.io/rules/return-await + * Require or disallow padding within blocks + * @see https://eslint.style/rules/padded-blocks */ - '@typescript-eslint/return-await'?: Linter.RuleEntry<TypescriptEslintReturnAwait> + '@stylistic/padded-blocks'?: Linter.RuleEntry<StylisticPaddedBlocks> /** - * Enforce constituents of a type union/intersection to be sorted alphabetically - * @see https://typescript-eslint.io/rules/sort-type-constituents - * @deprecated + * Require or disallow padding lines between statements + * @see https://eslint.style/rules/padding-line-between-statements */ - '@typescript-eslint/sort-type-constituents'?: Linter.RuleEntry<TypescriptEslintSortTypeConstituents> + '@stylistic/padding-line-between-statements'?: Linter.RuleEntry<StylisticPaddingLineBetweenStatements> /** - * Disallow certain types in boolean expressions - * @see https://typescript-eslint.io/rules/strict-boolean-expressions + * Require quotes around object literal, type literal, interfaces and enums property names + * @see https://eslint.style/rules/quote-props */ - '@typescript-eslint/strict-boolean-expressions'?: Linter.RuleEntry<TypescriptEslintStrictBooleanExpressions> + '@stylistic/quote-props'?: Linter.RuleEntry<StylisticQuoteProps> /** - * Disallow passing a value-returning function in a position accepting a void function - * @see https://typescript-eslint.io/rules/strict-void-return + * Enforce the consistent use of either backticks, double, or single quotes + * @see https://eslint.style/rules/quotes */ - '@typescript-eslint/strict-void-return'?: Linter.RuleEntry<TypescriptEslintStrictVoidReturn> + '@stylistic/quotes'?: Linter.RuleEntry<StylisticQuotes> /** - * Require switch-case statements to be exhaustive - * @see https://typescript-eslint.io/rules/switch-exhaustiveness-check + * Enforce spacing between rest and spread operators and their expressions + * @see https://eslint.style/rules/rest-spread-spacing */ - '@typescript-eslint/switch-exhaustiveness-check'?: Linter.RuleEntry<TypescriptEslintSwitchExhaustivenessCheck> + '@stylistic/rest-spread-spacing'?: Linter.RuleEntry<StylisticRestSpreadSpacing> /** - * Disallow certain triple slash directives in favor of ES6-style import declarations - * @see https://typescript-eslint.io/rules/triple-slash-reference - */ - '@typescript-eslint/triple-slash-reference'?: Linter.RuleEntry<TypescriptEslintTripleSlashReference> - /** - * Require type annotations in certain places - * @see https://typescript-eslint.io/rules/typedef - * @deprecated + * Require or disallow semicolons instead of ASI + * @see https://eslint.style/rules/semi */ - '@typescript-eslint/typedef'?: Linter.RuleEntry<TypescriptEslintTypedef> + '@stylistic/semi'?: Linter.RuleEntry<StylisticSemi> /** - * Enforce unbound methods are called with their expected scope - * @see https://typescript-eslint.io/rules/unbound-method + * Enforce consistent spacing before and after semicolons + * @see https://eslint.style/rules/semi-spacing */ - '@typescript-eslint/unbound-method'?: Linter.RuleEntry<TypescriptEslintUnboundMethod> + '@stylistic/semi-spacing'?: Linter.RuleEntry<StylisticSemiSpacing> /** - * Disallow two overloads that could be unified into one with a union or an optional/rest parameter - * @see https://typescript-eslint.io/rules/unified-signatures + * Enforce location of semicolons + * @see https://eslint.style/rules/semi-style */ - '@typescript-eslint/unified-signatures'?: Linter.RuleEntry<TypescriptEslintUnifiedSignatures> + '@stylistic/semi-style'?: Linter.RuleEntry<StylisticSemiStyle> /** - * Enforce typing arguments in Promise rejection callbacks as `unknown` - * @see https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable + * Enforce consistent spacing before blocks + * @see https://eslint.style/rules/space-before-blocks */ - '@typescript-eslint/use-unknown-in-catch-callback-variable'?: Linter.RuleEntry<[]> + '@stylistic/space-before-blocks'?: Linter.RuleEntry<StylisticSpaceBeforeBlocks> /** - * Enforce getter and setter pairs in objects and classes - * @see https://eslint.org/docs/latest/rules/accessor-pairs + * Enforce consistent spacing before function parenthesis + * @see https://eslint.style/rules/space-before-function-paren */ - 'accessor-pairs'?: Linter.RuleEntry<AccessorPairs> + '@stylistic/space-before-function-paren'?: Linter.RuleEntry<StylisticSpaceBeforeFunctionParen> /** - * Enforce linebreaks after opening and before closing array brackets - * @see https://eslint.org/docs/latest/rules/array-bracket-newline - * @deprecated + * Enforce consistent spacing inside parentheses + * @see https://eslint.style/rules/space-in-parens */ - 'array-bracket-newline'?: Linter.RuleEntry<ArrayBracketNewline> + '@stylistic/space-in-parens'?: Linter.RuleEntry<StylisticSpaceInParens> /** - * Enforce consistent spacing inside array brackets - * @see https://eslint.org/docs/latest/rules/array-bracket-spacing - * @deprecated + * Require spacing around infix operators + * @see https://eslint.style/rules/space-infix-ops */ - 'array-bracket-spacing'?: Linter.RuleEntry<ArrayBracketSpacing> + '@stylistic/space-infix-ops'?: Linter.RuleEntry<StylisticSpaceInfixOps> /** - * Enforce `return` statements in callbacks of array methods - * @see https://eslint.org/docs/latest/rules/array-callback-return + * Enforce consistent spacing before or after unary operators + * @see https://eslint.style/rules/space-unary-ops */ - 'array-callback-return'?: Linter.RuleEntry<ArrayCallbackReturn> + '@stylistic/space-unary-ops'?: Linter.RuleEntry<StylisticSpaceUnaryOps> /** - * Enforce line breaks after each array element - * @see https://eslint.org/docs/latest/rules/array-element-newline - * @deprecated + * Enforce consistent spacing after the `//` or `/*` in a comment + * @see https://eslint.style/rules/spaced-comment */ - 'array-element-newline'?: Linter.RuleEntry<ArrayElementNewline> + '@stylistic/spaced-comment'?: Linter.RuleEntry<StylisticSpacedComment> /** - * Require braces around arrow function bodies - * @see https://eslint.org/docs/latest/rules/arrow-body-style + * Enforce spacing around colons of switch statements + * @see https://eslint.style/rules/switch-colon-spacing */ - 'arrow-body-style'?: Linter.RuleEntry<ArrowBodyStyle> + '@stylistic/switch-colon-spacing'?: Linter.RuleEntry<StylisticSwitchColonSpacing> /** - * Require parentheses around arrow function arguments - * @see https://eslint.org/docs/latest/rules/arrow-parens - * @deprecated + * Require or disallow spacing around embedded expressions of template strings + * @see https://eslint.style/rules/template-curly-spacing */ - 'arrow-parens'?: Linter.RuleEntry<ArrowParens> + '@stylistic/template-curly-spacing'?: Linter.RuleEntry<StylisticTemplateCurlySpacing> /** - * Enforce consistent spacing before and after the arrow in arrow functions - * @see https://eslint.org/docs/latest/rules/arrow-spacing - * @deprecated + * Require or disallow spacing between template tags and their literals + * @see https://eslint.style/rules/template-tag-spacing */ - 'arrow-spacing'?: Linter.RuleEntry<ArrowSpacing> + '@stylistic/template-tag-spacing'?: Linter.RuleEntry<StylisticTemplateTagSpacing> /** - * apply `jsx-a11y/alt-text` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/alt-text/ + * Require consistent spacing around type annotations + * @see https://eslint.style/rules/type-annotation-spacing */ - 'astro/jsx-a11y/alt-text'?: Linter.RuleEntry<AstroJsxA11YAltText> + '@stylistic/type-annotation-spacing'?: Linter.RuleEntry<StylisticTypeAnnotationSpacing> /** - * apply `jsx-a11y/anchor-ambiguous-text` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/anchor-ambiguous-text/ + * Enforces consistent spacing inside TypeScript type generics + * @see https://eslint.style/rules/type-generic-spacing */ - 'astro/jsx-a11y/anchor-ambiguous-text'?: Linter.RuleEntry<AstroJsxA11YAnchorAmbiguousText> + '@stylistic/type-generic-spacing'?: Linter.RuleEntry<[]> /** - * apply `jsx-a11y/anchor-has-content` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/anchor-has-content/ + * Expect space before the type declaration in the named tuple + * @see https://eslint.style/rules/type-named-tuple-spacing */ - 'astro/jsx-a11y/anchor-has-content'?: Linter.RuleEntry<AstroJsxA11YAnchorHasContent> + '@stylistic/type-named-tuple-spacing'?: Linter.RuleEntry<[]> /** - * apply `jsx-a11y/anchor-is-valid` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/anchor-is-valid/ + * Require parentheses around immediate `function` invocations + * @see https://eslint.style/rules/wrap-iife */ - 'astro/jsx-a11y/anchor-is-valid'?: Linter.RuleEntry<AstroJsxA11YAnchorIsValid> + '@stylistic/wrap-iife'?: Linter.RuleEntry<StylisticWrapIife> /** - * apply `jsx-a11y/aria-activedescendant-has-tabindex` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-activedescendant-has-tabindex/ + * Require parenthesis around regex literals + * @see https://eslint.style/rules/wrap-regex */ - 'astro/jsx-a11y/aria-activedescendant-has-tabindex'?: Linter.RuleEntry<AstroJsxA11YAriaActivedescendantHasTabindex> + '@stylistic/wrap-regex'?: Linter.RuleEntry<[]> /** - * apply `jsx-a11y/aria-props` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-props/ + * Require or disallow spacing around the `*` in `yield*` expressions + * @see https://eslint.style/rules/yield-star-spacing */ - 'astro/jsx-a11y/aria-props'?: Linter.RuleEntry<AstroJsxA11YAriaProps> + '@stylistic/yield-star-spacing'?: Linter.RuleEntry<StylisticYieldStarSpacing> /** - * apply `jsx-a11y/aria-proptypes` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-proptypes/ + * Require that function overload signatures be consecutive + * @see https://typescript-eslint.io/rules/adjacent-overload-signatures */ - 'astro/jsx-a11y/aria-proptypes'?: Linter.RuleEntry<AstroJsxA11YAriaProptypes> + '@typescript-eslint/adjacent-overload-signatures'?: Linter.RuleEntry<[]> /** - * apply `jsx-a11y/aria-role` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-role/ + * Require consistently using either `T[]` or `Array<T>` for arrays + * @see https://typescript-eslint.io/rules/array-type */ - 'astro/jsx-a11y/aria-role'?: Linter.RuleEntry<AstroJsxA11YAriaRole> + '@typescript-eslint/array-type'?: Linter.RuleEntry<TypescriptEslintArrayType> /** - * apply `jsx-a11y/aria-unsupported-elements` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-unsupported-elements/ + * Disallow awaiting a value that is not a Thenable + * @see https://typescript-eslint.io/rules/await-thenable */ - 'astro/jsx-a11y/aria-unsupported-elements'?: Linter.RuleEntry<AstroJsxA11YAriaUnsupportedElements> + '@typescript-eslint/await-thenable'?: Linter.RuleEntry<[]> /** - * apply `jsx-a11y/autocomplete-valid` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/autocomplete-valid/ + * Disallow `@ts-<directive>` comments or require descriptions after directives + * @see https://typescript-eslint.io/rules/ban-ts-comment */ - 'astro/jsx-a11y/autocomplete-valid'?: Linter.RuleEntry<AstroJsxA11YAutocompleteValid> + '@typescript-eslint/ban-ts-comment'?: Linter.RuleEntry<TypescriptEslintBanTsComment> /** - * apply `jsx-a11y/click-events-have-key-events` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/click-events-have-key-events/ + * Disallow `// tslint:<rule-flag>` comments + * @see https://typescript-eslint.io/rules/ban-tslint-comment */ - 'astro/jsx-a11y/click-events-have-key-events'?: Linter.RuleEntry<AstroJsxA11YClickEventsHaveKeyEvents> + '@typescript-eslint/ban-tslint-comment'?: Linter.RuleEntry<[]> /** - * apply `jsx-a11y/control-has-associated-label` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/control-has-associated-label/ + * Enforce that literals on classes are exposed in a consistent style + * @see https://typescript-eslint.io/rules/class-literal-property-style */ - 'astro/jsx-a11y/control-has-associated-label'?: Linter.RuleEntry<AstroJsxA11YControlHasAssociatedLabel> + '@typescript-eslint/class-literal-property-style'?: Linter.RuleEntry<TypescriptEslintClassLiteralPropertyStyle> /** - * apply `jsx-a11y/heading-has-content` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/heading-has-content/ + * Enforce that class methods utilize `this` + * @see https://typescript-eslint.io/rules/class-methods-use-this */ - 'astro/jsx-a11y/heading-has-content'?: Linter.RuleEntry<AstroJsxA11YHeadingHasContent> + '@typescript-eslint/class-methods-use-this'?: Linter.RuleEntry<TypescriptEslintClassMethodsUseThis> /** - * apply `jsx-a11y/html-has-lang` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/html-has-lang/ + * Enforce specifying generic type arguments on type annotation or constructor name of a constructor call + * @see https://typescript-eslint.io/rules/consistent-generic-constructors */ - 'astro/jsx-a11y/html-has-lang'?: Linter.RuleEntry<AstroJsxA11YHtmlHasLang> + '@typescript-eslint/consistent-generic-constructors'?: Linter.RuleEntry<TypescriptEslintConsistentGenericConstructors> /** - * apply `jsx-a11y/iframe-has-title` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/iframe-has-title/ + * Require or disallow the `Record` type + * @see https://typescript-eslint.io/rules/consistent-indexed-object-style */ - 'astro/jsx-a11y/iframe-has-title'?: Linter.RuleEntry<AstroJsxA11YIframeHasTitle> + '@typescript-eslint/consistent-indexed-object-style'?: Linter.RuleEntry<TypescriptEslintConsistentIndexedObjectStyle> /** - * apply `jsx-a11y/img-redundant-alt` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/img-redundant-alt/ + * Require `return` statements to either always or never specify values + * @see https://typescript-eslint.io/rules/consistent-return */ - 'astro/jsx-a11y/img-redundant-alt'?: Linter.RuleEntry<AstroJsxA11YImgRedundantAlt> + '@typescript-eslint/consistent-return'?: Linter.RuleEntry<TypescriptEslintConsistentReturn> /** - * apply `jsx-a11y/interactive-supports-focus` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/interactive-supports-focus/ + * Enforce consistent usage of type assertions + * @see https://typescript-eslint.io/rules/consistent-type-assertions */ - 'astro/jsx-a11y/interactive-supports-focus'?: Linter.RuleEntry<AstroJsxA11YInteractiveSupportsFocus> + '@typescript-eslint/consistent-type-assertions'?: Linter.RuleEntry<TypescriptEslintConsistentTypeAssertions> /** - * apply `jsx-a11y/label-has-associated-control` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/label-has-associated-control/ + * Enforce type definitions to consistently use either `interface` or `type` + * @see https://typescript-eslint.io/rules/consistent-type-definitions */ - 'astro/jsx-a11y/label-has-associated-control'?: Linter.RuleEntry<AstroJsxA11YLabelHasAssociatedControl> + '@typescript-eslint/consistent-type-definitions'?: Linter.RuleEntry<TypescriptEslintConsistentTypeDefinitions> /** - * apply `jsx-a11y/lang` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/lang/ + * Enforce consistent usage of type exports + * @see https://typescript-eslint.io/rules/consistent-type-exports */ - 'astro/jsx-a11y/lang'?: Linter.RuleEntry<AstroJsxA11YLang> + '@typescript-eslint/consistent-type-exports'?: Linter.RuleEntry<TypescriptEslintConsistentTypeExports> /** - * apply `jsx-a11y/media-has-caption` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/media-has-caption/ + * Enforce consistent usage of type imports + * @see https://typescript-eslint.io/rules/consistent-type-imports */ - 'astro/jsx-a11y/media-has-caption'?: Linter.RuleEntry<AstroJsxA11YMediaHasCaption> + '@typescript-eslint/consistent-type-imports'?: Linter.RuleEntry<TypescriptEslintConsistentTypeImports> /** - * apply `jsx-a11y/mouse-events-have-key-events` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/mouse-events-have-key-events/ + * Enforce default parameters to be last + * @see https://typescript-eslint.io/rules/default-param-last */ - 'astro/jsx-a11y/mouse-events-have-key-events'?: Linter.RuleEntry<AstroJsxA11YMouseEventsHaveKeyEvents> + '@typescript-eslint/default-param-last'?: Linter.RuleEntry<[]> /** - * apply `jsx-a11y/no-access-key` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-access-key/ + * Enforce dot notation whenever possible + * @see https://typescript-eslint.io/rules/dot-notation */ - 'astro/jsx-a11y/no-access-key'?: Linter.RuleEntry<AstroJsxA11YNoAccessKey> + '@typescript-eslint/dot-notation'?: Linter.RuleEntry<TypescriptEslintDotNotation> /** - * apply `jsx-a11y/no-aria-hidden-on-focusable` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-aria-hidden-on-focusable/ + * Require explicit return types on functions and class methods + * @see https://typescript-eslint.io/rules/explicit-function-return-type */ - 'astro/jsx-a11y/no-aria-hidden-on-focusable'?: Linter.RuleEntry<AstroJsxA11YNoAriaHiddenOnFocusable> + '@typescript-eslint/explicit-function-return-type'?: Linter.RuleEntry<TypescriptEslintExplicitFunctionReturnType> /** - * apply `jsx-a11y/no-autofocus` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-autofocus/ + * Require explicit accessibility modifiers on class properties and methods + * @see https://typescript-eslint.io/rules/explicit-member-accessibility */ - 'astro/jsx-a11y/no-autofocus'?: Linter.RuleEntry<AstroJsxA11YNoAutofocus> + '@typescript-eslint/explicit-member-accessibility'?: Linter.RuleEntry<TypescriptEslintExplicitMemberAccessibility> /** - * apply `jsx-a11y/no-distracting-elements` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-distracting-elements/ + * Require explicit return and argument types on exported functions' and classes' public class methods + * @see https://typescript-eslint.io/rules/explicit-module-boundary-types */ - 'astro/jsx-a11y/no-distracting-elements'?: Linter.RuleEntry<AstroJsxA11YNoDistractingElements> + '@typescript-eslint/explicit-module-boundary-types'?: Linter.RuleEntry<TypescriptEslintExplicitModuleBoundaryTypes> /** - * apply `jsx-a11y/no-interactive-element-to-noninteractive-role` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-interactive-element-to-noninteractive-role/ + * Require or disallow initialization in variable declarations + * @see https://typescript-eslint.io/rules/init-declarations */ - 'astro/jsx-a11y/no-interactive-element-to-noninteractive-role'?: Linter.RuleEntry<AstroJsxA11YNoInteractiveElementToNoninteractiveRole> + '@typescript-eslint/init-declarations'?: Linter.RuleEntry<TypescriptEslintInitDeclarations> /** - * apply `jsx-a11y/no-noninteractive-element-interactions` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-noninteractive-element-interactions/ + * Enforce a maximum number of parameters in function definitions + * @see https://typescript-eslint.io/rules/max-params */ - 'astro/jsx-a11y/no-noninteractive-element-interactions'?: Linter.RuleEntry<AstroJsxA11YNoNoninteractiveElementInteractions> + '@typescript-eslint/max-params'?: Linter.RuleEntry<TypescriptEslintMaxParams> /** - * apply `jsx-a11y/no-noninteractive-element-to-interactive-role` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-noninteractive-element-to-interactive-role/ + * Require a consistent member declaration order + * @see https://typescript-eslint.io/rules/member-ordering */ - 'astro/jsx-a11y/no-noninteractive-element-to-interactive-role'?: Linter.RuleEntry<AstroJsxA11YNoNoninteractiveElementToInteractiveRole> + '@typescript-eslint/member-ordering'?: Linter.RuleEntry<TypescriptEslintMemberOrdering> /** - * apply `jsx-a11y/no-noninteractive-tabindex` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-noninteractive-tabindex/ + * Enforce using a particular method signature syntax + * @see https://typescript-eslint.io/rules/method-signature-style */ - 'astro/jsx-a11y/no-noninteractive-tabindex'?: Linter.RuleEntry<AstroJsxA11YNoNoninteractiveTabindex> + '@typescript-eslint/method-signature-style'?: Linter.RuleEntry<TypescriptEslintMethodSignatureStyle> /** - * apply `jsx-a11y/no-redundant-roles` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-redundant-roles/ + * Enforce naming conventions for everything across a codebase + * @see https://typescript-eslint.io/rules/naming-convention */ - 'astro/jsx-a11y/no-redundant-roles'?: Linter.RuleEntry<AstroJsxA11YNoRedundantRoles> + '@typescript-eslint/naming-convention'?: Linter.RuleEntry<TypescriptEslintNamingConvention> /** - * apply `jsx-a11y/no-static-element-interactions` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-static-element-interactions/ + * Disallow generic `Array` constructors + * @see https://typescript-eslint.io/rules/no-array-constructor */ - 'astro/jsx-a11y/no-static-element-interactions'?: Linter.RuleEntry<AstroJsxA11YNoStaticElementInteractions> + '@typescript-eslint/no-array-constructor'?: Linter.RuleEntry<[]> /** - * apply `jsx-a11y/prefer-tag-over-role` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/prefer-tag-over-role/ + * Disallow using the `delete` operator on array values + * @see https://typescript-eslint.io/rules/no-array-delete */ - 'astro/jsx-a11y/prefer-tag-over-role'?: Linter.RuleEntry<AstroJsxA11YPreferTagOverRole> + '@typescript-eslint/no-array-delete'?: Linter.RuleEntry<[]> /** - * apply `jsx-a11y/role-has-required-aria-props` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/role-has-required-aria-props/ + * Require `.toString()` and `.toLocaleString()` to only be called on objects which provide useful information when stringified + * @see https://typescript-eslint.io/rules/no-base-to-string */ - 'astro/jsx-a11y/role-has-required-aria-props'?: Linter.RuleEntry<AstroJsxA11YRoleHasRequiredAriaProps> + '@typescript-eslint/no-base-to-string'?: Linter.RuleEntry<TypescriptEslintNoBaseToString> /** - * apply `jsx-a11y/role-supports-aria-props` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/role-supports-aria-props/ + * Disallow non-null assertion in locations that may be confusing + * @see https://typescript-eslint.io/rules/no-confusing-non-null-assertion */ - 'astro/jsx-a11y/role-supports-aria-props'?: Linter.RuleEntry<AstroJsxA11YRoleSupportsAriaProps> + '@typescript-eslint/no-confusing-non-null-assertion'?: Linter.RuleEntry<[]> /** - * apply `jsx-a11y/scope` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/scope/ + * Require expressions of type void to appear in statement position + * @see https://typescript-eslint.io/rules/no-confusing-void-expression */ - 'astro/jsx-a11y/scope'?: Linter.RuleEntry<AstroJsxA11YScope> + '@typescript-eslint/no-confusing-void-expression'?: Linter.RuleEntry<TypescriptEslintNoConfusingVoidExpression> /** - * apply `jsx-a11y/tabindex-no-positive` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/tabindex-no-positive/ + * Disallow using code marked as `@deprecated` + * @see https://typescript-eslint.io/rules/no-deprecated */ - 'astro/jsx-a11y/tabindex-no-positive'?: Linter.RuleEntry<AstroJsxA11YTabindexNoPositive> + '@typescript-eslint/no-deprecated'?: Linter.RuleEntry<TypescriptEslintNoDeprecated> /** - * the client:only directive is missing the correct component's framework value - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/missing-client-only-directive-value/ + * Disallow duplicate class members + * @see https://typescript-eslint.io/rules/no-dupe-class-members */ - 'astro/missing-client-only-directive-value'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-dupe-class-members'?: Linter.RuleEntry<[]> /** - * disallow conflicting set directives and child contents - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-conflict-set-directives/ + * Disallow duplicate enum member values + * @see https://typescript-eslint.io/rules/no-duplicate-enum-values */ - 'astro/no-conflict-set-directives'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-duplicate-enum-values'?: Linter.RuleEntry<[]> /** - * disallow using deprecated `Astro.canonicalURL` - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-canonicalurl/ + * Disallow duplicate constituents of union or intersection types + * @see https://typescript-eslint.io/rules/no-duplicate-type-constituents */ - 'astro/no-deprecated-astro-canonicalurl'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-duplicate-type-constituents'?: Linter.RuleEntry<TypescriptEslintNoDuplicateTypeConstituents> /** - * disallow using deprecated `Astro.fetchContent()` - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-fetchcontent/ + * Disallow using the `delete` operator on computed key expressions + * @see https://typescript-eslint.io/rules/no-dynamic-delete */ - 'astro/no-deprecated-astro-fetchcontent'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-dynamic-delete'?: Linter.RuleEntry<[]> /** - * disallow using deprecated `Astro.resolve()` - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-resolve/ + * Disallow empty functions + * @see https://typescript-eslint.io/rules/no-empty-function */ - 'astro/no-deprecated-astro-resolve'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-empty-function'?: Linter.RuleEntry<TypescriptEslintNoEmptyFunction> /** - * disallow using deprecated `getEntryBySlug()` - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-getentrybyslug/ + * Disallow the declaration of empty interfaces + * @see https://typescript-eslint.io/rules/no-empty-interface + * @deprecated */ - 'astro/no-deprecated-getentrybyslug'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-empty-interface'?: Linter.RuleEntry<TypescriptEslintNoEmptyInterface> /** - * disallow value export - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-exports-from-components/ + * Disallow accidentally using the "empty object" type + * @see https://typescript-eslint.io/rules/no-empty-object-type */ - 'astro/no-exports-from-components'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-empty-object-type'?: Linter.RuleEntry<TypescriptEslintNoEmptyObjectType> /** - * disallow `prerender` export outside of pages/ directory - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-prerender-export-outside-pages/ + * Disallow the `any` type + * @see https://typescript-eslint.io/rules/no-explicit-any */ - 'astro/no-prerender-export-outside-pages'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-explicit-any'?: Linter.RuleEntry<TypescriptEslintNoExplicitAny> /** - * disallow use of `set:html` to prevent XSS attack - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-html-directive/ + * Disallow extra non-null assertions + * @see https://typescript-eslint.io/rules/no-extra-non-null-assertion */ - 'astro/no-set-html-directive'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-extra-non-null-assertion'?: Linter.RuleEntry<[]> /** - * disallow use of `set:text` - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-text-directive/ + * Disallow classes used as namespaces + * @see https://typescript-eslint.io/rules/no-extraneous-class */ - 'astro/no-set-text-directive'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-extraneous-class'?: Linter.RuleEntry<TypescriptEslintNoExtraneousClass> /** - * disallow inline `<script>` without `src` to encourage CSP-safe patterns - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unsafe-inline-scripts/ + * Require Promise-like statements to be handled appropriately + * @see https://typescript-eslint.io/rules/no-floating-promises */ - 'astro/no-unsafe-inline-scripts'?: Linter.RuleEntry<AstroNoUnsafeInlineScripts> + '@typescript-eslint/no-floating-promises'?: Linter.RuleEntry<TypescriptEslintNoFloatingPromises> /** - * disallow selectors defined in `style` tag that don't use in HTML - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unused-css-selector/ + * Disallow iterating over an array with a for-in loop + * @see https://typescript-eslint.io/rules/no-for-in-array */ - 'astro/no-unused-css-selector'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-for-in-array'?: Linter.RuleEntry<[]> /** - * disallow unused `define:vars={...}` in `style` tag - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unused-define-vars-in-style/ + * Disallow the use of `eval()`-like functions + * @see https://typescript-eslint.io/rules/no-implied-eval */ - 'astro/no-unused-define-vars-in-style'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-implied-eval'?: Linter.RuleEntry<[]> /** - * require `class:list` directives instead of `class` with expressions - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/prefer-class-list-directive/ + * Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers + * @see https://typescript-eslint.io/rules/no-import-type-side-effects */ - 'astro/prefer-class-list-directive'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-import-type-side-effects'?: Linter.RuleEntry<[]> /** - * require use object instead of ternary expression in `class:list` - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/prefer-object-class-list/ + * Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean + * @see https://typescript-eslint.io/rules/no-inferrable-types */ - 'astro/prefer-object-class-list'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-inferrable-types'?: Linter.RuleEntry<TypescriptEslintNoInferrableTypes> /** - * require use split array elements in `class:list` - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/prefer-split-class-list/ + * Disallow `this` keywords outside of classes or class-like objects + * @see https://typescript-eslint.io/rules/no-invalid-this */ - 'astro/prefer-split-class-list'?: Linter.RuleEntry<AstroPreferSplitClassList> + '@typescript-eslint/no-invalid-this'?: Linter.RuleEntry<TypescriptEslintNoInvalidThis> /** - * Require or disallow semicolons instead of ASI - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/semi/ + * Disallow `void` type outside of generic or return types + * @see https://typescript-eslint.io/rules/no-invalid-void-type */ - 'astro/semi'?: Linter.RuleEntry<AstroSemi> + '@typescript-eslint/no-invalid-void-type'?: Linter.RuleEntry<TypescriptEslintNoInvalidVoidType> /** - * enforce sorting of attributes - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/sort-attributes/ + * Disallow function declarations that contain unsafe references inside loop statements + * @see https://typescript-eslint.io/rules/no-loop-func */ - 'astro/sort-attributes'?: Linter.RuleEntry<AstroSortAttributes> + '@typescript-eslint/no-loop-func'?: Linter.RuleEntry<[]> /** - * disallow warnings when compiling. - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/valid-compile/ + * Disallow literal numbers that lose precision + * @see https://typescript-eslint.io/rules/no-loss-of-precision + * @deprecated */ - 'astro/valid-compile'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-loss-of-precision'?: Linter.RuleEntry<[]> /** - * Enforce the use of variables within the scope they are defined - * @see https://eslint.org/docs/latest/rules/block-scoped-var + * Disallow magic numbers + * @see https://typescript-eslint.io/rules/no-magic-numbers */ - 'block-scoped-var'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-magic-numbers'?: Linter.RuleEntry<TypescriptEslintNoMagicNumbers> /** - * Disallow or enforce spaces inside of blocks after opening block and before closing block - * @see https://eslint.org/docs/latest/rules/block-spacing - * @deprecated + * Disallow the `void` operator except when used to discard a value + * @see https://typescript-eslint.io/rules/no-meaningless-void-operator */ - 'block-spacing'?: Linter.RuleEntry<BlockSpacing> + '@typescript-eslint/no-meaningless-void-operator'?: Linter.RuleEntry<TypescriptEslintNoMeaninglessVoidOperator> /** - * Enforce consistent brace style for blocks - * @see https://eslint.org/docs/latest/rules/brace-style - * @deprecated + * Enforce valid definition of `new` and `constructor` + * @see https://typescript-eslint.io/rules/no-misused-new */ - 'brace-style'?: Linter.RuleEntry<BraceStyle> + '@typescript-eslint/no-misused-new'?: Linter.RuleEntry<[]> /** - * Require `return` statements after callbacks - * @see https://eslint.org/docs/latest/rules/callback-return - * @deprecated + * Disallow Promises in places not designed to handle them + * @see https://typescript-eslint.io/rules/no-misused-promises */ - 'callback-return'?: Linter.RuleEntry<CallbackReturn> + '@typescript-eslint/no-misused-promises'?: Linter.RuleEntry<TypescriptEslintNoMisusedPromises> /** - * Enforce camelcase naming convention - * @see https://eslint.org/docs/latest/rules/camelcase + * Disallow using the spread operator when it might cause unexpected behavior + * @see https://typescript-eslint.io/rules/no-misused-spread */ - 'camelcase'?: Linter.RuleEntry<Camelcase> + '@typescript-eslint/no-misused-spread'?: Linter.RuleEntry<TypescriptEslintNoMisusedSpread> /** - * Enforce or disallow capitalization of the first letter of a comment - * @see https://eslint.org/docs/latest/rules/capitalized-comments + * Disallow enums from having both number and string members + * @see https://typescript-eslint.io/rules/no-mixed-enums */ - 'capitalized-comments'?: Linter.RuleEntry<CapitalizedComments> + '@typescript-eslint/no-mixed-enums'?: Linter.RuleEntry<[]> /** - * Enforce that class methods utilize `this` - * @see https://eslint.org/docs/latest/rules/class-methods-use-this + * Disallow TypeScript namespaces + * @see https://typescript-eslint.io/rules/no-namespace */ - 'class-methods-use-this'?: Linter.RuleEntry<ClassMethodsUseThis> + '@typescript-eslint/no-namespace'?: Linter.RuleEntry<TypescriptEslintNoNamespace> /** - * Require or disallow trailing commas - * @see https://eslint.org/docs/latest/rules/comma-dangle - * @deprecated + * Disallow non-null assertions in the left operand of a nullish coalescing operator + * @see https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing */ - 'comma-dangle'?: Linter.RuleEntry<CommaDangle> + '@typescript-eslint/no-non-null-asserted-nullish-coalescing'?: Linter.RuleEntry<[]> /** - * Enforce consistent spacing before and after commas - * @see https://eslint.org/docs/latest/rules/comma-spacing - * @deprecated + * Disallow non-null assertions after an optional chain expression + * @see https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain */ - 'comma-spacing'?: Linter.RuleEntry<CommaSpacing> + '@typescript-eslint/no-non-null-asserted-optional-chain'?: Linter.RuleEntry<[]> /** - * Enforce consistent comma style - * @see https://eslint.org/docs/latest/rules/comma-style - * @deprecated + * Disallow non-null assertions using the `!` postfix operator + * @see https://typescript-eslint.io/rules/no-non-null-assertion */ - 'comma-style'?: Linter.RuleEntry<CommaStyle> + '@typescript-eslint/no-non-null-assertion'?: Linter.RuleEntry<[]> /** - * Comment-as-command for one-off codemod with ESLint - * @see https://github.com/antfu/eslint-plugin-command + * Disallow variable redeclaration + * @see https://typescript-eslint.io/rules/no-redeclare */ - 'command/command'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-redeclare'?: Linter.RuleEntry<TypescriptEslintNoRedeclare> /** - * Enforce a maximum cyclomatic complexity allowed in a program - * @see https://eslint.org/docs/latest/rules/complexity + * Disallow members of unions and intersections that do nothing or override type information + * @see https://typescript-eslint.io/rules/no-redundant-type-constituents */ - 'complexity'?: Linter.RuleEntry<Complexity> + '@typescript-eslint/no-redundant-type-constituents'?: Linter.RuleEntry<[]> /** - * Enforce consistent spacing inside computed property brackets - * @see https://eslint.org/docs/latest/rules/computed-property-spacing - * @deprecated + * Disallow invocation of `require()` + * @see https://typescript-eslint.io/rules/no-require-imports */ - 'computed-property-spacing'?: Linter.RuleEntry<ComputedPropertySpacing> + '@typescript-eslint/no-require-imports'?: Linter.RuleEntry<TypescriptEslintNoRequireImports> /** - * Require `return` statements to either always or never specify values - * @see https://eslint.org/docs/latest/rules/consistent-return + * Disallow specified modules when loaded by `import` + * @see https://typescript-eslint.io/rules/no-restricted-imports */ - 'consistent-return'?: Linter.RuleEntry<ConsistentReturn> + '@typescript-eslint/no-restricted-imports'?: Linter.RuleEntry<TypescriptEslintNoRestrictedImports> /** - * Enforce consistent naming when capturing the current execution context - * @see https://eslint.org/docs/latest/rules/consistent-this + * Disallow certain types + * @see https://typescript-eslint.io/rules/no-restricted-types */ - 'consistent-this'?: Linter.RuleEntry<ConsistentThis> + '@typescript-eslint/no-restricted-types'?: Linter.RuleEntry<TypescriptEslintNoRestrictedTypes> /** - * Require `super()` calls in constructors - * @see https://eslint.org/docs/latest/rules/constructor-super - */ - 'constructor-super'?: Linter.RuleEntry<[]> + * Disallow variable declarations from shadowing variables declared in the outer scope + * @see https://typescript-eslint.io/rules/no-shadow + */ + '@typescript-eslint/no-shadow'?: Linter.RuleEntry<TypescriptEslintNoShadow> /** - * Enforce consistent brace style for all control statements - * @see https://eslint.org/docs/latest/rules/curly + * Disallow aliasing `this` + * @see https://typescript-eslint.io/rules/no-this-alias */ - 'curly'?: Linter.RuleEntry<Curly> + '@typescript-eslint/no-this-alias'?: Linter.RuleEntry<TypescriptEslintNoThisAlias> /** - * Require `default` cases in `switch` statements - * @see https://eslint.org/docs/latest/rules/default-case + * Disallow type aliases + * @see https://typescript-eslint.io/rules/no-type-alias + * @deprecated */ - 'default-case'?: Linter.RuleEntry<DefaultCase> + '@typescript-eslint/no-type-alias'?: Linter.RuleEntry<TypescriptEslintNoTypeAlias> /** - * Enforce `default` clauses in `switch` statements to be last - * @see https://eslint.org/docs/latest/rules/default-case-last + * Disallow unnecessary equality comparisons against boolean literals + * @see https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare */ - 'default-case-last'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-unnecessary-boolean-literal-compare'?: Linter.RuleEntry<TypescriptEslintNoUnnecessaryBooleanLiteralCompare> /** - * Enforce default parameters to be last - * @see https://eslint.org/docs/latest/rules/default-param-last + * Disallow conditionals where the type is always truthy or always falsy + * @see https://typescript-eslint.io/rules/no-unnecessary-condition */ - 'default-param-last'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-unnecessary-condition'?: Linter.RuleEntry<TypescriptEslintNoUnnecessaryCondition> /** - * Enforce consistent newlines before and after dots - * @see https://eslint.org/docs/latest/rules/dot-location - * @deprecated + * Disallow unnecessary assignment of constructor property parameter + * @see https://typescript-eslint.io/rules/no-unnecessary-parameter-property-assignment */ - 'dot-location'?: Linter.RuleEntry<DotLocation> + '@typescript-eslint/no-unnecessary-parameter-property-assignment'?: Linter.RuleEntry<[]> /** - * Enforce dot notation whenever possible - * @see https://eslint.org/docs/latest/rules/dot-notation + * Disallow unnecessary namespace qualifiers + * @see https://typescript-eslint.io/rules/no-unnecessary-qualifier */ - 'dot-notation'?: Linter.RuleEntry<DotNotation> + '@typescript-eslint/no-unnecessary-qualifier'?: Linter.RuleEntry<[]> /** - * Require or disallow newline at the end of files - * @see https://eslint.org/docs/latest/rules/eol-last - * @deprecated + * Disallow unnecessary template expressions + * @see https://typescript-eslint.io/rules/no-unnecessary-template-expression */ - 'eol-last'?: Linter.RuleEntry<EolLast> + '@typescript-eslint/no-unnecessary-template-expression'?: Linter.RuleEntry<[]> /** - * Require the use of `===` and `!==` - * @see https://eslint.org/docs/latest/rules/eqeqeq + * Disallow type arguments that are equal to the default + * @see https://typescript-eslint.io/rules/no-unnecessary-type-arguments */ - 'eqeqeq'?: Linter.RuleEntry<Eqeqeq> + '@typescript-eslint/no-unnecessary-type-arguments'?: Linter.RuleEntry<[]> /** - * Avoid using TypeScript's enums. - * @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/enums.md + * Disallow type assertions that do not change the type of an expression + * @see https://typescript-eslint.io/rules/no-unnecessary-type-assertion */ - 'erasable-syntax-only/enums'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-unnecessary-type-assertion'?: Linter.RuleEntry<TypescriptEslintNoUnnecessaryTypeAssertion> /** - * Avoid using TypeScript's import aliases. - * @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/import-aliases.md + * Disallow unnecessary constraints on generic types + * @see https://typescript-eslint.io/rules/no-unnecessary-type-constraint */ - 'erasable-syntax-only/import-aliases'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-unnecessary-type-constraint'?: Linter.RuleEntry<[]> /** - * Avoid using TypeScript's namespaces. - * @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/namespaces.md + * Disallow conversion idioms when they do not change the type or value of the expression + * @see https://typescript-eslint.io/rules/no-unnecessary-type-conversion */ - 'erasable-syntax-only/namespaces'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-unnecessary-type-conversion'?: Linter.RuleEntry<[]> /** - * Avoid using TypeScript's class parameter properties. - * @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/parameter-properties.md + * Disallow type parameters that aren't used multiple times + * @see https://typescript-eslint.io/rules/no-unnecessary-type-parameters */ - 'erasable-syntax-only/parameter-properties'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-unnecessary-type-parameters'?: Linter.RuleEntry<[]> /** - * require a `eslint-enable` comment for every `eslint-disable` comment - * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/disable-enable-pair.html + * Disallow calling a function with a value with type `any` + * @see https://typescript-eslint.io/rules/no-unsafe-argument */ - 'eslint-comments/disable-enable-pair'?: Linter.RuleEntry<EslintCommentsDisableEnablePair> + '@typescript-eslint/no-unsafe-argument'?: Linter.RuleEntry<[]> /** - * disallow a `eslint-enable` comment for multiple `eslint-disable` comments - * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-aggregating-enable.html + * Disallow assigning a value with type `any` to variables and properties + * @see https://typescript-eslint.io/rules/no-unsafe-assignment */ - 'eslint-comments/no-aggregating-enable'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-unsafe-assignment'?: Linter.RuleEntry<[]> /** - * disallow duplicate `eslint-disable` comments - * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-duplicate-disable.html + * Disallow calling a value with type `any` + * @see https://typescript-eslint.io/rules/no-unsafe-call */ - 'eslint-comments/no-duplicate-disable'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-unsafe-call'?: Linter.RuleEntry<[]> /** - * disallow `eslint-disable` comments about specific rules - * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-restricted-disable.html + * Disallow unsafe declaration merging + * @see https://typescript-eslint.io/rules/no-unsafe-declaration-merging */ - 'eslint-comments/no-restricted-disable'?: Linter.RuleEntry<EslintCommentsNoRestrictedDisable> + '@typescript-eslint/no-unsafe-declaration-merging'?: Linter.RuleEntry<[]> /** - * disallow `eslint-disable` comments without rule names - * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unlimited-disable.html + * Disallow comparing an enum value with a non-enum value + * @see https://typescript-eslint.io/rules/no-unsafe-enum-comparison */ - 'eslint-comments/no-unlimited-disable'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-unsafe-enum-comparison'?: Linter.RuleEntry<[]> /** - * disallow unused `eslint-disable` comments - * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unused-disable.html - * @deprecated + * Disallow using the unsafe built-in Function type + * @see https://typescript-eslint.io/rules/no-unsafe-function-type */ - 'eslint-comments/no-unused-disable'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-unsafe-function-type'?: Linter.RuleEntry<[]> /** - * disallow unused `eslint-enable` comments - * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unused-enable.html + * Disallow member access on a value with type `any` + * @see https://typescript-eslint.io/rules/no-unsafe-member-access */ - 'eslint-comments/no-unused-enable'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-unsafe-member-access'?: Linter.RuleEntry<TypescriptEslintNoUnsafeMemberAccess> /** - * disallow ESLint directive-comments - * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-use.html + * Disallow returning a value with type `any` from a function + * @see https://typescript-eslint.io/rules/no-unsafe-return */ - 'eslint-comments/no-use'?: Linter.RuleEntry<EslintCommentsNoUse> + '@typescript-eslint/no-unsafe-return'?: Linter.RuleEntry<[]> /** - * require include descriptions in ESLint directive-comments - * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/require-description.html + * Disallow type assertions that narrow a type + * @see https://typescript-eslint.io/rules/no-unsafe-type-assertion */ - 'eslint-comments/require-description'?: Linter.RuleEntry<EslintCommentsRequireDescription> + '@typescript-eslint/no-unsafe-type-assertion'?: Linter.RuleEntry<[]> /** - * Enforce `for` loop update clause moving the counter in the right direction - * @see https://eslint.org/docs/latest/rules/for-direction + * Require unary negation to take a number + * @see https://typescript-eslint.io/rules/no-unsafe-unary-minus */ - 'for-direction'?: Linter.RuleEntry<[]> + '@typescript-eslint/no-unsafe-unary-minus'?: Linter.RuleEntry<[]> /** - * Require or disallow spacing between function identifiers and their invocations - * @see https://eslint.org/docs/latest/rules/func-call-spacing - * @deprecated + * Disallow unused expressions + * @see https://typescript-eslint.io/rules/no-unused-expressions */ - 'func-call-spacing'?: Linter.RuleEntry<FuncCallSpacing> + '@typescript-eslint/no-unused-expressions'?: Linter.RuleEntry<TypescriptEslintNoUnusedExpressions> /** - * Require function names to match the name of the variable or property to which they are assigned - * @see https://eslint.org/docs/latest/rules/func-name-matching + * Disallow unused private class members + * @see https://typescript-eslint.io/rules/no-unused-private-class-members */ - 'func-name-matching'?: Linter.RuleEntry<FuncNameMatching> + '@typescript-eslint/no-unused-private-class-members'?: Linter.RuleEntry<[]> /** - * Require or disallow named `function` expressions - * @see https://eslint.org/docs/latest/rules/func-names + * Disallow unused variables + * @see https://typescript-eslint.io/rules/no-unused-vars */ - 'func-names'?: Linter.RuleEntry<FuncNames> + '@typescript-eslint/no-unused-vars'?: Linter.RuleEntry<TypescriptEslintNoUnusedVars> /** - * Enforce the consistent use of either `function` declarations or expressions assigned to variables - * @see https://eslint.org/docs/latest/rules/func-style + * Disallow the use of variables before they are defined + * @see https://typescript-eslint.io/rules/no-use-before-define */ - 'func-style'?: Linter.RuleEntry<FuncStyle> + '@typescript-eslint/no-use-before-define'?: Linter.RuleEntry<TypescriptEslintNoUseBeforeDefine> /** - * Enforce line breaks between arguments of a function call - * @see https://eslint.org/docs/latest/rules/function-call-argument-newline - * @deprecated + * Disallow unnecessary constructors + * @see https://typescript-eslint.io/rules/no-useless-constructor */ - 'function-call-argument-newline'?: Linter.RuleEntry<FunctionCallArgumentNewline> + '@typescript-eslint/no-useless-constructor'?: Linter.RuleEntry<[]> /** - * Enforce consistent line breaks inside function parentheses - * @see https://eslint.org/docs/latest/rules/function-paren-newline - * @deprecated + * Disallow default values that will never be used + * @see https://typescript-eslint.io/rules/no-useless-default-assignment */ - 'function-paren-newline'?: Linter.RuleEntry<FunctionParenNewline> + '@typescript-eslint/no-useless-default-assignment'?: Linter.RuleEntry<TypescriptEslintNoUselessDefaultAssignment> /** - * Enforce consistent spacing around `*` operators in generator functions - * @see https://eslint.org/docs/latest/rules/generator-star-spacing + * Disallow empty exports that don't change anything in a module file + * @see https://typescript-eslint.io/rules/no-useless-empty-export + */ + '@typescript-eslint/no-useless-empty-export'?: Linter.RuleEntry<[]> + /** + * Disallow `require` statements except in import statements + * @see https://typescript-eslint.io/rules/no-var-requires * @deprecated */ - 'generator-star-spacing'?: Linter.RuleEntry<GeneratorStarSpacing> + '@typescript-eslint/no-var-requires'?: Linter.RuleEntry<TypescriptEslintNoVarRequires> /** - * Enforce `return` statements in getters - * @see https://eslint.org/docs/latest/rules/getter-return + * Disallow using confusing built-in primitive class wrappers + * @see https://typescript-eslint.io/rules/no-wrapper-object-types */ - 'getter-return'?: Linter.RuleEntry<GetterReturn> + '@typescript-eslint/no-wrapper-object-types'?: Linter.RuleEntry<[]> /** - * Require `require()` calls to be placed at top-level module scope - * @see https://eslint.org/docs/latest/rules/global-require - * @deprecated + * Enforce non-null assertions over explicit type assertions + * @see https://typescript-eslint.io/rules/non-nullable-type-assertion-style */ - 'global-require'?: Linter.RuleEntry<[]> + '@typescript-eslint/non-nullable-type-assertion-style'?: Linter.RuleEntry<[]> /** - * Require grouped accessor pairs in object literals and classes - * @see https://eslint.org/docs/latest/rules/grouped-accessor-pairs + * Disallow throwing non-`Error` values as exceptions + * @see https://typescript-eslint.io/rules/only-throw-error */ - 'grouped-accessor-pairs'?: Linter.RuleEntry<GroupedAccessorPairs> + '@typescript-eslint/only-throw-error'?: Linter.RuleEntry<TypescriptEslintOnlyThrowError> /** - * Require `for-in` loops to include an `if` statement - * @see https://eslint.org/docs/latest/rules/guard-for-in + * Require or disallow parameter properties in class constructors + * @see https://typescript-eslint.io/rules/parameter-properties */ - 'guard-for-in'?: Linter.RuleEntry<[]> + '@typescript-eslint/parameter-properties'?: Linter.RuleEntry<TypescriptEslintParameterProperties> /** - * Require error handling in callbacks - * @see https://eslint.org/docs/latest/rules/handle-callback-err - * @deprecated + * Enforce the use of `as const` over literal type + * @see https://typescript-eslint.io/rules/prefer-as-const */ - 'handle-callback-err'?: Linter.RuleEntry<HandleCallbackErr> + '@typescript-eslint/prefer-as-const'?: Linter.RuleEntry<[]> /** - * Disallow specified identifiers - * @see https://eslint.org/docs/latest/rules/id-blacklist - * @deprecated + * Require destructuring from arrays and/or objects + * @see https://typescript-eslint.io/rules/prefer-destructuring */ - 'id-blacklist'?: Linter.RuleEntry<IdBlacklist> + '@typescript-eslint/prefer-destructuring'?: Linter.RuleEntry<TypescriptEslintPreferDestructuring> /** - * Disallow specified identifiers - * @see https://eslint.org/docs/latest/rules/id-denylist + * Require each enum member value to be explicitly initialized + * @see https://typescript-eslint.io/rules/prefer-enum-initializers */ - 'id-denylist'?: Linter.RuleEntry<IdDenylist> + '@typescript-eslint/prefer-enum-initializers'?: Linter.RuleEntry<[]> /** - * Enforce minimum and maximum identifier lengths - * @see https://eslint.org/docs/latest/rules/id-length + * Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result + * @see https://typescript-eslint.io/rules/prefer-find */ - 'id-length'?: Linter.RuleEntry<IdLength> + '@typescript-eslint/prefer-find'?: Linter.RuleEntry<[]> /** - * Require identifiers to match a specified regular expression - * @see https://eslint.org/docs/latest/rules/id-match + * Enforce the use of `for-of` loop over the standard `for` loop where possible + * @see https://typescript-eslint.io/rules/prefer-for-of */ - 'id-match'?: Linter.RuleEntry<IdMatch> + '@typescript-eslint/prefer-for-of'?: Linter.RuleEntry<[]> /** - * Enforce the location of arrow function bodies - * @see https://eslint.org/docs/latest/rules/implicit-arrow-linebreak + * Enforce using function types instead of interfaces with call signatures + * @see https://typescript-eslint.io/rules/prefer-function-type + */ + '@typescript-eslint/prefer-function-type'?: Linter.RuleEntry<[]> + /** + * Enforce `includes` method over `indexOf` method + * @see https://typescript-eslint.io/rules/prefer-includes + */ + '@typescript-eslint/prefer-includes'?: Linter.RuleEntry<[]> + /** + * Require all enum members to be literal values + * @see https://typescript-eslint.io/rules/prefer-literal-enum-member + */ + '@typescript-eslint/prefer-literal-enum-member'?: Linter.RuleEntry<TypescriptEslintPreferLiteralEnumMember> + /** + * Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules + * @see https://typescript-eslint.io/rules/prefer-namespace-keyword + */ + '@typescript-eslint/prefer-namespace-keyword'?: Linter.RuleEntry<[]> + /** + * Enforce using the nullish coalescing operator instead of logical assignments or chaining + * @see https://typescript-eslint.io/rules/prefer-nullish-coalescing + */ + '@typescript-eslint/prefer-nullish-coalescing'?: Linter.RuleEntry<TypescriptEslintPreferNullishCoalescing> + /** + * Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects + * @see https://typescript-eslint.io/rules/prefer-optional-chain + */ + '@typescript-eslint/prefer-optional-chain'?: Linter.RuleEntry<TypescriptEslintPreferOptionalChain> + /** + * Require using Error objects as Promise rejection reasons + * @see https://typescript-eslint.io/rules/prefer-promise-reject-errors + */ + '@typescript-eslint/prefer-promise-reject-errors'?: Linter.RuleEntry<TypescriptEslintPreferPromiseRejectErrors> + /** + * Require private members to be marked as `readonly` if they're never modified outside of the constructor + * @see https://typescript-eslint.io/rules/prefer-readonly + */ + '@typescript-eslint/prefer-readonly'?: Linter.RuleEntry<TypescriptEslintPreferReadonly> + /** + * Require function parameters to be typed as `readonly` to prevent accidental mutation of inputs + * @see https://typescript-eslint.io/rules/prefer-readonly-parameter-types + */ + '@typescript-eslint/prefer-readonly-parameter-types'?: Linter.RuleEntry<TypescriptEslintPreferReadonlyParameterTypes> + /** + * Enforce using type parameter when calling `Array#reduce` instead of using a type assertion + * @see https://typescript-eslint.io/rules/prefer-reduce-type-parameter + */ + '@typescript-eslint/prefer-reduce-type-parameter'?: Linter.RuleEntry<[]> + /** + * Enforce `RegExp#exec` over `String#match` if no global flag is provided + * @see https://typescript-eslint.io/rules/prefer-regexp-exec + */ + '@typescript-eslint/prefer-regexp-exec'?: Linter.RuleEntry<[]> + /** + * Enforce that `this` is used when only `this` type is returned + * @see https://typescript-eslint.io/rules/prefer-return-this-type + */ + '@typescript-eslint/prefer-return-this-type'?: Linter.RuleEntry<[]> + /** + * Enforce using `String#startsWith` and `String#endsWith` over other equivalent methods of checking substrings + * @see https://typescript-eslint.io/rules/prefer-string-starts-ends-with + */ + '@typescript-eslint/prefer-string-starts-ends-with'?: Linter.RuleEntry<TypescriptEslintPreferStringStartsEndsWith> + /** + * Enforce using `@ts-expect-error` over `@ts-ignore` + * @see https://typescript-eslint.io/rules/prefer-ts-expect-error * @deprecated */ - 'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak> + '@typescript-eslint/prefer-ts-expect-error'?: Linter.RuleEntry<[]> /** - * Enforce or ban the use of inline type-only markers for named imports. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/consistent-type-specifier-style.md + * Require any function or method that returns a Promise to be marked async + * @see https://typescript-eslint.io/rules/promise-function-async */ - 'import-x/consistent-type-specifier-style'?: Linter.RuleEntry<ImportXConsistentTypeSpecifierStyle> + '@typescript-eslint/promise-function-async'?: Linter.RuleEntry<TypescriptEslintPromiseFunctionAsync> /** - * Ensure a default export is present, given a default import. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/default.md + * Enforce that `get()` types should be assignable to their equivalent `set()` type + * @see https://typescript-eslint.io/rules/related-getter-setter-pairs */ - 'import-x/default'?: Linter.RuleEntry<[]> + '@typescript-eslint/related-getter-setter-pairs'?: Linter.RuleEntry<[]> /** - * Enforce a leading comment with the webpackChunkName for dynamic imports. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/dynamic-import-chunkname.md + * Require `Array#sort` and `Array#toSorted` calls to always provide a `compareFunction` + * @see https://typescript-eslint.io/rules/require-array-sort-compare */ - 'import-x/dynamic-import-chunkname'?: Linter.RuleEntry<ImportXDynamicImportChunkname> + '@typescript-eslint/require-array-sort-compare'?: Linter.RuleEntry<TypescriptEslintRequireArraySortCompare> /** - * Forbid any invalid exports, i.e. re-export of the same name. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/export.md + * Disallow async functions which do not return promises and have no `await` expression + * @see https://typescript-eslint.io/rules/require-await */ - 'import-x/export'?: Linter.RuleEntry<[]> + '@typescript-eslint/require-await'?: Linter.RuleEntry<[]> /** - * Ensure all exports appear after other statements. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/exports-last.md + * Require both operands of addition to be the same type and be `bigint`, `number`, or `string` + * @see https://typescript-eslint.io/rules/restrict-plus-operands */ - 'import-x/exports-last'?: Linter.RuleEntry<[]> + '@typescript-eslint/restrict-plus-operands'?: Linter.RuleEntry<TypescriptEslintRestrictPlusOperands> /** - * Ensure consistent use of file extension within the import path. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/extensions.md + * Enforce template literal expressions to be of `string` type + * @see https://typescript-eslint.io/rules/restrict-template-expressions */ - 'import-x/extensions'?: Linter.RuleEntry<ImportXExtensions> + '@typescript-eslint/restrict-template-expressions'?: Linter.RuleEntry<TypescriptEslintRestrictTemplateExpressions> /** - * Ensure all imports appear before other statements. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/first.md + * Enforce consistent awaiting of returned promises + * @see https://typescript-eslint.io/rules/return-await */ - 'import-x/first'?: Linter.RuleEntry<ImportXFirst> + '@typescript-eslint/return-await'?: Linter.RuleEntry<TypescriptEslintReturnAwait> /** - * Prefer named exports to be grouped together in a single export declaration. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/group-exports.md + * Enforce constituents of a type union/intersection to be sorted alphabetically + * @see https://typescript-eslint.io/rules/sort-type-constituents + * @deprecated */ - 'import-x/group-exports'?: Linter.RuleEntry<[]> + '@typescript-eslint/sort-type-constituents'?: Linter.RuleEntry<TypescriptEslintSortTypeConstituents> /** - * Replaced by `import-x/first`. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/imports-first.md + * Disallow certain types in boolean expressions + * @see https://typescript-eslint.io/rules/strict-boolean-expressions + */ + '@typescript-eslint/strict-boolean-expressions'?: Linter.RuleEntry<TypescriptEslintStrictBooleanExpressions> + /** + * Disallow passing a value-returning function in a position accepting a void function + * @see https://typescript-eslint.io/rules/strict-void-return + */ + '@typescript-eslint/strict-void-return'?: Linter.RuleEntry<TypescriptEslintStrictVoidReturn> + /** + * Require switch-case statements to be exhaustive + * @see https://typescript-eslint.io/rules/switch-exhaustiveness-check + */ + '@typescript-eslint/switch-exhaustiveness-check'?: Linter.RuleEntry<TypescriptEslintSwitchExhaustivenessCheck> + /** + * Disallow certain triple slash directives in favor of ES6-style import declarations + * @see https://typescript-eslint.io/rules/triple-slash-reference + */ + '@typescript-eslint/triple-slash-reference'?: Linter.RuleEntry<TypescriptEslintTripleSlashReference> + /** + * Require type annotations in certain places + * @see https://typescript-eslint.io/rules/typedef * @deprecated */ - 'import-x/imports-first'?: Linter.RuleEntry<ImportXImportsFirst> + '@typescript-eslint/typedef'?: Linter.RuleEntry<TypescriptEslintTypedef> /** - * Enforce the maximum number of dependencies a module can have. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/max-dependencies.md + * Enforce unbound methods are called with their expected scope + * @see https://typescript-eslint.io/rules/unbound-method */ - 'import-x/max-dependencies'?: Linter.RuleEntry<ImportXMaxDependencies> + '@typescript-eslint/unbound-method'?: Linter.RuleEntry<TypescriptEslintUnboundMethod> /** - * Ensure named imports correspond to a named export in the remote file. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/named.md + * Disallow two overloads that could be unified into one with a union or an optional/rest parameter + * @see https://typescript-eslint.io/rules/unified-signatures */ - 'import-x/named'?: Linter.RuleEntry<ImportXNamed> + '@typescript-eslint/unified-signatures'?: Linter.RuleEntry<TypescriptEslintUnifiedSignatures> /** - * Ensure imported namespaces contain dereferenced properties as they are dereferenced. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/namespace.md + * Enforce typing arguments in Promise rejection callbacks as `unknown` + * @see https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable */ - 'import-x/namespace'?: Linter.RuleEntry<ImportXNamespace> + '@typescript-eslint/use-unknown-in-catch-callback-variable'?: Linter.RuleEntry<[]> /** - * Enforce a newline after import statements. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/newline-after-import.md + * Enforce getter and setter pairs in objects and classes + * @see https://eslint.org/docs/latest/rules/accessor-pairs + */ + 'accessor-pairs'?: Linter.RuleEntry<AccessorPairs> + /** + * Enforce linebreaks after opening and before closing array brackets + * @see https://eslint.org/docs/latest/rules/array-bracket-newline + * @deprecated + */ + 'array-bracket-newline'?: Linter.RuleEntry<ArrayBracketNewline> + /** + * Enforce consistent spacing inside array brackets + * @see https://eslint.org/docs/latest/rules/array-bracket-spacing + * @deprecated */ - 'import-x/newline-after-import'?: Linter.RuleEntry<ImportXNewlineAfterImport> + 'array-bracket-spacing'?: Linter.RuleEntry<ArrayBracketSpacing> /** - * Forbid import of modules using absolute paths. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-absolute-path.md + * Enforce `return` statements in callbacks of array methods + * @see https://eslint.org/docs/latest/rules/array-callback-return */ - 'import-x/no-absolute-path'?: Linter.RuleEntry<ImportXNoAbsolutePath> + 'array-callback-return'?: Linter.RuleEntry<ArrayCallbackReturn> /** - * Forbid AMD `require` and `define` calls. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-amd.md + * Enforce line breaks after each array element + * @see https://eslint.org/docs/latest/rules/array-element-newline + * @deprecated */ - 'import-x/no-amd'?: Linter.RuleEntry<[]> + 'array-element-newline'?: Linter.RuleEntry<ArrayElementNewline> /** - * Forbid anonymous values as default exports. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-anonymous-default-export.md + * Require braces around arrow function bodies + * @see https://eslint.org/docs/latest/rules/arrow-body-style */ - 'import-x/no-anonymous-default-export'?: Linter.RuleEntry<ImportXNoAnonymousDefaultExport> + 'arrow-body-style'?: Linter.RuleEntry<ArrowBodyStyle> /** - * Forbid CommonJS `require` calls and `module.exports` or `exports.*`. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-commonjs.md + * Require parentheses around arrow function arguments + * @see https://eslint.org/docs/latest/rules/arrow-parens + * @deprecated */ - 'import-x/no-commonjs'?: Linter.RuleEntry<ImportXNoCommonjs> + 'arrow-parens'?: Linter.RuleEntry<ArrowParens> /** - * Forbid a module from importing a module with a dependency path back to itself. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-cycle.md + * Enforce consistent spacing before and after the arrow in arrow functions + * @see https://eslint.org/docs/latest/rules/arrow-spacing + * @deprecated */ - 'import-x/no-cycle'?: Linter.RuleEntry<ImportXNoCycle> + 'arrow-spacing'?: Linter.RuleEntry<ArrowSpacing> /** - * Forbid default exports. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-default-export.md + * apply `jsx-a11y/alt-text` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/alt-text/ */ - 'import-x/no-default-export'?: Linter.RuleEntry<[]> + 'astro/jsx-a11y/alt-text'?: Linter.RuleEntry<AstroJsxA11YAltText> /** - * Forbid imported names marked with `@deprecated` documentation tag. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-deprecated.md + * apply `jsx-a11y/anchor-ambiguous-text` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/anchor-ambiguous-text/ */ - 'import-x/no-deprecated'?: Linter.RuleEntry<[]> + 'astro/jsx-a11y/anchor-ambiguous-text'?: Linter.RuleEntry<AstroJsxA11YAnchorAmbiguousText> /** - * Forbid repeated import of the same module in multiple places. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-duplicates.md + * apply `jsx-a11y/anchor-has-content` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/anchor-has-content/ */ - 'import-x/no-duplicates'?: Linter.RuleEntry<ImportXNoDuplicates> + 'astro/jsx-a11y/anchor-has-content'?: Linter.RuleEntry<AstroJsxA11YAnchorHasContent> /** - * Forbid `require()` calls with expressions. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-dynamic-require.md + * apply `jsx-a11y/anchor-is-valid` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/anchor-is-valid/ */ - 'import-x/no-dynamic-require'?: Linter.RuleEntry<ImportXNoDynamicRequire> + 'astro/jsx-a11y/anchor-is-valid'?: Linter.RuleEntry<AstroJsxA11YAnchorIsValid> /** - * Forbid empty named import blocks. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-empty-named-blocks.md + * apply `jsx-a11y/aria-activedescendant-has-tabindex` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-activedescendant-has-tabindex/ */ - 'import-x/no-empty-named-blocks'?: Linter.RuleEntry<[]> + 'astro/jsx-a11y/aria-activedescendant-has-tabindex'?: Linter.RuleEntry<AstroJsxA11YAriaActivedescendantHasTabindex> /** - * Forbid the use of extraneous packages. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-extraneous-dependencies.md + * apply `jsx-a11y/aria-props` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-props/ */ - 'import-x/no-extraneous-dependencies'?: Linter.RuleEntry<ImportXNoExtraneousDependencies> + 'astro/jsx-a11y/aria-props'?: Linter.RuleEntry<AstroJsxA11YAriaProps> /** - * Forbid import statements with CommonJS module.exports. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-import-module-exports.md + * apply `jsx-a11y/aria-proptypes` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-proptypes/ */ - 'import-x/no-import-module-exports'?: Linter.RuleEntry<ImportXNoImportModuleExports> + 'astro/jsx-a11y/aria-proptypes'?: Linter.RuleEntry<AstroJsxA11YAriaProptypes> /** - * Forbid importing the submodules of other modules. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-internal-modules.md + * apply `jsx-a11y/aria-role` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-role/ */ - 'import-x/no-internal-modules'?: Linter.RuleEntry<ImportXNoInternalModules> + 'astro/jsx-a11y/aria-role'?: Linter.RuleEntry<AstroJsxA11YAriaRole> /** - * Forbid the use of mutable exports with `var` or `let`. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-mutable-exports.md + * apply `jsx-a11y/aria-unsupported-elements` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-unsupported-elements/ */ - 'import-x/no-mutable-exports'?: Linter.RuleEntry<[]> + 'astro/jsx-a11y/aria-unsupported-elements'?: Linter.RuleEntry<AstroJsxA11YAriaUnsupportedElements> /** - * Forbid use of exported name as identifier of default export. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-named-as-default.md + * apply `jsx-a11y/autocomplete-valid` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/autocomplete-valid/ */ - 'import-x/no-named-as-default'?: Linter.RuleEntry<[]> + 'astro/jsx-a11y/autocomplete-valid'?: Linter.RuleEntry<AstroJsxA11YAutocompleteValid> /** - * Forbid use of exported name as property of default export. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-named-as-default-member.md + * apply `jsx-a11y/click-events-have-key-events` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/click-events-have-key-events/ */ - 'import-x/no-named-as-default-member'?: Linter.RuleEntry<[]> + 'astro/jsx-a11y/click-events-have-key-events'?: Linter.RuleEntry<AstroJsxA11YClickEventsHaveKeyEvents> /** - * Forbid named default exports. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-named-default.md + * apply `jsx-a11y/control-has-associated-label` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/control-has-associated-label/ */ - 'import-x/no-named-default'?: Linter.RuleEntry<[]> + 'astro/jsx-a11y/control-has-associated-label'?: Linter.RuleEntry<AstroJsxA11YControlHasAssociatedLabel> /** - * Forbid named exports. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-named-export.md + * apply `jsx-a11y/heading-has-content` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/heading-has-content/ */ - 'import-x/no-named-export'?: Linter.RuleEntry<[]> + 'astro/jsx-a11y/heading-has-content'?: Linter.RuleEntry<AstroJsxA11YHeadingHasContent> /** - * Forbid namespace (a.k.a. "wildcard" `*`) imports. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-namespace.md + * apply `jsx-a11y/html-has-lang` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/html-has-lang/ */ - 'import-x/no-namespace'?: Linter.RuleEntry<ImportXNoNamespace> + 'astro/jsx-a11y/html-has-lang'?: Linter.RuleEntry<AstroJsxA11YHtmlHasLang> /** - * Forbid Node.js builtin modules. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-nodejs-modules.md + * apply `jsx-a11y/iframe-has-title` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/iframe-has-title/ */ - 'import-x/no-nodejs-modules'?: Linter.RuleEntry<ImportXNoNodejsModules> + 'astro/jsx-a11y/iframe-has-title'?: Linter.RuleEntry<AstroJsxA11YIframeHasTitle> /** - * Forbid importing packages through relative paths. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-relative-packages.md + * apply `jsx-a11y/img-redundant-alt` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/img-redundant-alt/ */ - 'import-x/no-relative-packages'?: Linter.RuleEntry<ImportXNoRelativePackages> + 'astro/jsx-a11y/img-redundant-alt'?: Linter.RuleEntry<AstroJsxA11YImgRedundantAlt> /** - * Forbid importing modules from parent directories. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-relative-parent-imports.md + * apply `jsx-a11y/interactive-supports-focus` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/interactive-supports-focus/ */ - 'import-x/no-relative-parent-imports'?: Linter.RuleEntry<ImportXNoRelativeParentImports> + 'astro/jsx-a11y/interactive-supports-focus'?: Linter.RuleEntry<AstroJsxA11YInteractiveSupportsFocus> /** - * Forbid importing a default export by a different name. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-rename-default.md + * apply `jsx-a11y/label-has-associated-control` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/label-has-associated-control/ */ - 'import-x/no-rename-default'?: Linter.RuleEntry<ImportXNoRenameDefault> + 'astro/jsx-a11y/label-has-associated-control'?: Linter.RuleEntry<AstroJsxA11YLabelHasAssociatedControl> /** - * Enforce which files can be imported in a given folder. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-restricted-paths.md + * apply `jsx-a11y/lang` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/lang/ */ - 'import-x/no-restricted-paths'?: Linter.RuleEntry<ImportXNoRestrictedPaths> + 'astro/jsx-a11y/lang'?: Linter.RuleEntry<AstroJsxA11YLang> /** - * Forbid a module from importing itself. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-self-import.md + * apply `jsx-a11y/media-has-caption` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/media-has-caption/ */ - 'import-x/no-self-import'?: Linter.RuleEntry<[]> + 'astro/jsx-a11y/media-has-caption'?: Linter.RuleEntry<AstroJsxA11YMediaHasCaption> /** - * Forbid unassigned imports. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-unassigned-import.md + * apply `jsx-a11y/mouse-events-have-key-events` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/mouse-events-have-key-events/ */ - 'import-x/no-unassigned-import'?: Linter.RuleEntry<ImportXNoUnassignedImport> + 'astro/jsx-a11y/mouse-events-have-key-events'?: Linter.RuleEntry<AstroJsxA11YMouseEventsHaveKeyEvents> /** - * Ensure imports point to a file/module that can be resolved. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-unresolved.md + * apply `jsx-a11y/no-access-key` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-access-key/ */ - 'import-x/no-unresolved'?: Linter.RuleEntry<ImportXNoUnresolved> + 'astro/jsx-a11y/no-access-key'?: Linter.RuleEntry<AstroJsxA11YNoAccessKey> /** - * Forbid modules without exports, or exports without matching import in another module. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-unused-modules.md + * apply `jsx-a11y/no-aria-hidden-on-focusable` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-aria-hidden-on-focusable/ */ - 'import-x/no-unused-modules'?: Linter.RuleEntry<ImportXNoUnusedModules> + 'astro/jsx-a11y/no-aria-hidden-on-focusable'?: Linter.RuleEntry<AstroJsxA11YNoAriaHiddenOnFocusable> /** - * Forbid unnecessary path segments in import and require statements. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-useless-path-segments.md + * apply `jsx-a11y/no-autofocus` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-autofocus/ */ - 'import-x/no-useless-path-segments'?: Linter.RuleEntry<ImportXNoUselessPathSegments> + 'astro/jsx-a11y/no-autofocus'?: Linter.RuleEntry<AstroJsxA11YNoAutofocus> /** - * Forbid webpack loader syntax in imports. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-webpack-loader-syntax.md + * apply `jsx-a11y/no-distracting-elements` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-distracting-elements/ */ - 'import-x/no-webpack-loader-syntax'?: Linter.RuleEntry<[]> + 'astro/jsx-a11y/no-distracting-elements'?: Linter.RuleEntry<AstroJsxA11YNoDistractingElements> /** - * Enforce a convention in module import order. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/order.md + * apply `jsx-a11y/no-interactive-element-to-noninteractive-role` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-interactive-element-to-noninteractive-role/ */ - 'import-x/order'?: Linter.RuleEntry<ImportXOrder> + 'astro/jsx-a11y/no-interactive-element-to-noninteractive-role'?: Linter.RuleEntry<AstroJsxA11YNoInteractiveElementToNoninteractiveRole> /** - * Prefer a default export if module exports a single name or multiple names. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/prefer-default-export.md + * apply `jsx-a11y/no-noninteractive-element-interactions` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-noninteractive-element-interactions/ */ - 'import-x/prefer-default-export'?: Linter.RuleEntry<ImportXPreferDefaultExport> + 'astro/jsx-a11y/no-noninteractive-element-interactions'?: Linter.RuleEntry<AstroJsxA11YNoNoninteractiveElementInteractions> /** - * Enforce using namespace imports for specific modules, like `react`/`react-dom`, etc. - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/prefer-namespace-import.md + * apply `jsx-a11y/no-noninteractive-element-to-interactive-role` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-noninteractive-element-to-interactive-role/ */ - 'import-x/prefer-namespace-import'?: Linter.RuleEntry<ImportXPreferNamespaceImport> + 'astro/jsx-a11y/no-noninteractive-element-to-interactive-role'?: Linter.RuleEntry<AstroJsxA11YNoNoninteractiveElementToInteractiveRole> /** - * Forbid potentially ambiguous parse goal (`script` vs. `module`). - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/unambiguous.md + * apply `jsx-a11y/no-noninteractive-tabindex` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-noninteractive-tabindex/ */ - 'import-x/unambiguous'?: Linter.RuleEntry<[]> + 'astro/jsx-a11y/no-noninteractive-tabindex'?: Linter.RuleEntry<AstroJsxA11YNoNoninteractiveTabindex> /** - * Enforce consistent indentation - * @see https://eslint.org/docs/latest/rules/indent - * @deprecated + * apply `jsx-a11y/no-redundant-roles` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-redundant-roles/ */ - 'indent'?: Linter.RuleEntry<Indent> + 'astro/jsx-a11y/no-redundant-roles'?: Linter.RuleEntry<AstroJsxA11YNoRedundantRoles> /** - * Enforce consistent indentation - * @see https://eslint.org/docs/latest/rules/indent-legacy - * @deprecated + * apply `jsx-a11y/no-static-element-interactions` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-static-element-interactions/ */ - 'indent-legacy'?: Linter.RuleEntry<IndentLegacy> + 'astro/jsx-a11y/no-static-element-interactions'?: Linter.RuleEntry<AstroJsxA11YNoStaticElementInteractions> /** - * Require or disallow initialization in variable declarations - * @see https://eslint.org/docs/latest/rules/init-declarations + * apply `jsx-a11y/prefer-tag-over-role` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/prefer-tag-over-role/ */ - 'init-declarations'?: Linter.RuleEntry<InitDeclarations> + 'astro/jsx-a11y/prefer-tag-over-role'?: Linter.RuleEntry<AstroJsxA11YPreferTagOverRole> /** - * Checks that `@access` tags have a valid value. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-access.md#repos-sticky-header + * apply `jsx-a11y/role-has-required-aria-props` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/role-has-required-aria-props/ */ - 'jsdoc/check-access'?: Linter.RuleEntry<[]> + 'astro/jsx-a11y/role-has-required-aria-props'?: Linter.RuleEntry<AstroJsxA11YRoleHasRequiredAriaProps> /** - * Reports invalid alignment of JSDoc block asterisks. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-alignment.md#repos-sticky-header + * apply `jsx-a11y/role-supports-aria-props` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/role-supports-aria-props/ */ - 'jsdoc/check-alignment'?: Linter.RuleEntry<JsdocCheckAlignment> + 'astro/jsx-a11y/role-supports-aria-props'?: Linter.RuleEntry<AstroJsxA11YRoleSupportsAriaProps> /** - * @deprecated - Use `getJsdocProcessorPlugin` processor; ensures that (JavaScript) samples within `@example` tags adhere to ESLint rules. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-examples.md#repos-sticky-header + * apply `jsx-a11y/scope` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/scope/ */ - 'jsdoc/check-examples'?: Linter.RuleEntry<JsdocCheckExamples> + 'astro/jsx-a11y/scope'?: Linter.RuleEntry<AstroJsxA11YScope> /** - * Reports invalid padding inside JSDoc blocks. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-indentation.md#repos-sticky-header + * apply `jsx-a11y/tabindex-no-positive` rule to Astro components + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/tabindex-no-positive/ */ - 'jsdoc/check-indentation'?: Linter.RuleEntry<JsdocCheckIndentation> + 'astro/jsx-a11y/tabindex-no-positive'?: Linter.RuleEntry<AstroJsxA11YTabindexNoPositive> /** - * Reports invalid alignment of JSDoc block lines. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-line-alignment.md#repos-sticky-header + * the client:only directive is missing the correct component's framework value + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/missing-client-only-directive-value/ */ - 'jsdoc/check-line-alignment'?: Linter.RuleEntry<JsdocCheckLineAlignment> + 'astro/missing-client-only-directive-value'?: Linter.RuleEntry<[]> /** - * Checks for dupe `@param` names, that nested param names have roots, and that parameter names in function declarations match JSDoc param names. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-param-names.md#repos-sticky-header + * disallow conflicting set directives and child contents + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-conflict-set-directives/ */ - 'jsdoc/check-param-names'?: Linter.RuleEntry<JsdocCheckParamNames> + 'astro/no-conflict-set-directives'?: Linter.RuleEntry<[]> /** - * Ensures that property names in JSDoc are not duplicated on the same block and that nested properties have defined roots. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-property-names.md#repos-sticky-header + * disallow using deprecated `Astro.canonicalURL` + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-canonicalurl/ */ - 'jsdoc/check-property-names'?: Linter.RuleEntry<JsdocCheckPropertyNames> + 'astro/no-deprecated-astro-canonicalurl'?: Linter.RuleEntry<[]> /** - * Reports against syntax not valid for the mode (e.g., Google Closure Compiler in non-Closure mode). - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-syntax.md#repos-sticky-header + * disallow using deprecated `Astro.fetchContent()` + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-fetchcontent/ */ - 'jsdoc/check-syntax'?: Linter.RuleEntry<[]> + 'astro/no-deprecated-astro-fetchcontent'?: Linter.RuleEntry<[]> /** - * Reports invalid block tag names. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-tag-names.md#repos-sticky-header + * disallow using deprecated `Astro.resolve()` + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-resolve/ */ - 'jsdoc/check-tag-names'?: Linter.RuleEntry<JsdocCheckTagNames> + 'astro/no-deprecated-astro-resolve'?: Linter.RuleEntry<[]> /** - * Checks that any `@template` names are actually used in the connected `@typedef` or type alias. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-template-names.md#repos-sticky-header + * disallow using deprecated `getEntryBySlug()` + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-getentrybyslug/ */ - 'jsdoc/check-template-names'?: Linter.RuleEntry<[]> + 'astro/no-deprecated-getentrybyslug'?: Linter.RuleEntry<[]> /** - * Reports types deemed invalid (customizable and with defaults, for preventing and/or recommending replacements). - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-types.md#repos-sticky-header + * disallow value export + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-exports-from-components/ */ - 'jsdoc/check-types'?: Linter.RuleEntry<JsdocCheckTypes> + 'astro/no-exports-from-components'?: Linter.RuleEntry<[]> /** - * This rule checks the values for a handful of tags: `@version`, `@since`, `@license` and `@author`. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-values.md#repos-sticky-header + * disallow `prerender` export outside of pages/ directory + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-prerender-export-outside-pages/ */ - 'jsdoc/check-values'?: Linter.RuleEntry<JsdocCheckValues> + 'astro/no-prerender-export-outside-pages'?: Linter.RuleEntry<[]> /** - * Converts non-JSDoc comments preceding or following nodes into JSDoc ones - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/convert-to-jsdoc-comments.md#repos-sticky-header + * disallow use of `set:html` to prevent XSS attack + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-html-directive/ */ - 'jsdoc/convert-to-jsdoc-comments'?: Linter.RuleEntry<JsdocConvertToJsdocComments> + 'astro/no-set-html-directive'?: Linter.RuleEntry<[]> /** - * Checks tags that are expected to be empty (e.g., `@abstract` or `@async`), reporting if they have content - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/empty-tags.md#repos-sticky-header + * disallow use of `set:text` + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-text-directive/ */ - 'jsdoc/empty-tags'?: Linter.RuleEntry<JsdocEmptyTags> + 'astro/no-set-text-directive'?: Linter.RuleEntry<[]> /** - * Reports use of JSDoc tags in non-tag positions (in the default "typescript" mode). - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/escape-inline-tags.md#repos-sticky-header + * disallow inline `<script>` without `src` to encourage CSP-safe patterns + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unsafe-inline-scripts/ */ - 'jsdoc/escape-inline-tags'?: Linter.RuleEntry<JsdocEscapeInlineTags> + 'astro/no-unsafe-inline-scripts'?: Linter.RuleEntry<AstroNoUnsafeInlineScripts> /** - * Prohibits use of `@implements` on non-constructor functions (to enforce the tag only being used on classes/constructors). - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/implements-on-classes.md#repos-sticky-header + * disallow selectors defined in `style` tag that don't use in HTML + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unused-css-selector/ */ - 'jsdoc/implements-on-classes'?: Linter.RuleEntry<JsdocImplementsOnClasses> + 'astro/no-unused-css-selector'?: Linter.RuleEntry<[]> /** - * Reports if JSDoc `import()` statements point to a package which is not listed in `dependencies` or `devDependencies` - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/imports-as-dependencies.md#repos-sticky-header + * disallow unused `define:vars={...}` in `style` tag + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unused-define-vars-in-style/ */ - 'jsdoc/imports-as-dependencies'?: Linter.RuleEntry<[]> + 'astro/no-unused-define-vars-in-style'?: Linter.RuleEntry<[]> /** - * This rule reports doc comments that only restate their attached name. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/informative-docs.md#repos-sticky-header + * require `class:list` directives instead of `class` with expressions + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/prefer-class-list-directive/ */ - 'jsdoc/informative-docs'?: Linter.RuleEntry<JsdocInformativeDocs> + 'astro/prefer-class-list-directive'?: Linter.RuleEntry<[]> /** - * Enforces minimum number of newlines before JSDoc comment blocks - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/lines-before-block.md#repos-sticky-header + * require use object instead of ternary expression in `class:list` + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/prefer-object-class-list/ */ - 'jsdoc/lines-before-block'?: Linter.RuleEntry<JsdocLinesBeforeBlock> + 'astro/prefer-object-class-list'?: Linter.RuleEntry<[]> /** - * Enforces a regular expression pattern on descriptions. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/match-description.md#repos-sticky-header + * require use split array elements in `class:list` + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/prefer-split-class-list/ */ - 'jsdoc/match-description'?: Linter.RuleEntry<JsdocMatchDescription> + 'astro/prefer-split-class-list'?: Linter.RuleEntry<AstroPreferSplitClassList> /** - * Reports the name portion of a JSDoc tag if matching or not matching a given regular expression. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/match-name.md#repos-sticky-header + * Require or disallow semicolons instead of ASI + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/semi/ */ - 'jsdoc/match-name'?: Linter.RuleEntry<JsdocMatchName> + 'astro/semi'?: Linter.RuleEntry<AstroSemi> /** - * Controls how and whether JSDoc blocks can be expressed as single or multiple line blocks. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/multiline-blocks.md#repos-sticky-header + * enforce sorting of attributes + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/sort-attributes/ */ - 'jsdoc/multiline-blocks'?: Linter.RuleEntry<JsdocMultilineBlocks> + 'astro/sort-attributes'?: Linter.RuleEntry<AstroSortAttributes> /** - * This rule checks for multi-line-style comments which fail to meet the criteria of a JSDoc block. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-bad-blocks.md#repos-sticky-header + * disallow warnings when compiling. + * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/valid-compile/ */ - 'jsdoc/no-bad-blocks'?: Linter.RuleEntry<JsdocNoBadBlocks> + 'astro/valid-compile'?: Linter.RuleEntry<[]> /** - * If tags are present, this rule will prevent empty lines in the block description. If no tags are present, this rule will prevent extra empty lines in the block description. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-blank-block-descriptions.md#repos-sticky-header + * Enforce the use of variables within the scope they are defined + * @see https://eslint.org/docs/latest/rules/block-scoped-var */ - 'jsdoc/no-blank-block-descriptions'?: Linter.RuleEntry<[]> + 'block-scoped-var'?: Linter.RuleEntry<[]> /** - * Removes empty blocks with nothing but possibly line breaks - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-blank-blocks.md#repos-sticky-header + * Disallow or enforce spaces inside of blocks after opening block and before closing block + * @see https://eslint.org/docs/latest/rules/block-spacing + * @deprecated */ - 'jsdoc/no-blank-blocks'?: Linter.RuleEntry<JsdocNoBlankBlocks> + 'block-spacing'?: Linter.RuleEntry<BlockSpacing> /** - * This rule reports defaults being used on the relevant portion of `@param` or `@default`. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-defaults.md#repos-sticky-header + * Enforce consistent brace style for blocks + * @see https://eslint.org/docs/latest/rules/brace-style + * @deprecated */ - 'jsdoc/no-defaults'?: Linter.RuleEntry<JsdocNoDefaults> + 'brace-style'?: Linter.RuleEntry<BraceStyle> /** - * Reports when certain comment structures are always expected. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-missing-syntax.md#repos-sticky-header + * Require `return` statements after callbacks + * @see https://eslint.org/docs/latest/rules/callback-return + * @deprecated */ - 'jsdoc/no-missing-syntax'?: Linter.RuleEntry<JsdocNoMissingSyntax> + 'callback-return'?: Linter.RuleEntry<CallbackReturn> /** - * Prevents use of multiple asterisks at the beginning of lines. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-multi-asterisks.md#repos-sticky-header + * Enforce camelcase naming convention + * @see https://eslint.org/docs/latest/rules/camelcase */ - 'jsdoc/no-multi-asterisks'?: Linter.RuleEntry<JsdocNoMultiAsterisks> + 'camelcase'?: Linter.RuleEntry<Camelcase> /** - * Reports when certain comment structures are present. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-restricted-syntax.md#repos-sticky-header + * Enforce or disallow capitalization of the first letter of a comment + * @see https://eslint.org/docs/latest/rules/capitalized-comments */ - 'jsdoc/no-restricted-syntax'?: Linter.RuleEntry<JsdocNoRestrictedSyntax> + 'capitalized-comments'?: Linter.RuleEntry<CapitalizedComments> /** - * This rule reports types being used on `@param` or `@returns` (redundant with TypeScript). - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-types.md#repos-sticky-header + * Enforce that class methods utilize `this` + * @see https://eslint.org/docs/latest/rules/class-methods-use-this */ - 'jsdoc/no-types'?: Linter.RuleEntry<JsdocNoTypes> + 'class-methods-use-this'?: Linter.RuleEntry<ClassMethodsUseThis> /** - * Besides some expected built-in types, prohibits any types not specified as globals or within `@typedef`. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-undefined-types.md#repos-sticky-header + * Require or disallow trailing commas + * @see https://eslint.org/docs/latest/rules/comma-dangle + * @deprecated */ - 'jsdoc/no-undefined-types'?: Linter.RuleEntry<JsdocNoUndefinedTypes> + 'comma-dangle'?: Linter.RuleEntry<CommaDangle> /** - * Prefer `@import` tags to inline `import()` statements. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/prefer-import-tag.md#repos-sticky-header + * Enforce consistent spacing before and after commas + * @see https://eslint.org/docs/latest/rules/comma-spacing + * @deprecated */ - 'jsdoc/prefer-import-tag'?: Linter.RuleEntry<JsdocPreferImportTag> + 'comma-spacing'?: Linter.RuleEntry<CommaSpacing> /** - * Reports use of `any` or `*` type - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/reject-any-type.md#repos-sticky-header + * Enforce consistent comma style + * @see https://eslint.org/docs/latest/rules/comma-style + * @deprecated */ - 'jsdoc/reject-any-type'?: Linter.RuleEntry<[]> + 'comma-style'?: Linter.RuleEntry<CommaStyle> /** - * Reports use of `Function` type - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/reject-function-type.md#repos-sticky-header + * Comment-as-command for one-off codemod with ESLint + * @see https://github.com/antfu/eslint-plugin-command */ - 'jsdoc/reject-function-type'?: Linter.RuleEntry<[]> + 'command/command'?: Linter.RuleEntry<[]> /** - * Requires that each JSDoc line starts with an `*`. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-asterisk-prefix.md#repos-sticky-header + * Enforce a maximum cyclomatic complexity allowed in a program + * @see https://eslint.org/docs/latest/rules/complexity */ - 'jsdoc/require-asterisk-prefix'?: Linter.RuleEntry<JsdocRequireAsteriskPrefix> + 'complexity'?: Linter.RuleEntry<Complexity> /** - * Requires that all functions (and potentially other contexts) have a description. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-description.md#repos-sticky-header + * Enforce consistent spacing inside computed property brackets + * @see https://eslint.org/docs/latest/rules/computed-property-spacing + * @deprecated */ - 'jsdoc/require-description'?: Linter.RuleEntry<JsdocRequireDescription> + 'computed-property-spacing'?: Linter.RuleEntry<ComputedPropertySpacing> /** - * Requires that block description, explicit `@description`, and `@param`/`@returns` tag descriptions are written in complete sentences. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-description-complete-sentence.md#repos-sticky-header + * Require `return` statements to either always or never specify values + * @see https://eslint.org/docs/latest/rules/consistent-return */ - 'jsdoc/require-description-complete-sentence'?: Linter.RuleEntry<JsdocRequireDescriptionCompleteSentence> + 'consistent-return'?: Linter.RuleEntry<ConsistentReturn> /** - * Requires that all functions (and potentially other contexts) have examples. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-example.md#repos-sticky-header + * Enforce consistent naming when capturing the current execution context + * @see https://eslint.org/docs/latest/rules/consistent-this */ - 'jsdoc/require-example'?: Linter.RuleEntry<JsdocRequireExample> + 'consistent-this'?: Linter.RuleEntry<ConsistentThis> /** - * Checks that all files have one `@file`, `@fileoverview`, or `@overview` tag at the beginning of the file. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-file-overview.md#repos-sticky-header + * Require `super()` calls in constructors + * @see https://eslint.org/docs/latest/rules/constructor-super */ - 'jsdoc/require-file-overview'?: Linter.RuleEntry<JsdocRequireFileOverview> + 'constructor-super'?: Linter.RuleEntry<[]> /** - * Requires a hyphen before the `@param` description (and optionally before `@property` descriptions). - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-hyphen-before-param-description.md#repos-sticky-header + * Enforce consistent brace style for all control statements + * @see https://eslint.org/docs/latest/rules/curly */ - 'jsdoc/require-hyphen-before-param-description'?: Linter.RuleEntry<JsdocRequireHyphenBeforeParamDescription> + 'curly'?: Linter.RuleEntry<Curly> /** - * Checks for presence of JSDoc comments, on functions and potentially other contexts (optionally limited to exports). - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-jsdoc.md#repos-sticky-header + * Require `default` cases in `switch` statements + * @see https://eslint.org/docs/latest/rules/default-case */ - 'jsdoc/require-jsdoc'?: Linter.RuleEntry<JsdocRequireJsdoc> + 'default-case'?: Linter.RuleEntry<DefaultCase> /** - * Requires a description for `@next` tags - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-next-description.md#repos-sticky-header + * Enforce `default` clauses in `switch` statements to be last + * @see https://eslint.org/docs/latest/rules/default-case-last */ - 'jsdoc/require-next-description'?: Linter.RuleEntry<[]> + 'default-case-last'?: Linter.RuleEntry<[]> /** - * Requires a type for `@next` tags - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-next-type.md#repos-sticky-header + * Enforce default parameters to be last + * @see https://eslint.org/docs/latest/rules/default-param-last */ - 'jsdoc/require-next-type'?: Linter.RuleEntry<[]> + 'default-param-last'?: Linter.RuleEntry<[]> /** - * Requires that all function parameters are documented with a `@param` tag. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param.md#repos-sticky-header + * Enforce consistent newlines before and after dots + * @see https://eslint.org/docs/latest/rules/dot-location + * @deprecated */ - 'jsdoc/require-param'?: Linter.RuleEntry<JsdocRequireParam> + 'dot-location'?: Linter.RuleEntry<DotLocation> /** - * Requires that each `@param` tag has a `description` value. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-description.md#repos-sticky-header + * Enforce dot notation whenever possible + * @see https://eslint.org/docs/latest/rules/dot-notation */ - 'jsdoc/require-param-description'?: Linter.RuleEntry<JsdocRequireParamDescription> + 'dot-notation'?: Linter.RuleEntry<DotNotation> /** - * Requires that all `@param` tags have names. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-name.md#repos-sticky-header + * Require or disallow newline at the end of files + * @see https://eslint.org/docs/latest/rules/eol-last + * @deprecated */ - 'jsdoc/require-param-name'?: Linter.RuleEntry<JsdocRequireParamName> + 'eol-last'?: Linter.RuleEntry<EolLast> /** - * Requires that each `@param` tag has a type value (in curly brackets). - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-type.md#repos-sticky-header + * Require the use of `===` and `!==` + * @see https://eslint.org/docs/latest/rules/eqeqeq */ - 'jsdoc/require-param-type'?: Linter.RuleEntry<JsdocRequireParamType> + 'eqeqeq'?: Linter.RuleEntry<Eqeqeq> /** - * Requires that all `@typedef` and `@namespace` tags have `@property` when their type is a plain `object`, `Object`, or `PlainObject`. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property.md#repos-sticky-header + * Avoid using TypeScript's enums. + * @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/enums.md */ - 'jsdoc/require-property'?: Linter.RuleEntry<[]> + 'erasable-syntax-only/enums'?: Linter.RuleEntry<[]> /** - * Requires that each `@property` tag has a `description` value. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-description.md#repos-sticky-header + * Avoid using TypeScript's import aliases. + * @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/import-aliases.md */ - 'jsdoc/require-property-description'?: Linter.RuleEntry<[]> + 'erasable-syntax-only/import-aliases'?: Linter.RuleEntry<[]> /** - * Requires that all `@property` tags have names. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-name.md#repos-sticky-header + * Avoid using TypeScript's namespaces. + * @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/namespaces.md */ - 'jsdoc/require-property-name'?: Linter.RuleEntry<[]> + 'erasable-syntax-only/namespaces'?: Linter.RuleEntry<[]> /** - * Requires that each `@property` tag has a type value (in curly brackets). - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-type.md#repos-sticky-header + * Avoid using TypeScript's class parameter properties. + * @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/parameter-properties.md */ - 'jsdoc/require-property-type'?: Linter.RuleEntry<[]> + 'erasable-syntax-only/parameter-properties'?: Linter.RuleEntry<[]> /** - * Requires that Promise rejections are documented with `@rejects` tags. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-rejects.md#repos-sticky-header + * require a `eslint-enable` comment for every `eslint-disable` comment + * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/disable-enable-pair.html */ - 'jsdoc/require-rejects'?: Linter.RuleEntry<JsdocRequireRejects> + 'eslint-comments/disable-enable-pair'?: Linter.RuleEntry<EslintCommentsDisableEnablePair> /** - * Requires that returns are documented with `@returns`. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns.md#repos-sticky-header + * disallow a `eslint-enable` comment for multiple `eslint-disable` comments + * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-aggregating-enable.html */ - 'jsdoc/require-returns'?: Linter.RuleEntry<JsdocRequireReturns> + 'eslint-comments/no-aggregating-enable'?: Linter.RuleEntry<[]> /** - * Requires a return statement in function body if a `@returns` tag is specified in JSDoc comment(and reports if multiple `@returns` tags are present). - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-check.md#repos-sticky-header + * disallow duplicate `eslint-disable` comments + * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-duplicate-disable.html */ - 'jsdoc/require-returns-check'?: Linter.RuleEntry<JsdocRequireReturnsCheck> + 'eslint-comments/no-duplicate-disable'?: Linter.RuleEntry<[]> /** - * Requires that the `@returns` tag has a `description` value (not including `void`/`undefined` type returns). - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-description.md#repos-sticky-header + * disallow `eslint-disable` comments about specific rules + * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-restricted-disable.html */ - 'jsdoc/require-returns-description'?: Linter.RuleEntry<JsdocRequireReturnsDescription> + 'eslint-comments/no-restricted-disable'?: Linter.RuleEntry<EslintCommentsNoRestrictedDisable> /** - * Requires that `@returns` tag has type value (in curly brackets). - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-type.md#repos-sticky-header + * disallow `eslint-disable` comments without rule names + * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unlimited-disable.html */ - 'jsdoc/require-returns-type'?: Linter.RuleEntry<JsdocRequireReturnsType> + 'eslint-comments/no-unlimited-disable'?: Linter.RuleEntry<[]> /** - * Requires tags be present, optionally for specific contexts - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-tags.md#repos-sticky-header + * disallow unused `eslint-disable` comments + * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unused-disable.html + * @deprecated */ - 'jsdoc/require-tags'?: Linter.RuleEntry<JsdocRequireTags> + 'eslint-comments/no-unused-disable'?: Linter.RuleEntry<[]> /** - * Requires `@template` tags be present when type parameters are used. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template.md#repos-sticky-header + * disallow unused `eslint-enable` comments + * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unused-enable.html */ - 'jsdoc/require-template'?: Linter.RuleEntry<JsdocRequireTemplate> + 'eslint-comments/no-unused-enable'?: Linter.RuleEntry<[]> /** - * Requires a description for `@template` tags - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template-description.md#repos-sticky-header + * disallow ESLint directive-comments + * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-use.html */ - 'jsdoc/require-template-description'?: Linter.RuleEntry<[]> + 'eslint-comments/no-use'?: Linter.RuleEntry<EslintCommentsNoUse> /** - * Requires that throw statements are documented with `@throws` tags. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws.md#repos-sticky-header + * require include descriptions in ESLint directive-comments + * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/require-description.html */ - 'jsdoc/require-throws'?: Linter.RuleEntry<JsdocRequireThrows> + 'eslint-comments/require-description'?: Linter.RuleEntry<EslintCommentsRequireDescription> /** - * Requires a description for `@throws` tags - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws-description.md#repos-sticky-header + * Enforce `for` loop update clause moving the counter in the right direction + * @see https://eslint.org/docs/latest/rules/for-direction */ - 'jsdoc/require-throws-description'?: Linter.RuleEntry<[]> + 'for-direction'?: Linter.RuleEntry<[]> /** - * Requires a type for `@throws` tags - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws-type.md#repos-sticky-header + * Require or disallow spacing between function identifiers and their invocations + * @see https://eslint.org/docs/latest/rules/func-call-spacing + * @deprecated */ - 'jsdoc/require-throws-type'?: Linter.RuleEntry<[]> + 'func-call-spacing'?: Linter.RuleEntry<FuncCallSpacing> /** - * Requires yields are documented with `@yields` tags. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields.md#repos-sticky-header + * Require function names to match the name of the variable or property to which they are assigned + * @see https://eslint.org/docs/latest/rules/func-name-matching */ - 'jsdoc/require-yields'?: Linter.RuleEntry<JsdocRequireYields> + 'func-name-matching'?: Linter.RuleEntry<FuncNameMatching> /** - * Ensures that if a `@yields` is present that a `yield` (or `yield` with a value) is present in the function body (or that if a `@next` is present that there is a yield with a return value present). - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-check.md#repos-sticky-header + * Require or disallow named `function` expressions + * @see https://eslint.org/docs/latest/rules/func-names */ - 'jsdoc/require-yields-check'?: Linter.RuleEntry<JsdocRequireYieldsCheck> + 'func-names'?: Linter.RuleEntry<FuncNames> /** - * Requires a description for `@yields` tags - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-description.md#repos-sticky-header + * Enforce the consistent use of either `function` declarations or expressions assigned to variables + * @see https://eslint.org/docs/latest/rules/func-style */ - 'jsdoc/require-yields-description'?: Linter.RuleEntry<[]> + 'func-style'?: Linter.RuleEntry<FuncStyle> /** - * Requires a type for `@yields` tags - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-type.md#repos-sticky-header + * Enforce line breaks between arguments of a function call + * @see https://eslint.org/docs/latest/rules/function-call-argument-newline + * @deprecated */ - 'jsdoc/require-yields-type'?: Linter.RuleEntry<[]> + 'function-call-argument-newline'?: Linter.RuleEntry<FunctionCallArgumentNewline> /** - * Sorts tags by a specified sequence according to tag name, optionally adding line breaks between tag groups. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/sort-tags.md#repos-sticky-header + * Enforce consistent line breaks inside function parentheses + * @see https://eslint.org/docs/latest/rules/function-paren-newline + * @deprecated */ - 'jsdoc/sort-tags'?: Linter.RuleEntry<JsdocSortTags> + 'function-paren-newline'?: Linter.RuleEntry<FunctionParenNewline> /** - * Enforces lines (or no lines) before, after, or between tags. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/tag-lines.md#repos-sticky-header + * Enforce consistent spacing around `*` operators in generator functions + * @see https://eslint.org/docs/latest/rules/generator-star-spacing + * @deprecated */ - 'jsdoc/tag-lines'?: Linter.RuleEntry<JsdocTagLines> + 'generator-star-spacing'?: Linter.RuleEntry<GeneratorStarSpacing> /** - * Auto-escape certain characters that are input within block and tag descriptions. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/text-escaping.md#repos-sticky-header + * Enforce `return` statements in getters + * @see https://eslint.org/docs/latest/rules/getter-return */ - 'jsdoc/text-escaping'?: Linter.RuleEntry<JsdocTextEscaping> + 'getter-return'?: Linter.RuleEntry<GetterReturn> /** - * Prefers either function properties or method signatures - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-method-signature-style.md#repos-sticky-header + * Require `require()` calls to be placed at top-level module scope + * @see https://eslint.org/docs/latest/rules/global-require + * @deprecated */ - 'jsdoc/ts-method-signature-style'?: Linter.RuleEntry<JsdocTsMethodSignatureStyle> + 'global-require'?: Linter.RuleEntry<[]> /** - * Warns against use of the empty object type - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-empty-object-type.md#repos-sticky-header + * Require grouped accessor pairs in object literals and classes + * @see https://eslint.org/docs/latest/rules/grouped-accessor-pairs */ - 'jsdoc/ts-no-empty-object-type'?: Linter.RuleEntry<[]> + 'grouped-accessor-pairs'?: Linter.RuleEntry<GroupedAccessorPairs> /** - * Catches unnecessary template expressions such as string expressions within a template literal. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-unnecessary-template-expression.md#repos-sticky-header + * Require `for-in` loops to include an `if` statement + * @see https://eslint.org/docs/latest/rules/guard-for-in */ - 'jsdoc/ts-no-unnecessary-template-expression'?: Linter.RuleEntry<JsdocTsNoUnnecessaryTemplateExpression> + 'guard-for-in'?: Linter.RuleEntry<[]> /** - * Prefers function types over call signatures when there are no other properties. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-prefer-function-type.md#repos-sticky-header + * Require error handling in callbacks + * @see https://eslint.org/docs/latest/rules/handle-callback-err + * @deprecated */ - 'jsdoc/ts-prefer-function-type'?: Linter.RuleEntry<JsdocTsPreferFunctionType> + 'handle-callback-err'?: Linter.RuleEntry<HandleCallbackErr> /** - * Formats JSDoc type values. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/type-formatting.md#repos-sticky-header + * Disallow specified identifiers + * @see https://eslint.org/docs/latest/rules/id-blacklist + * @deprecated */ - 'jsdoc/type-formatting'?: Linter.RuleEntry<JsdocTypeFormatting> + 'id-blacklist'?: Linter.RuleEntry<IdBlacklist> /** - * Requires all types/namepaths to be valid JSDoc, Closure compiler, or TypeScript types (configurable in settings). - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/valid-types.md#repos-sticky-header + * Disallow specified identifiers + * @see https://eslint.org/docs/latest/rules/id-denylist */ - 'jsdoc/valid-types'?: Linter.RuleEntry<JsdocValidTypes> + 'id-denylist'?: Linter.RuleEntry<IdDenylist> /** - * validate object with JSON Schema. - * @see https://ota-meshi.github.io/eslint-plugin-json-schema-validator/rules/no-invalid.html + * Enforce minimum and maximum identifier lengths + * @see https://eslint.org/docs/latest/rules/id-length */ - 'json-schema-validator/no-invalid'?: Linter.RuleEntry<JsonSchemaValidatorNoInvalid> + 'id-length'?: Linter.RuleEntry<IdLength> /** - * enforce line breaks after opening and before closing array brackets - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-newline.html + * Require identifiers to match a specified regular expression + * @see https://eslint.org/docs/latest/rules/id-match */ - 'jsonc/array-bracket-newline'?: Linter.RuleEntry<JsoncArrayBracketNewline> + 'id-match'?: Linter.RuleEntry<IdMatch> /** - * disallow or enforce spaces inside of brackets - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-spacing.html + * Enforce the location of arrow function bodies + * @see https://eslint.org/docs/latest/rules/implicit-arrow-linebreak + * @deprecated */ - 'jsonc/array-bracket-spacing'?: Linter.RuleEntry<JsoncArrayBracketSpacing> + 'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak> /** - * enforce line breaks between array elements - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-element-newline.html + * Enforce or ban the use of inline type-only markers for named imports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/consistent-type-specifier-style.md */ - 'jsonc/array-element-newline'?: Linter.RuleEntry<JsoncArrayElementNewline> + 'import-x/consistent-type-specifier-style'?: Linter.RuleEntry<ImportXConsistentTypeSpecifierStyle> /** - * apply jsonc rules similar to your configured ESLint core rules - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/auto.html + * Ensure a default export is present, given a default import. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/default.md */ - 'jsonc/auto'?: Linter.RuleEntry<[]> + 'import-x/default'?: Linter.RuleEntry<[]> /** - * require or disallow trailing commas - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-dangle.html + * Enforce a leading comment with the webpackChunkName for dynamic imports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/dynamic-import-chunkname.md */ - 'jsonc/comma-dangle'?: Linter.RuleEntry<JsoncCommaDangle> + 'import-x/dynamic-import-chunkname'?: Linter.RuleEntry<ImportXDynamicImportChunkname> /** - * enforce consistent comma style - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-style.html + * Forbid any invalid exports, i.e. re-export of the same name. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/export.md */ - 'jsonc/comma-style'?: Linter.RuleEntry<JsoncCommaStyle> + 'import-x/export'?: Linter.RuleEntry<[]> /** - * enforce consistent indentation - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/indent.html + * Ensure all exports appear after other statements. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/exports-last.md */ - 'jsonc/indent'?: Linter.RuleEntry<JsoncIndent> + 'import-x/exports-last'?: Linter.RuleEntry<[]> /** - * enforce naming convention to property key names - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-name-casing.html + * Ensure consistent use of file extension within the import path. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/extensions.md */ - 'jsonc/key-name-casing'?: Linter.RuleEntry<JsoncKeyNameCasing> + 'import-x/extensions'?: Linter.RuleEntry<ImportXExtensions> /** - * enforce consistent spacing between keys and values in object literal properties - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-spacing.html + * Ensure all imports appear before other statements. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/first.md */ - 'jsonc/key-spacing'?: Linter.RuleEntry<JsoncKeySpacing> + 'import-x/first'?: Linter.RuleEntry<ImportXFirst> /** - * disallow BigInt literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-bigint-literals.html + * Prefer named exports to be grouped together in a single export declaration. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/group-exports.md */ - 'jsonc/no-bigint-literals'?: Linter.RuleEntry<[]> + 'import-x/group-exports'?: Linter.RuleEntry<[]> /** - * disallow binary expression - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-expression.html + * Replaced by `import-x/first`. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/imports-first.md + * @deprecated */ - 'jsonc/no-binary-expression'?: Linter.RuleEntry<[]> + 'import-x/imports-first'?: Linter.RuleEntry<ImportXImportsFirst> /** - * disallow binary numeric literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-numeric-literals.html + * Enforce the maximum number of dependencies a module can have. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/max-dependencies.md */ - 'jsonc/no-binary-numeric-literals'?: Linter.RuleEntry<[]> + 'import-x/max-dependencies'?: Linter.RuleEntry<ImportXMaxDependencies> /** - * disallow comments - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-comments.html + * Ensure named imports correspond to a named export in the remote file. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/named.md */ - 'jsonc/no-comments'?: Linter.RuleEntry<[]> + 'import-x/named'?: Linter.RuleEntry<ImportXNamed> /** - * disallow duplicate keys in object literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-dupe-keys.html + * Ensure imported namespaces contain dereferenced properties as they are dereferenced. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/namespace.md */ - 'jsonc/no-dupe-keys'?: Linter.RuleEntry<[]> + 'import-x/namespace'?: Linter.RuleEntry<ImportXNamespace> /** - * disallow escape sequences in identifiers. - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-escape-sequence-in-identifier.html + * Enforce a newline after import statements. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/newline-after-import.md */ - 'jsonc/no-escape-sequence-in-identifier'?: Linter.RuleEntry<[]> + 'import-x/newline-after-import'?: Linter.RuleEntry<ImportXNewlineAfterImport> /** - * disallow leading or trailing decimal points in numeric literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-floating-decimal.html + * Forbid import of modules using absolute paths. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-absolute-path.md */ - 'jsonc/no-floating-decimal'?: Linter.RuleEntry<[]> + 'import-x/no-absolute-path'?: Linter.RuleEntry<ImportXNoAbsolutePath> /** - * disallow hexadecimal numeric literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-hexadecimal-numeric-literals.html + * Forbid AMD `require` and `define` calls. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-amd.md */ - 'jsonc/no-hexadecimal-numeric-literals'?: Linter.RuleEntry<[]> + 'import-x/no-amd'?: Linter.RuleEntry<[]> /** - * disallow Infinity - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-infinity.html + * Forbid anonymous values as default exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-anonymous-default-export.md */ - 'jsonc/no-infinity'?: Linter.RuleEntry<[]> + 'import-x/no-anonymous-default-export'?: Linter.RuleEntry<ImportXNoAnonymousDefaultExport> /** - * disallow irregular whitespace - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-irregular-whitespace.html + * Forbid CommonJS `require` calls and `module.exports` or `exports.*`. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-commonjs.md */ - 'jsonc/no-irregular-whitespace'?: Linter.RuleEntry<JsoncNoIrregularWhitespace> + 'import-x/no-commonjs'?: Linter.RuleEntry<ImportXNoCommonjs> /** - * disallow multiline strings - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-multi-str.html + * Forbid a module from importing a module with a dependency path back to itself. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-cycle.md */ - 'jsonc/no-multi-str'?: Linter.RuleEntry<[]> + 'import-x/no-cycle'?: Linter.RuleEntry<ImportXNoCycle> /** - * disallow NaN - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-nan.html + * Forbid default exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-default-export.md */ - 'jsonc/no-nan'?: Linter.RuleEntry<[]> + 'import-x/no-default-export'?: Linter.RuleEntry<[]> /** - * disallow number property keys - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-number-props.html + * Forbid imported names marked with `@deprecated` documentation tag. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-deprecated.md */ - 'jsonc/no-number-props'?: Linter.RuleEntry<[]> + 'import-x/no-deprecated'?: Linter.RuleEntry<[]> /** - * disallow numeric separators - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-numeric-separators.html + * Forbid repeated import of the same module in multiple places. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-duplicates.md */ - 'jsonc/no-numeric-separators'?: Linter.RuleEntry<[]> + 'import-x/no-duplicates'?: Linter.RuleEntry<ImportXNoDuplicates> /** - * disallow legacy octal literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal.html + * Forbid `require()` calls with expressions. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-dynamic-require.md */ - 'jsonc/no-octal'?: Linter.RuleEntry<[]> + 'import-x/no-dynamic-require'?: Linter.RuleEntry<ImportXNoDynamicRequire> /** - * disallow octal escape sequences in string literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-escape.html + * Forbid empty named import blocks. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-empty-named-blocks.md */ - 'jsonc/no-octal-escape'?: Linter.RuleEntry<[]> + 'import-x/no-empty-named-blocks'?: Linter.RuleEntry<[]> /** - * disallow octal numeric literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-numeric-literals.html + * Forbid the use of extraneous packages. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-extraneous-dependencies.md */ - 'jsonc/no-octal-numeric-literals'?: Linter.RuleEntry<[]> + 'import-x/no-extraneous-dependencies'?: Linter.RuleEntry<ImportXNoExtraneousDependencies> /** - * disallow parentheses around the expression - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-parenthesized.html + * Forbid import statements with CommonJS module.exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-import-module-exports.md */ - 'jsonc/no-parenthesized'?: Linter.RuleEntry<[]> + 'import-x/no-import-module-exports'?: Linter.RuleEntry<ImportXNoImportModuleExports> /** - * disallow plus sign - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-plus-sign.html + * Forbid importing the submodules of other modules. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-internal-modules.md */ - 'jsonc/no-plus-sign'?: Linter.RuleEntry<[]> + 'import-x/no-internal-modules'?: Linter.RuleEntry<ImportXNoInternalModules> /** - * disallow RegExp literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-regexp-literals.html + * Forbid the use of mutable exports with `var` or `let`. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-mutable-exports.md */ - 'jsonc/no-regexp-literals'?: Linter.RuleEntry<[]> + 'import-x/no-mutable-exports'?: Linter.RuleEntry<[]> /** - * disallow sparse arrays - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-sparse-arrays.html + * Forbid use of exported name as identifier of default export. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-named-as-default.md */ - 'jsonc/no-sparse-arrays'?: Linter.RuleEntry<[]> + 'import-x/no-named-as-default'?: Linter.RuleEntry<[]> /** - * disallow template literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-template-literals.html + * Forbid use of exported name as property of default export. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-named-as-default-member.md */ - 'jsonc/no-template-literals'?: Linter.RuleEntry<[]> + 'import-x/no-named-as-default-member'?: Linter.RuleEntry<[]> /** - * disallow `undefined` - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-undefined-value.html + * Forbid named default exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-named-default.md */ - 'jsonc/no-undefined-value'?: Linter.RuleEntry<[]> + 'import-x/no-named-default'?: Linter.RuleEntry<[]> /** - * disallow Unicode code point escape sequences. - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-unicode-codepoint-escapes.html + * Forbid named exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-named-export.md */ - 'jsonc/no-unicode-codepoint-escapes'?: Linter.RuleEntry<[]> + 'import-x/no-named-export'?: Linter.RuleEntry<[]> /** - * disallow unnecessary escape usage - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-useless-escape.html + * Forbid namespace (a.k.a. "wildcard" `*`) imports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-namespace.md */ - 'jsonc/no-useless-escape'?: Linter.RuleEntry<JsoncNoUselessEscape> + 'import-x/no-namespace'?: Linter.RuleEntry<ImportXNoNamespace> /** - * enforce consistent line breaks inside braces - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-newline.html + * Forbid Node.js builtin modules. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-nodejs-modules.md */ - 'jsonc/object-curly-newline'?: Linter.RuleEntry<JsoncObjectCurlyNewline> + 'import-x/no-nodejs-modules'?: Linter.RuleEntry<ImportXNoNodejsModules> /** - * enforce consistent spacing inside braces - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-spacing.html + * Forbid importing packages through relative paths. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-relative-packages.md */ - 'jsonc/object-curly-spacing'?: Linter.RuleEntry<JsoncObjectCurlySpacing> + 'import-x/no-relative-packages'?: Linter.RuleEntry<ImportXNoRelativePackages> /** - * enforce placing object properties on separate lines - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-property-newline.html + * Forbid importing modules from parent directories. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-relative-parent-imports.md */ - 'jsonc/object-property-newline'?: Linter.RuleEntry<JsoncObjectPropertyNewline> + 'import-x/no-relative-parent-imports'?: Linter.RuleEntry<ImportXNoRelativeParentImports> /** - * require quotes around object literal property names - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quote-props.html + * Forbid importing a default export by a different name. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-rename-default.md */ - 'jsonc/quote-props'?: Linter.RuleEntry<JsoncQuoteProps> + 'import-x/no-rename-default'?: Linter.RuleEntry<ImportXNoRenameDefault> /** - * enforce use of double or single quotes - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quotes.html + * Enforce which files can be imported in a given folder. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-restricted-paths.md */ - 'jsonc/quotes'?: Linter.RuleEntry<JsoncQuotes> + 'import-x/no-restricted-paths'?: Linter.RuleEntry<ImportXNoRestrictedPaths> /** - * require array values to be sorted - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-array-values.html + * Forbid a module from importing itself. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-self-import.md */ - 'jsonc/sort-array-values'?: Linter.RuleEntry<JsoncSortArrayValues> + 'import-x/no-self-import'?: Linter.RuleEntry<[]> /** - * require object keys to be sorted - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-keys.html + * Forbid unassigned imports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-unassigned-import.md */ - 'jsonc/sort-keys'?: Linter.RuleEntry<JsoncSortKeys> + 'import-x/no-unassigned-import'?: Linter.RuleEntry<ImportXNoUnassignedImport> /** - * disallow spaces after unary operators - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/space-unary-ops.html + * Ensure imports point to a file/module that can be resolved. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-unresolved.md */ - 'jsonc/space-unary-ops'?: Linter.RuleEntry<JsoncSpaceUnaryOps> + 'import-x/no-unresolved'?: Linter.RuleEntry<ImportXNoUnresolved> /** - * disallow invalid number for JSON - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/valid-json-number.html + * Forbid modules without exports, or exports without matching import in another module. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-unused-modules.md */ - 'jsonc/valid-json-number'?: Linter.RuleEntry<[]> + 'import-x/no-unused-modules'?: Linter.RuleEntry<ImportXNoUnusedModules> /** - * disallow parsing errors in Vue custom blocks - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/vue-custom-block/no-parsing-error.html + * Forbid unnecessary path segments in import and require statements. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-useless-path-segments.md */ - 'jsonc/vue-custom-block/no-parsing-error'?: Linter.RuleEntry<[]> + 'import-x/no-useless-path-segments'?: Linter.RuleEntry<ImportXNoUselessPathSegments> /** - * Enforce emojis are wrapped in `<span>` and provide screen reader access. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md - * @deprecated + * Forbid webpack loader syntax in imports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-webpack-loader-syntax.md */ - 'jsx-a11y/accessible-emoji'?: Linter.RuleEntry<JsxA11YAccessibleEmoji> + 'import-x/no-webpack-loader-syntax'?: Linter.RuleEntry<[]> /** - * Enforce all elements that require alternative text have meaningful information to relay back to end user. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/alt-text.md + * Enforce a convention in module import order. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/order.md */ - 'jsx-a11y/alt-text'?: Linter.RuleEntry<JsxA11YAltText> + 'import-x/order'?: Linter.RuleEntry<ImportXOrder> /** - * Enforce `<a>` text to not exactly match "click here", "here", "link", or "a link". - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-ambiguous-text.md + * Prefer a default export if module exports a single name or multiple names. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/prefer-default-export.md */ - 'jsx-a11y/anchor-ambiguous-text'?: Linter.RuleEntry<JsxA11YAnchorAmbiguousText> + 'import-x/prefer-default-export'?: Linter.RuleEntry<ImportXPreferDefaultExport> /** - * Enforce all anchors to contain accessible content. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-has-content.md + * Enforce using namespace imports for specific modules, like `react`/`react-dom`, etc. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/prefer-namespace-import.md */ - 'jsx-a11y/anchor-has-content'?: Linter.RuleEntry<JsxA11YAnchorHasContent> + 'import-x/prefer-namespace-import'?: Linter.RuleEntry<ImportXPreferNamespaceImport> /** - * Enforce all anchors are valid, navigable elements. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-is-valid.md + * Forbid potentially ambiguous parse goal (`script` vs. `module`). + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/unambiguous.md */ - 'jsx-a11y/anchor-is-valid'?: Linter.RuleEntry<JsxA11YAnchorIsValid> + 'import-x/unambiguous'?: Linter.RuleEntry<[]> /** - * Enforce elements with aria-activedescendant are tabbable. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-activedescendant-has-tabindex.md + * Enforce consistent indentation + * @see https://eslint.org/docs/latest/rules/indent + * @deprecated */ - 'jsx-a11y/aria-activedescendant-has-tabindex'?: Linter.RuleEntry<JsxA11YAriaActivedescendantHasTabindex> + 'indent'?: Linter.RuleEntry<Indent> /** - * Enforce all `aria-*` props are valid. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-props.md + * Enforce consistent indentation + * @see https://eslint.org/docs/latest/rules/indent-legacy + * @deprecated */ - 'jsx-a11y/aria-props'?: Linter.RuleEntry<JsxA11YAriaProps> + 'indent-legacy'?: Linter.RuleEntry<IndentLegacy> /** - * Enforce ARIA state and property values are valid. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-proptypes.md + * Require or disallow initialization in variable declarations + * @see https://eslint.org/docs/latest/rules/init-declarations */ - 'jsx-a11y/aria-proptypes'?: Linter.RuleEntry<JsxA11YAriaProptypes> + 'init-declarations'?: Linter.RuleEntry<InitDeclarations> /** - * Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-role.md + * Checks that `@access` tags have a valid value. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-access.md#repos-sticky-header */ - 'jsx-a11y/aria-role'?: Linter.RuleEntry<JsxA11YAriaRole> + 'jsdoc/check-access'?: Linter.RuleEntry<[]> /** - * Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md + * Reports invalid alignment of JSDoc block asterisks. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-alignment.md#repos-sticky-header */ - 'jsx-a11y/aria-unsupported-elements'?: Linter.RuleEntry<JsxA11YAriaUnsupportedElements> + 'jsdoc/check-alignment'?: Linter.RuleEntry<JsdocCheckAlignment> /** - * Enforce that autocomplete attributes are used correctly. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md + * @deprecated - Use `getJsdocProcessorPlugin` processor; ensures that (JavaScript) samples within `@example` tags adhere to ESLint rules. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-examples.md#repos-sticky-header */ - 'jsx-a11y/autocomplete-valid'?: Linter.RuleEntry<JsxA11YAutocompleteValid> + 'jsdoc/check-examples'?: Linter.RuleEntry<JsdocCheckExamples> /** - * Enforce a clickable non-interactive element has at least one keyboard event listener. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/click-events-have-key-events.md + * Reports invalid padding inside JSDoc blocks. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-indentation.md#repos-sticky-header */ - 'jsx-a11y/click-events-have-key-events'?: Linter.RuleEntry<JsxA11YClickEventsHaveKeyEvents> + 'jsdoc/check-indentation'?: Linter.RuleEntry<JsdocCheckIndentation> /** - * Enforce that a control (an interactive element) has a text label. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md + * Reports invalid alignment of JSDoc block lines. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-line-alignment.md#repos-sticky-header */ - 'jsx-a11y/control-has-associated-label'?: Linter.RuleEntry<JsxA11YControlHasAssociatedLabel> + 'jsdoc/check-line-alignment'?: Linter.RuleEntry<JsdocCheckLineAlignment> /** - * Enforce heading (`h1`, `h2`, etc) elements contain accessible content. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md + * Checks for dupe `@param` names, that nested param names have roots, and that parameter names in function declarations match JSDoc param names. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-param-names.md#repos-sticky-header */ - 'jsx-a11y/heading-has-content'?: Linter.RuleEntry<JsxA11YHeadingHasContent> + 'jsdoc/check-param-names'?: Linter.RuleEntry<JsdocCheckParamNames> /** - * Enforce `<html>` element has `lang` prop. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md + * Ensures that property names in JSDoc are not duplicated on the same block and that nested properties have defined roots. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-property-names.md#repos-sticky-header */ - 'jsx-a11y/html-has-lang'?: Linter.RuleEntry<JsxA11YHtmlHasLang> + 'jsdoc/check-property-names'?: Linter.RuleEntry<JsdocCheckPropertyNames> /** - * Enforce iframe elements have a title attribute. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md + * Reports against syntax not valid for the mode (e.g., Google Closure Compiler in non-Closure mode). + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-syntax.md#repos-sticky-header */ - 'jsx-a11y/iframe-has-title'?: Linter.RuleEntry<JsxA11YIframeHasTitle> + 'jsdoc/check-syntax'?: Linter.RuleEntry<[]> /** - * Enforce `<img>` alt prop does not contain the word "image", "picture", or "photo". - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/img-redundant-alt.md + * Reports invalid block tag names. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-tag-names.md#repos-sticky-header */ - 'jsx-a11y/img-redundant-alt'?: Linter.RuleEntry<JsxA11YImgRedundantAlt> + 'jsdoc/check-tag-names'?: Linter.RuleEntry<JsdocCheckTagNames> /** - * Enforce that elements with interactive handlers like `onClick` must be focusable. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/interactive-supports-focus.md + * Checks that any `@template` names are actually used in the connected `@typedef` or type alias. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-template-names.md#repos-sticky-header */ - 'jsx-a11y/interactive-supports-focus'?: Linter.RuleEntry<JsxA11YInteractiveSupportsFocus> + 'jsdoc/check-template-names'?: Linter.RuleEntry<[]> /** - * Enforce that a `label` tag has a text label and an associated control. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md + * Reports types deemed invalid (customizable and with defaults, for preventing and/or recommending replacements). + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-types.md#repos-sticky-header */ - 'jsx-a11y/label-has-associated-control'?: Linter.RuleEntry<JsxA11YLabelHasAssociatedControl> + 'jsdoc/check-types'?: Linter.RuleEntry<JsdocCheckTypes> /** - * Enforce that `<label>` elements have the `htmlFor` prop. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/label-has-for.md - * @deprecated + * This rule checks the values for a handful of tags: `@version`, `@since`, `@license` and `@author`. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-values.md#repos-sticky-header */ - 'jsx-a11y/label-has-for'?: Linter.RuleEntry<JsxA11YLabelHasFor> + 'jsdoc/check-values'?: Linter.RuleEntry<JsdocCheckValues> /** - * Enforce lang attribute has a valid value. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/lang.md + * Converts non-JSDoc comments preceding or following nodes into JSDoc ones + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/convert-to-jsdoc-comments.md#repos-sticky-header */ - 'jsx-a11y/lang'?: Linter.RuleEntry<JsxA11YLang> + 'jsdoc/convert-to-jsdoc-comments'?: Linter.RuleEntry<JsdocConvertToJsdocComments> /** - * Enforces that `<audio>` and `<video>` elements must have a `<track>` for captions. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/media-has-caption.md + * Checks tags that are expected to be empty (e.g., `@abstract` or `@async`), reporting if they have content + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/empty-tags.md#repos-sticky-header */ - 'jsx-a11y/media-has-caption'?: Linter.RuleEntry<JsxA11YMediaHasCaption> + 'jsdoc/empty-tags'?: Linter.RuleEntry<JsdocEmptyTags> /** - * Enforce that `onMouseOver`/`onMouseOut` are accompanied by `onFocus`/`onBlur` for keyboard-only users. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/mouse-events-have-key-events.md + * Reports use of JSDoc tags in non-tag positions (in the default "typescript" mode). + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/escape-inline-tags.md#repos-sticky-header */ - 'jsx-a11y/mouse-events-have-key-events'?: Linter.RuleEntry<JsxA11YMouseEventsHaveKeyEvents> + 'jsdoc/escape-inline-tags'?: Linter.RuleEntry<JsdocEscapeInlineTags> /** - * Enforce that the `accessKey` prop is not used on any element to avoid complications with keyboard commands used by a screen reader. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-access-key.md + * Prohibits use of `@implements` on non-constructor functions (to enforce the tag only being used on classes/constructors). + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/implements-on-classes.md#repos-sticky-header */ - 'jsx-a11y/no-access-key'?: Linter.RuleEntry<JsxA11YNoAccessKey> + 'jsdoc/implements-on-classes'?: Linter.RuleEntry<JsdocImplementsOnClasses> /** - * Disallow `aria-hidden="true"` from being set on focusable elements. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-aria-hidden-on-focusable.md + * Reports if JSDoc `import()` statements point to a package which is not listed in `dependencies` or `devDependencies` + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/imports-as-dependencies.md#repos-sticky-header */ - 'jsx-a11y/no-aria-hidden-on-focusable'?: Linter.RuleEntry<JsxA11YNoAriaHiddenOnFocusable> + 'jsdoc/imports-as-dependencies'?: Linter.RuleEntry<[]> /** - * Enforce autoFocus prop is not used. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-autofocus.md + * This rule reports doc comments that only restate their attached name. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/informative-docs.md#repos-sticky-header */ - 'jsx-a11y/no-autofocus'?: Linter.RuleEntry<JsxA11YNoAutofocus> + 'jsdoc/informative-docs'?: Linter.RuleEntry<JsdocInformativeDocs> /** - * Enforce distracting elements are not used. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-distracting-elements.md + * Enforces minimum number of newlines before JSDoc comment blocks + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/lines-before-block.md#repos-sticky-header */ - 'jsx-a11y/no-distracting-elements'?: Linter.RuleEntry<JsxA11YNoDistractingElements> + 'jsdoc/lines-before-block'?: Linter.RuleEntry<JsdocLinesBeforeBlock> /** - * Interactive elements should not be assigned non-interactive roles. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-interactive-element-to-noninteractive-role.md + * Enforces a regular expression pattern on descriptions. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/match-description.md#repos-sticky-header */ - 'jsx-a11y/no-interactive-element-to-noninteractive-role'?: Linter.RuleEntry<JsxA11YNoInteractiveElementToNoninteractiveRole> + 'jsdoc/match-description'?: Linter.RuleEntry<JsdocMatchDescription> /** - * Non-interactive elements should not be assigned mouse or keyboard event listeners. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-element-interactions.md + * Reports the name portion of a JSDoc tag if matching or not matching a given regular expression. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/match-name.md#repos-sticky-header */ - 'jsx-a11y/no-noninteractive-element-interactions'?: Linter.RuleEntry<JsxA11YNoNoninteractiveElementInteractions> + 'jsdoc/match-name'?: Linter.RuleEntry<JsdocMatchName> /** - * Non-interactive elements should not be assigned interactive roles. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-element-to-interactive-role.md + * Controls how and whether JSDoc blocks can be expressed as single or multiple line blocks. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/multiline-blocks.md#repos-sticky-header */ - 'jsx-a11y/no-noninteractive-element-to-interactive-role'?: Linter.RuleEntry<JsxA11YNoNoninteractiveElementToInteractiveRole> + 'jsdoc/multiline-blocks'?: Linter.RuleEntry<JsdocMultilineBlocks> /** - * `tabIndex` should only be declared on interactive elements. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-tabindex.md + * This rule checks for multi-line-style comments which fail to meet the criteria of a JSDoc block. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-bad-blocks.md#repos-sticky-header */ - 'jsx-a11y/no-noninteractive-tabindex'?: Linter.RuleEntry<JsxA11YNoNoninteractiveTabindex> + 'jsdoc/no-bad-blocks'?: Linter.RuleEntry<JsdocNoBadBlocks> /** - * Enforce usage of `onBlur` over `onChange` on select menus for accessibility. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-onchange.md - * @deprecated + * If tags are present, this rule will prevent empty lines in the block description. If no tags are present, this rule will prevent extra empty lines in the block description. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-blank-block-descriptions.md#repos-sticky-header */ - 'jsx-a11y/no-onchange'?: Linter.RuleEntry<JsxA11YNoOnchange> + 'jsdoc/no-blank-block-descriptions'?: Linter.RuleEntry<[]> /** - * Enforce explicit role property is not the same as implicit/default role property on element. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-redundant-roles.md + * Removes empty blocks with nothing but possibly line breaks + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-blank-blocks.md#repos-sticky-header */ - 'jsx-a11y/no-redundant-roles'?: Linter.RuleEntry<JsxA11YNoRedundantRoles> + 'jsdoc/no-blank-blocks'?: Linter.RuleEntry<JsdocNoBlankBlocks> /** - * Enforce that non-interactive, visible elements (such as `<div>`) that have click handlers use the role attribute. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-static-element-interactions.md + * This rule reports defaults being used on the relevant portion of `@param` or `@default`. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-defaults.md#repos-sticky-header */ - 'jsx-a11y/no-static-element-interactions'?: Linter.RuleEntry<JsxA11YNoStaticElementInteractions> + 'jsdoc/no-defaults'?: Linter.RuleEntry<JsdocNoDefaults> /** - * Enforces using semantic DOM elements over the ARIA `role` property. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/prefer-tag-over-role.md + * Reports when certain comment structures are always expected. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-missing-syntax.md#repos-sticky-header */ - 'jsx-a11y/prefer-tag-over-role'?: Linter.RuleEntry<JsxA11YPreferTagOverRole> + 'jsdoc/no-missing-syntax'?: Linter.RuleEntry<JsdocNoMissingSyntax> /** - * Enforce that elements with ARIA roles must have all required attributes for that role. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-has-required-aria-props.md + * Prevents use of multiple asterisks at the beginning of lines. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-multi-asterisks.md#repos-sticky-header */ - 'jsx-a11y/role-has-required-aria-props'?: Linter.RuleEntry<JsxA11YRoleHasRequiredAriaProps> + 'jsdoc/no-multi-asterisks'?: Linter.RuleEntry<JsdocNoMultiAsterisks> /** - * Enforce that elements with explicit or implicit roles defined contain only `aria-*` properties supported by that `role`. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-supports-aria-props.md + * Reports when certain comment structures are present. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-restricted-syntax.md#repos-sticky-header */ - 'jsx-a11y/role-supports-aria-props'?: Linter.RuleEntry<JsxA11YRoleSupportsAriaProps> + 'jsdoc/no-restricted-syntax'?: Linter.RuleEntry<JsdocNoRestrictedSyntax> /** - * Enforce `scope` prop is only used on `<th>` elements. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/scope.md + * This rule reports types being used on `@param` or `@returns` (redundant with TypeScript). + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-types.md#repos-sticky-header */ - 'jsx-a11y/scope'?: Linter.RuleEntry<JsxA11YScope> + 'jsdoc/no-types'?: Linter.RuleEntry<JsdocNoTypes> /** - * Enforce `tabIndex` value is not greater than zero. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/tabindex-no-positive.md + * Besides some expected built-in types, prohibits any types not specified as globals or within `@typedef`. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-undefined-types.md#repos-sticky-header */ - 'jsx-a11y/tabindex-no-positive'?: Linter.RuleEntry<JsxA11YTabindexNoPositive> + 'jsdoc/no-undefined-types'?: Linter.RuleEntry<JsdocNoUndefinedTypes> /** - * Enforce the consistent use of either double or single quotes in JSX attributes - * @see https://eslint.org/docs/latest/rules/jsx-quotes - * @deprecated + * Prefer `@import` tags to inline `import()` statements. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/prefer-import-tag.md#repos-sticky-header */ - 'jsx-quotes'?: Linter.RuleEntry<JsxQuotes> + 'jsdoc/prefer-import-tag'?: Linter.RuleEntry<JsdocPreferImportTag> /** - * Enforce consistent spacing between keys and values in object literal properties - * @see https://eslint.org/docs/latest/rules/key-spacing - * @deprecated + * Reports use of `any` or `*` type + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/reject-any-type.md#repos-sticky-header */ - 'key-spacing'?: Linter.RuleEntry<KeySpacing> + 'jsdoc/reject-any-type'?: Linter.RuleEntry<[]> /** - * Enforce consistent spacing before and after keywords - * @see https://eslint.org/docs/latest/rules/keyword-spacing - * @deprecated + * Reports use of `Function` type + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/reject-function-type.md#repos-sticky-header */ - 'keyword-spacing'?: Linter.RuleEntry<KeywordSpacing> + 'jsdoc/reject-function-type'?: Linter.RuleEntry<[]> /** - * Enforce position of line comments - * @see https://eslint.org/docs/latest/rules/line-comment-position - * @deprecated + * Requires that each JSDoc line starts with an `*`. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-asterisk-prefix.md#repos-sticky-header */ - 'line-comment-position'?: Linter.RuleEntry<LineCommentPosition> + 'jsdoc/require-asterisk-prefix'?: Linter.RuleEntry<JsdocRequireAsteriskPrefix> /** - * Enforce consistent linebreak style - * @see https://eslint.org/docs/latest/rules/linebreak-style - * @deprecated + * Requires that all functions (and potentially other contexts) have a description. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-description.md#repos-sticky-header */ - 'linebreak-style'?: Linter.RuleEntry<LinebreakStyle> + 'jsdoc/require-description'?: Linter.RuleEntry<JsdocRequireDescription> /** - * Require empty lines around comments - * @see https://eslint.org/docs/latest/rules/lines-around-comment - * @deprecated + * Requires that block description, explicit `@description`, and `@param`/`@returns` tag descriptions are written in complete sentences. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-description-complete-sentence.md#repos-sticky-header */ - 'lines-around-comment'?: Linter.RuleEntry<LinesAroundComment> + 'jsdoc/require-description-complete-sentence'?: Linter.RuleEntry<JsdocRequireDescriptionCompleteSentence> /** - * Require or disallow newlines around directives - * @see https://eslint.org/docs/latest/rules/lines-around-directive - * @deprecated + * Requires that all functions (and potentially other contexts) have examples. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-example.md#repos-sticky-header */ - 'lines-around-directive'?: Linter.RuleEntry<LinesAroundDirective> + 'jsdoc/require-example'?: Linter.RuleEntry<JsdocRequireExample> /** - * Require or disallow an empty line between class members - * @see https://eslint.org/docs/latest/rules/lines-between-class-members - * @deprecated + * Checks that all files have one `@file`, `@fileoverview`, or `@overview` tag at the beginning of the file. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-file-overview.md#repos-sticky-header */ - 'lines-between-class-members'?: Linter.RuleEntry<LinesBetweenClassMembers> + 'jsdoc/require-file-overview'?: Linter.RuleEntry<JsdocRequireFileOverview> /** - * Require or disallow logical assignment operator shorthand - * @see https://eslint.org/docs/latest/rules/logical-assignment-operators + * Requires a hyphen before the `@param` description (and optionally before `@property` descriptions). + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-hyphen-before-param-description.md#repos-sticky-header */ - 'logical-assignment-operators'?: Linter.RuleEntry<LogicalAssignmentOperators> + 'jsdoc/require-hyphen-before-param-description'?: Linter.RuleEntry<JsdocRequireHyphenBeforeParamDescription> /** - * Require languages for fenced code blocks - * @see https://github.com/eslint/markdown/blob/main/docs/rules/fenced-code-language.md + * Checks for presence of JSDoc comments, on functions and potentially other contexts (optionally limited to exports). + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-jsdoc.md#repos-sticky-header */ - 'markdown/fenced-code-language'?: Linter.RuleEntry<MarkdownFencedCodeLanguage> + 'jsdoc/require-jsdoc'?: Linter.RuleEntry<JsdocRequireJsdoc> /** - * Require or disallow metadata for fenced code blocks - * @see https://github.com/eslint/markdown/blob/main/docs/rules/fenced-code-meta.md + * Requires a description for `@next` tags + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-next-description.md#repos-sticky-header */ - 'markdown/fenced-code-meta'?: Linter.RuleEntry<MarkdownFencedCodeMeta> + 'jsdoc/require-next-description'?: Linter.RuleEntry<[]> /** - * Enforce heading levels increment by one - * @see https://github.com/eslint/markdown/blob/main/docs/rules/heading-increment.md + * Requires a type for `@next` tags + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-next-type.md#repos-sticky-header */ - 'markdown/heading-increment'?: Linter.RuleEntry<MarkdownHeadingIncrement> + 'jsdoc/require-next-type'?: Linter.RuleEntry<[]> /** - * Disallow bare URLs - * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-bare-urls.md + * Requires that all function parameters are documented with a `@param` tag. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param.md#repos-sticky-header */ - 'markdown/no-bare-urls'?: Linter.RuleEntry<[]> + 'jsdoc/require-param'?: Linter.RuleEntry<JsdocRequireParam> /** - * Disallow duplicate definitions - * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-duplicate-definitions.md + * Requires that each `@param` tag has a `description` value. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-description.md#repos-sticky-header */ - 'markdown/no-duplicate-definitions'?: Linter.RuleEntry<MarkdownNoDuplicateDefinitions> + 'jsdoc/require-param-description'?: Linter.RuleEntry<JsdocRequireParamDescription> /** - * Disallow duplicate headings in the same document - * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-duplicate-headings.md + * Requires that all `@param` tags have names. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-name.md#repos-sticky-header */ - 'markdown/no-duplicate-headings'?: Linter.RuleEntry<MarkdownNoDuplicateHeadings> + 'jsdoc/require-param-name'?: Linter.RuleEntry<JsdocRequireParamName> /** - * Disallow empty definitions - * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-definitions.md + * Requires that each `@param` tag has a type value (in curly brackets). + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-type.md#repos-sticky-header */ - 'markdown/no-empty-definitions'?: Linter.RuleEntry<MarkdownNoEmptyDefinitions> + 'jsdoc/require-param-type'?: Linter.RuleEntry<JsdocRequireParamType> /** - * Disallow empty images - * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-images.md + * Requires that all `@typedef` and `@namespace` tags have `@property` when their type is a plain `object`, `Object`, or `PlainObject`. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property.md#repos-sticky-header */ - 'markdown/no-empty-images'?: Linter.RuleEntry<[]> + 'jsdoc/require-property'?: Linter.RuleEntry<[]> /** - * Disallow empty links - * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-links.md + * Requires that each `@property` tag has a `description` value. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-description.md#repos-sticky-header */ - 'markdown/no-empty-links'?: Linter.RuleEntry<[]> + 'jsdoc/require-property-description'?: Linter.RuleEntry<[]> /** - * Disallow HTML tags - * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-html.md + * Requires that all `@property` tags have names. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-name.md#repos-sticky-header */ - 'markdown/no-html'?: Linter.RuleEntry<MarkdownNoHtml> + 'jsdoc/require-property-name'?: Linter.RuleEntry<[]> /** - * Disallow invalid label references - * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-invalid-label-refs.md + * Requires that each `@property` tag has a type value (in curly brackets). + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-type.md#repos-sticky-header */ - 'markdown/no-invalid-label-refs'?: Linter.RuleEntry<[]> + 'jsdoc/require-property-type'?: Linter.RuleEntry<[]> /** - * Disallow headings without a space after the hash characters - * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-atx-heading-space.md + * Requires that Promise rejections are documented with `@rejects` tags. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-rejects.md#repos-sticky-header */ - 'markdown/no-missing-atx-heading-space'?: Linter.RuleEntry<MarkdownNoMissingAtxHeadingSpace> + 'jsdoc/require-rejects'?: Linter.RuleEntry<JsdocRequireRejects> /** - * Disallow missing label references - * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-label-refs.md + * Requires that returns are documented with `@returns`. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns.md#repos-sticky-header */ - 'markdown/no-missing-label-refs'?: Linter.RuleEntry<MarkdownNoMissingLabelRefs> + 'jsdoc/require-returns'?: Linter.RuleEntry<JsdocRequireReturns> /** - * Disallow link fragments that do not reference valid headings - * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-link-fragments.md + * Requires a return statement in function body if a `@returns` tag is specified in JSDoc comment(and reports if multiple `@returns` tags are present). + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-check.md#repos-sticky-header */ - 'markdown/no-missing-link-fragments'?: Linter.RuleEntry<MarkdownNoMissingLinkFragments> + 'jsdoc/require-returns-check'?: Linter.RuleEntry<JsdocRequireReturnsCheck> /** - * Disallow multiple H1 headings in the same document - * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-multiple-h1.md + * Requires that the `@returns` tag has a `description` value (not including `void`/`undefined` type returns). + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-description.md#repos-sticky-header */ - 'markdown/no-multiple-h1'?: Linter.RuleEntry<MarkdownNoMultipleH1> + 'jsdoc/require-returns-description'?: Linter.RuleEntry<JsdocRequireReturnsDescription> /** - * Disallow URLs that match defined reference identifiers - * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-reference-like-urls.md + * Requires that `@returns` tag has type value (in curly brackets). + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-type.md#repos-sticky-header */ - 'markdown/no-reference-like-urls'?: Linter.RuleEntry<[]> + 'jsdoc/require-returns-type'?: Linter.RuleEntry<JsdocRequireReturnsType> /** - * Disallow reversed link and image syntax - * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-reversed-media-syntax.md + * Requires tags be present, optionally for specific contexts + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-tags.md#repos-sticky-header */ - 'markdown/no-reversed-media-syntax'?: Linter.RuleEntry<[]> + 'jsdoc/require-tags'?: Linter.RuleEntry<JsdocRequireTags> /** - * Disallow spaces around emphasis markers - * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-space-in-emphasis.md + * Requires `@template` tags be present when type parameters are used. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template.md#repos-sticky-header */ - 'markdown/no-space-in-emphasis'?: Linter.RuleEntry<MarkdownNoSpaceInEmphasis> + 'jsdoc/require-template'?: Linter.RuleEntry<JsdocRequireTemplate> /** - * Disallow unused definitions - * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-unused-definitions.md + * Requires a description for `@template` tags + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template-description.md#repos-sticky-header */ - 'markdown/no-unused-definitions'?: Linter.RuleEntry<MarkdownNoUnusedDefinitions> + 'jsdoc/require-template-description'?: Linter.RuleEntry<[]> /** - * Require alternative text for images - * @see https://github.com/eslint/markdown/blob/main/docs/rules/require-alt-text.md + * Requires that throw statements are documented with `@throws` tags. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws.md#repos-sticky-header */ - 'markdown/require-alt-text'?: Linter.RuleEntry<[]> + 'jsdoc/require-throws'?: Linter.RuleEntry<JsdocRequireThrows> /** - * Disallow data rows in a GitHub Flavored Markdown table from having more cells than the header row - * @see https://github.com/eslint/markdown/blob/main/docs/rules/table-column-count.md + * Requires a description for `@throws` tags + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws-description.md#repos-sticky-header */ - 'markdown/table-column-count'?: Linter.RuleEntry<MarkdownTableColumnCount> + 'jsdoc/require-throws-description'?: Linter.RuleEntry<[]> /** - * Enforce a maximum number of classes per file - * @see https://eslint.org/docs/latest/rules/max-classes-per-file + * Requires a type for `@throws` tags + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws-type.md#repos-sticky-header */ - 'max-classes-per-file'?: Linter.RuleEntry<MaxClassesPerFile> + 'jsdoc/require-throws-type'?: Linter.RuleEntry<[]> /** - * Enforce a maximum depth that blocks can be nested - * @see https://eslint.org/docs/latest/rules/max-depth + * Requires yields are documented with `@yields` tags. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields.md#repos-sticky-header */ - 'max-depth'?: Linter.RuleEntry<MaxDepth> + 'jsdoc/require-yields'?: Linter.RuleEntry<JsdocRequireYields> /** - * Enforce a maximum line length - * @see https://eslint.org/docs/latest/rules/max-len - * @deprecated + * Ensures that if a `@yields` is present that a `yield` (or `yield` with a value) is present in the function body (or that if a `@next` is present that there is a yield with a return value present). + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-check.md#repos-sticky-header */ - 'max-len'?: Linter.RuleEntry<MaxLen> + 'jsdoc/require-yields-check'?: Linter.RuleEntry<JsdocRequireYieldsCheck> /** - * Enforce a maximum number of lines per file - * @see https://eslint.org/docs/latest/rules/max-lines + * Requires a description for `@yields` tags + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-description.md#repos-sticky-header */ - 'max-lines'?: Linter.RuleEntry<MaxLines> + 'jsdoc/require-yields-description'?: Linter.RuleEntry<[]> /** - * Enforce a maximum number of lines of code in a function - * @see https://eslint.org/docs/latest/rules/max-lines-per-function + * Requires a type for `@yields` tags + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-type.md#repos-sticky-header */ - 'max-lines-per-function'?: Linter.RuleEntry<MaxLinesPerFunction> + 'jsdoc/require-yields-type'?: Linter.RuleEntry<[]> /** - * Enforce a maximum depth that callbacks can be nested - * @see https://eslint.org/docs/latest/rules/max-nested-callbacks + * Sorts tags by a specified sequence according to tag name, optionally adding line breaks between tag groups. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/sort-tags.md#repos-sticky-header */ - 'max-nested-callbacks'?: Linter.RuleEntry<MaxNestedCallbacks> + 'jsdoc/sort-tags'?: Linter.RuleEntry<JsdocSortTags> /** - * Enforce a maximum number of parameters in function definitions - * @see https://eslint.org/docs/latest/rules/max-params + * Enforces lines (or no lines) before, after, or between tags. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/tag-lines.md#repos-sticky-header */ - 'max-params'?: Linter.RuleEntry<MaxParams> + 'jsdoc/tag-lines'?: Linter.RuleEntry<JsdocTagLines> /** - * Enforce a maximum number of statements allowed in function blocks - * @see https://eslint.org/docs/latest/rules/max-statements + * Auto-escape certain characters that are input within block and tag descriptions. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/text-escaping.md#repos-sticky-header */ - 'max-statements'?: Linter.RuleEntry<MaxStatements> + 'jsdoc/text-escaping'?: Linter.RuleEntry<JsdocTextEscaping> /** - * Enforce a maximum number of statements allowed per line - * @see https://eslint.org/docs/latest/rules/max-statements-per-line - * @deprecated + * Prefers either function properties or method signatures + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-method-signature-style.md#repos-sticky-header */ - 'max-statements-per-line'?: Linter.RuleEntry<MaxStatementsPerLine> + 'jsdoc/ts-method-signature-style'?: Linter.RuleEntry<JsdocTsMethodSignatureStyle> /** - * Enforce a particular style for multiline comments - * @see https://eslint.org/docs/latest/rules/multiline-comment-style - * @deprecated + * Warns against use of the empty object type + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-empty-object-type.md#repos-sticky-header */ - 'multiline-comment-style'?: Linter.RuleEntry<MultilineCommentStyle> + 'jsdoc/ts-no-empty-object-type'?: Linter.RuleEntry<[]> /** - * Enforce newlines between operands of ternary expressions - * @see https://eslint.org/docs/latest/rules/multiline-ternary - * @deprecated + * Catches unnecessary template expressions such as string expressions within a template literal. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-unnecessary-template-expression.md#repos-sticky-header */ - 'multiline-ternary'?: Linter.RuleEntry<MultilineTernary> + 'jsdoc/ts-no-unnecessary-template-expression'?: Linter.RuleEntry<JsdocTsNoUnnecessaryTemplateExpression> /** - * Require constructor names to begin with a capital letter - * @see https://eslint.org/docs/latest/rules/new-cap + * Prefers function types over call signatures when there are no other properties. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-prefer-function-type.md#repos-sticky-header */ - 'new-cap'?: Linter.RuleEntry<NewCap> + 'jsdoc/ts-prefer-function-type'?: Linter.RuleEntry<JsdocTsPreferFunctionType> /** - * Enforce or disallow parentheses when invoking a constructor with no arguments - * @see https://eslint.org/docs/latest/rules/new-parens - * @deprecated + * Formats JSDoc type values. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/type-formatting.md#repos-sticky-header */ - 'new-parens'?: Linter.RuleEntry<NewParens> + 'jsdoc/type-formatting'?: Linter.RuleEntry<JsdocTypeFormatting> /** - * Require or disallow an empty line after variable declarations - * @see https://eslint.org/docs/latest/rules/newline-after-var - * @deprecated + * Requires all types/namepaths to be valid JSDoc, Closure compiler, or TypeScript types (configurable in settings). + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/valid-types.md#repos-sticky-header */ - 'newline-after-var'?: Linter.RuleEntry<NewlineAfterVar> + 'jsdoc/valid-types'?: Linter.RuleEntry<JsdocValidTypes> /** - * Require an empty line before `return` statements - * @see https://eslint.org/docs/latest/rules/newline-before-return - * @deprecated + * validate object with JSON Schema. + * @see https://ota-meshi.github.io/eslint-plugin-json-schema-validator/rules/no-invalid.html */ - 'newline-before-return'?: Linter.RuleEntry<[]> + 'json-schema-validator/no-invalid'?: Linter.RuleEntry<JsonSchemaValidatorNoInvalid> /** - * Require a newline after each call in a method chain - * @see https://eslint.org/docs/latest/rules/newline-per-chained-call - * @deprecated + * enforce line breaks after opening and before closing array brackets + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-newline.html */ - 'newline-per-chained-call'?: Linter.RuleEntry<NewlinePerChainedCall> + 'jsonc/array-bracket-newline'?: Linter.RuleEntry<JsoncArrayBracketNewline> /** - * Disallow the use of `alert`, `confirm`, and `prompt` - * @see https://eslint.org/docs/latest/rules/no-alert + * disallow or enforce spaces inside of brackets + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-spacing.html */ - 'no-alert'?: Linter.RuleEntry<[]> + 'jsonc/array-bracket-spacing'?: Linter.RuleEntry<JsoncArrayBracketSpacing> /** - * Disallow `Array` constructors - * @see https://eslint.org/docs/latest/rules/no-array-constructor + * enforce line breaks between array elements + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-element-newline.html */ - 'no-array-constructor'?: Linter.RuleEntry<[]> + 'jsonc/array-element-newline'?: Linter.RuleEntry<JsoncArrayElementNewline> /** - * Disallow using an async function as a Promise executor - * @see https://eslint.org/docs/latest/rules/no-async-promise-executor + * apply jsonc rules similar to your configured ESLint core rules + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/auto.html */ - 'no-async-promise-executor'?: Linter.RuleEntry<[]> + 'jsonc/auto'?: Linter.RuleEntry<[]> /** - * Disallow `await` inside of loops - * @see https://eslint.org/docs/latest/rules/no-await-in-loop + * require or disallow trailing commas + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-dangle.html */ - 'no-await-in-loop'?: Linter.RuleEntry<[]> + 'jsonc/comma-dangle'?: Linter.RuleEntry<JsoncCommaDangle> /** - * Disallow bitwise operators - * @see https://eslint.org/docs/latest/rules/no-bitwise + * enforce consistent comma style + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-style.html */ - 'no-bitwise'?: Linter.RuleEntry<NoBitwise> + 'jsonc/comma-style'?: Linter.RuleEntry<JsoncCommaStyle> /** - * Disallow use of the `Buffer()` constructor - * @see https://eslint.org/docs/latest/rules/no-buffer-constructor - * @deprecated + * enforce consistent indentation + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/indent.html + */ + 'jsonc/indent'?: Linter.RuleEntry<JsoncIndent> + /** + * enforce naming convention to property key names + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-name-casing.html */ - 'no-buffer-constructor'?: Linter.RuleEntry<[]> + 'jsonc/key-name-casing'?: Linter.RuleEntry<JsoncKeyNameCasing> /** - * Disallow the use of `arguments.caller` or `arguments.callee` - * @see https://eslint.org/docs/latest/rules/no-caller + * enforce consistent spacing between keys and values in object literal properties + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-spacing.html */ - 'no-caller'?: Linter.RuleEntry<[]> + 'jsonc/key-spacing'?: Linter.RuleEntry<JsoncKeySpacing> /** - * Disallow lexical declarations in case clauses - * @see https://eslint.org/docs/latest/rules/no-case-declarations + * disallow BigInt literals + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-bigint-literals.html */ - 'no-case-declarations'?: Linter.RuleEntry<[]> + 'jsonc/no-bigint-literals'?: Linter.RuleEntry<[]> /** - * Disallow `catch` clause parameters from shadowing variables in the outer scope - * @see https://eslint.org/docs/latest/rules/no-catch-shadow - * @deprecated + * disallow binary expression + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-expression.html */ - 'no-catch-shadow'?: Linter.RuleEntry<[]> + 'jsonc/no-binary-expression'?: Linter.RuleEntry<[]> /** - * Disallow reassigning class members - * @see https://eslint.org/docs/latest/rules/no-class-assign + * disallow binary numeric literals + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-numeric-literals.html */ - 'no-class-assign'?: Linter.RuleEntry<[]> + 'jsonc/no-binary-numeric-literals'?: Linter.RuleEntry<[]> /** - * Disallow comparing against `-0` - * @see https://eslint.org/docs/latest/rules/no-compare-neg-zero + * disallow comments + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-comments.html */ - 'no-compare-neg-zero'?: Linter.RuleEntry<[]> + 'jsonc/no-comments'?: Linter.RuleEntry<[]> /** - * Disallow assignment operators in conditional expressions - * @see https://eslint.org/docs/latest/rules/no-cond-assign + * disallow duplicate keys in object literals + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-dupe-keys.html */ - 'no-cond-assign'?: Linter.RuleEntry<NoCondAssign> + 'jsonc/no-dupe-keys'?: Linter.RuleEntry<[]> /** - * Disallow arrow functions where they could be confused with comparisons - * @see https://eslint.org/docs/latest/rules/no-confusing-arrow - * @deprecated + * disallow escape sequences in identifiers. + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-escape-sequence-in-identifier.html */ - 'no-confusing-arrow'?: Linter.RuleEntry<NoConfusingArrow> + 'jsonc/no-escape-sequence-in-identifier'?: Linter.RuleEntry<[]> /** - * Disallow the use of `console` - * @see https://eslint.org/docs/latest/rules/no-console + * disallow leading or trailing decimal points in numeric literals + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-floating-decimal.html */ - 'no-console'?: Linter.RuleEntry<NoConsole> + 'jsonc/no-floating-decimal'?: Linter.RuleEntry<[]> /** - * Disallow reassigning `const`, `using`, and `await using` variables - * @see https://eslint.org/docs/latest/rules/no-const-assign + * disallow hexadecimal numeric literals + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-hexadecimal-numeric-literals.html */ - 'no-const-assign'?: Linter.RuleEntry<[]> + 'jsonc/no-hexadecimal-numeric-literals'?: Linter.RuleEntry<[]> /** - * Disallow expressions where the operation doesn't affect the value - * @see https://eslint.org/docs/latest/rules/no-constant-binary-expression + * disallow Infinity + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-infinity.html */ - 'no-constant-binary-expression'?: Linter.RuleEntry<[]> + 'jsonc/no-infinity'?: Linter.RuleEntry<[]> /** - * Disallow constant expressions in conditions - * @see https://eslint.org/docs/latest/rules/no-constant-condition + * disallow irregular whitespace + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-irregular-whitespace.html */ - 'no-constant-condition'?: Linter.RuleEntry<NoConstantCondition> + 'jsonc/no-irregular-whitespace'?: Linter.RuleEntry<JsoncNoIrregularWhitespace> /** - * Disallow returning value from constructor - * @see https://eslint.org/docs/latest/rules/no-constructor-return + * disallow multiline strings + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-multi-str.html */ - 'no-constructor-return'?: Linter.RuleEntry<[]> + 'jsonc/no-multi-str'?: Linter.RuleEntry<[]> /** - * Disallow `continue` statements - * @see https://eslint.org/docs/latest/rules/no-continue + * disallow NaN + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-nan.html */ - 'no-continue'?: Linter.RuleEntry<[]> + 'jsonc/no-nan'?: Linter.RuleEntry<[]> /** - * Disallow control characters in regular expressions - * @see https://eslint.org/docs/latest/rules/no-control-regex + * disallow number property keys + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-number-props.html */ - 'no-control-regex'?: Linter.RuleEntry<[]> + 'jsonc/no-number-props'?: Linter.RuleEntry<[]> /** - * Disallow the use of `debugger` - * @see https://eslint.org/docs/latest/rules/no-debugger + * disallow numeric separators + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-numeric-separators.html */ - 'no-debugger'?: Linter.RuleEntry<[]> + 'jsonc/no-numeric-separators'?: Linter.RuleEntry<[]> /** - * Disallow deleting variables - * @see https://eslint.org/docs/latest/rules/no-delete-var + * disallow legacy octal literals + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal.html */ - 'no-delete-var'?: Linter.RuleEntry<[]> + 'jsonc/no-octal'?: Linter.RuleEntry<[]> /** - * Disallow equal signs explicitly at the beginning of regular expressions - * @see https://eslint.org/docs/latest/rules/no-div-regex + * disallow octal escape sequences in string literals + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-escape.html */ - 'no-div-regex'?: Linter.RuleEntry<[]> + 'jsonc/no-octal-escape'?: Linter.RuleEntry<[]> /** - * Disallow duplicate arguments in `function` definitions - * @see https://eslint.org/docs/latest/rules/no-dupe-args + * disallow octal numeric literals + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-numeric-literals.html */ - 'no-dupe-args'?: Linter.RuleEntry<[]> + 'jsonc/no-octal-numeric-literals'?: Linter.RuleEntry<[]> /** - * Disallow duplicate class members - * @see https://eslint.org/docs/latest/rules/no-dupe-class-members + * disallow parentheses around the expression + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-parenthesized.html */ - 'no-dupe-class-members'?: Linter.RuleEntry<[]> + 'jsonc/no-parenthesized'?: Linter.RuleEntry<[]> /** - * Disallow duplicate conditions in if-else-if chains - * @see https://eslint.org/docs/latest/rules/no-dupe-else-if + * disallow plus sign + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-plus-sign.html */ - 'no-dupe-else-if'?: Linter.RuleEntry<[]> + 'jsonc/no-plus-sign'?: Linter.RuleEntry<[]> /** - * Disallow duplicate keys in object literals - * @see https://eslint.org/docs/latest/rules/no-dupe-keys + * disallow RegExp literals + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-regexp-literals.html */ - 'no-dupe-keys'?: Linter.RuleEntry<[]> + 'jsonc/no-regexp-literals'?: Linter.RuleEntry<[]> /** - * Disallow duplicate case labels - * @see https://eslint.org/docs/latest/rules/no-duplicate-case + * disallow sparse arrays + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-sparse-arrays.html */ - 'no-duplicate-case'?: Linter.RuleEntry<[]> + 'jsonc/no-sparse-arrays'?: Linter.RuleEntry<[]> /** - * Disallow duplicate module imports - * @see https://eslint.org/docs/latest/rules/no-duplicate-imports + * disallow template literals + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-template-literals.html */ - 'no-duplicate-imports'?: Linter.RuleEntry<NoDuplicateImports> + 'jsonc/no-template-literals'?: Linter.RuleEntry<[]> /** - * Disallow `else` blocks after `return` statements in `if` statements - * @see https://eslint.org/docs/latest/rules/no-else-return + * disallow `undefined` + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-undefined-value.html */ - 'no-else-return'?: Linter.RuleEntry<NoElseReturn> + 'jsonc/no-undefined-value'?: Linter.RuleEntry<[]> /** - * Disallow empty block statements - * @see https://eslint.org/docs/latest/rules/no-empty + * disallow Unicode code point escape sequences. + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-unicode-codepoint-escapes.html */ - 'no-empty'?: Linter.RuleEntry<NoEmpty> + 'jsonc/no-unicode-codepoint-escapes'?: Linter.RuleEntry<[]> /** - * Disallow empty character classes in regular expressions - * @see https://eslint.org/docs/latest/rules/no-empty-character-class + * disallow unnecessary escape usage + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-useless-escape.html */ - 'no-empty-character-class'?: Linter.RuleEntry<[]> + 'jsonc/no-useless-escape'?: Linter.RuleEntry<JsoncNoUselessEscape> /** - * Disallow empty functions - * @see https://eslint.org/docs/latest/rules/no-empty-function + * enforce consistent line breaks inside braces + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-newline.html */ - 'no-empty-function'?: Linter.RuleEntry<NoEmptyFunction> + 'jsonc/object-curly-newline'?: Linter.RuleEntry<JsoncObjectCurlyNewline> /** - * Disallow empty destructuring patterns - * @see https://eslint.org/docs/latest/rules/no-empty-pattern + * enforce consistent spacing inside braces + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-spacing.html */ - 'no-empty-pattern'?: Linter.RuleEntry<NoEmptyPattern> + 'jsonc/object-curly-spacing'?: Linter.RuleEntry<JsoncObjectCurlySpacing> /** - * Disallow empty static blocks - * @see https://eslint.org/docs/latest/rules/no-empty-static-block + * enforce placing object properties on separate lines + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-property-newline.html */ - 'no-empty-static-block'?: Linter.RuleEntry<[]> + 'jsonc/object-property-newline'?: Linter.RuleEntry<JsoncObjectPropertyNewline> /** - * Disallow `null` comparisons without type-checking operators - * @see https://eslint.org/docs/latest/rules/no-eq-null + * require quotes around object literal property names + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quote-props.html */ - 'no-eq-null'?: Linter.RuleEntry<[]> + 'jsonc/quote-props'?: Linter.RuleEntry<JsoncQuoteProps> /** - * Disallow the use of `eval()` - * @see https://eslint.org/docs/latest/rules/no-eval + * enforce use of double or single quotes + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quotes.html */ - 'no-eval'?: Linter.RuleEntry<NoEval> + 'jsonc/quotes'?: Linter.RuleEntry<JsoncQuotes> /** - * Disallow reassigning exceptions in `catch` clauses - * @see https://eslint.org/docs/latest/rules/no-ex-assign + * require array values to be sorted + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-array-values.html */ - 'no-ex-assign'?: Linter.RuleEntry<[]> + 'jsonc/sort-array-values'?: Linter.RuleEntry<JsoncSortArrayValues> /** - * Disallow extending native types - * @see https://eslint.org/docs/latest/rules/no-extend-native + * require object keys to be sorted + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-keys.html */ - 'no-extend-native'?: Linter.RuleEntry<NoExtendNative> + 'jsonc/sort-keys'?: Linter.RuleEntry<JsoncSortKeys> /** - * Disallow unnecessary calls to `.bind()` - * @see https://eslint.org/docs/latest/rules/no-extra-bind + * disallow spaces after unary operators + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/space-unary-ops.html */ - 'no-extra-bind'?: Linter.RuleEntry<[]> + 'jsonc/space-unary-ops'?: Linter.RuleEntry<JsoncSpaceUnaryOps> /** - * Disallow unnecessary boolean casts - * @see https://eslint.org/docs/latest/rules/no-extra-boolean-cast + * disallow invalid number for JSON + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/valid-json-number.html */ - 'no-extra-boolean-cast'?: Linter.RuleEntry<NoExtraBooleanCast> + 'jsonc/valid-json-number'?: Linter.RuleEntry<[]> /** - * Disallow unnecessary labels - * @see https://eslint.org/docs/latest/rules/no-extra-label + * disallow parsing errors in Vue custom blocks + * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/vue-custom-block/no-parsing-error.html */ - 'no-extra-label'?: Linter.RuleEntry<[]> + 'jsonc/vue-custom-block/no-parsing-error'?: Linter.RuleEntry<[]> /** - * Disallow unnecessary parentheses - * @see https://eslint.org/docs/latest/rules/no-extra-parens + * Enforce emojis are wrapped in `<span>` and provide screen reader access. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md * @deprecated */ - 'no-extra-parens'?: Linter.RuleEntry<NoExtraParens> + 'jsx-a11y/accessible-emoji'?: Linter.RuleEntry<JsxA11YAccessibleEmoji> /** - * Disallow unnecessary semicolons - * @see https://eslint.org/docs/latest/rules/no-extra-semi - * @deprecated + * Enforce all elements that require alternative text have meaningful information to relay back to end user. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/alt-text.md */ - 'no-extra-semi'?: Linter.RuleEntry<[]> + 'jsx-a11y/alt-text'?: Linter.RuleEntry<JsxA11YAltText> /** - * Disallow fallthrough of `case` statements - * @see https://eslint.org/docs/latest/rules/no-fallthrough + * Enforce `<a>` text to not exactly match "click here", "here", "link", or "a link". + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-ambiguous-text.md */ - 'no-fallthrough'?: Linter.RuleEntry<NoFallthrough> + 'jsx-a11y/anchor-ambiguous-text'?: Linter.RuleEntry<JsxA11YAnchorAmbiguousText> /** - * Disallow leading or trailing decimal points in numeric literals - * @see https://eslint.org/docs/latest/rules/no-floating-decimal - * @deprecated + * Enforce all anchors to contain accessible content. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-has-content.md */ - 'no-floating-decimal'?: Linter.RuleEntry<[]> + 'jsx-a11y/anchor-has-content'?: Linter.RuleEntry<JsxA11YAnchorHasContent> /** - * Disallow reassigning `function` declarations - * @see https://eslint.org/docs/latest/rules/no-func-assign + * Enforce all anchors are valid, navigable elements. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-is-valid.md + */ + 'jsx-a11y/anchor-is-valid'?: Linter.RuleEntry<JsxA11YAnchorIsValid> + /** + * Enforce elements with aria-activedescendant are tabbable. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-activedescendant-has-tabindex.md */ - 'no-func-assign'?: Linter.RuleEntry<[]> + 'jsx-a11y/aria-activedescendant-has-tabindex'?: Linter.RuleEntry<JsxA11YAriaActivedescendantHasTabindex> /** - * Disallow assignments to native objects or read-only global variables - * @see https://eslint.org/docs/latest/rules/no-global-assign + * Enforce all `aria-*` props are valid. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-props.md */ - 'no-global-assign'?: Linter.RuleEntry<NoGlobalAssign> + 'jsx-a11y/aria-props'?: Linter.RuleEntry<JsxA11YAriaProps> /** - * Disallow shorthand type conversions - * @see https://eslint.org/docs/latest/rules/no-implicit-coercion + * Enforce ARIA state and property values are valid. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-proptypes.md */ - 'no-implicit-coercion'?: Linter.RuleEntry<NoImplicitCoercion> + 'jsx-a11y/aria-proptypes'?: Linter.RuleEntry<JsxA11YAriaProptypes> /** - * Disallow declarations in the global scope - * @see https://eslint.org/docs/latest/rules/no-implicit-globals + * Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-role.md */ - 'no-implicit-globals'?: Linter.RuleEntry<NoImplicitGlobals> + 'jsx-a11y/aria-role'?: Linter.RuleEntry<JsxA11YAriaRole> /** - * Disallow the use of `eval()`-like methods - * @see https://eslint.org/docs/latest/rules/no-implied-eval + * Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md */ - 'no-implied-eval'?: Linter.RuleEntry<[]> + 'jsx-a11y/aria-unsupported-elements'?: Linter.RuleEntry<JsxA11YAriaUnsupportedElements> /** - * Disallow assigning to imported bindings - * @see https://eslint.org/docs/latest/rules/no-import-assign + * Enforce that autocomplete attributes are used correctly. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md */ - 'no-import-assign'?: Linter.RuleEntry<[]> + 'jsx-a11y/autocomplete-valid'?: Linter.RuleEntry<JsxA11YAutocompleteValid> /** - * Disallow inline comments after code - * @see https://eslint.org/docs/latest/rules/no-inline-comments + * Enforce a clickable non-interactive element has at least one keyboard event listener. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/click-events-have-key-events.md */ - 'no-inline-comments'?: Linter.RuleEntry<NoInlineComments> + 'jsx-a11y/click-events-have-key-events'?: Linter.RuleEntry<JsxA11YClickEventsHaveKeyEvents> /** - * Disallow variable or `function` declarations in nested blocks - * @see https://eslint.org/docs/latest/rules/no-inner-declarations + * Enforce that a control (an interactive element) has a text label. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md */ - 'no-inner-declarations'?: Linter.RuleEntry<NoInnerDeclarations> + 'jsx-a11y/control-has-associated-label'?: Linter.RuleEntry<JsxA11YControlHasAssociatedLabel> /** - * Disallow invalid regular expression strings in `RegExp` constructors - * @see https://eslint.org/docs/latest/rules/no-invalid-regexp + * Enforce heading (`h1`, `h2`, etc) elements contain accessible content. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md */ - 'no-invalid-regexp'?: Linter.RuleEntry<NoInvalidRegexp> + 'jsx-a11y/heading-has-content'?: Linter.RuleEntry<JsxA11YHeadingHasContent> /** - * Disallow use of `this` in contexts where the value of `this` is `undefined` - * @see https://eslint.org/docs/latest/rules/no-invalid-this + * Enforce `<html>` element has `lang` prop. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md */ - 'no-invalid-this'?: Linter.RuleEntry<NoInvalidThis> + 'jsx-a11y/html-has-lang'?: Linter.RuleEntry<JsxA11YHtmlHasLang> /** - * Disallow irregular whitespace - * @see https://eslint.org/docs/latest/rules/no-irregular-whitespace + * Enforce iframe elements have a title attribute. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md */ - 'no-irregular-whitespace'?: Linter.RuleEntry<NoIrregularWhitespace> + 'jsx-a11y/iframe-has-title'?: Linter.RuleEntry<JsxA11YIframeHasTitle> /** - * Disallow the use of the `__iterator__` property - * @see https://eslint.org/docs/latest/rules/no-iterator + * Enforce `<img>` alt prop does not contain the word "image", "picture", or "photo". + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/img-redundant-alt.md */ - 'no-iterator'?: Linter.RuleEntry<[]> + 'jsx-a11y/img-redundant-alt'?: Linter.RuleEntry<JsxA11YImgRedundantAlt> /** - * Disallow labels that share a name with a variable - * @see https://eslint.org/docs/latest/rules/no-label-var + * Enforce that elements with interactive handlers like `onClick` must be focusable. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/interactive-supports-focus.md */ - 'no-label-var'?: Linter.RuleEntry<[]> + 'jsx-a11y/interactive-supports-focus'?: Linter.RuleEntry<JsxA11YInteractiveSupportsFocus> /** - * Disallow labeled statements - * @see https://eslint.org/docs/latest/rules/no-labels + * Enforce that a `label` tag has a text label and an associated control. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md */ - 'no-labels'?: Linter.RuleEntry<NoLabels> + 'jsx-a11y/label-has-associated-control'?: Linter.RuleEntry<JsxA11YLabelHasAssociatedControl> /** - * Disallow unnecessary nested blocks - * @see https://eslint.org/docs/latest/rules/no-lone-blocks + * Enforce that `<label>` elements have the `htmlFor` prop. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/label-has-for.md + * @deprecated */ - 'no-lone-blocks'?: Linter.RuleEntry<[]> + 'jsx-a11y/label-has-for'?: Linter.RuleEntry<JsxA11YLabelHasFor> /** - * Disallow `if` statements as the only statement in `else` blocks - * @see https://eslint.org/docs/latest/rules/no-lonely-if + * Enforce lang attribute has a valid value. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/lang.md */ - 'no-lonely-if'?: Linter.RuleEntry<[]> + 'jsx-a11y/lang'?: Linter.RuleEntry<JsxA11YLang> /** - * Disallow function declarations that contain unsafe references inside loop statements - * @see https://eslint.org/docs/latest/rules/no-loop-func + * Enforces that `<audio>` and `<video>` elements must have a `<track>` for captions. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/media-has-caption.md */ - 'no-loop-func'?: Linter.RuleEntry<[]> + 'jsx-a11y/media-has-caption'?: Linter.RuleEntry<JsxA11YMediaHasCaption> /** - * Disallow literal numbers that lose precision - * @see https://eslint.org/docs/latest/rules/no-loss-of-precision + * Enforce that `onMouseOver`/`onMouseOut` are accompanied by `onFocus`/`onBlur` for keyboard-only users. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/mouse-events-have-key-events.md */ - 'no-loss-of-precision'?: Linter.RuleEntry<[]> + 'jsx-a11y/mouse-events-have-key-events'?: Linter.RuleEntry<JsxA11YMouseEventsHaveKeyEvents> /** - * Disallow magic numbers - * @see https://eslint.org/docs/latest/rules/no-magic-numbers + * Enforce that the `accessKey` prop is not used on any element to avoid complications with keyboard commands used by a screen reader. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-access-key.md */ - 'no-magic-numbers'?: Linter.RuleEntry<NoMagicNumbers> + 'jsx-a11y/no-access-key'?: Linter.RuleEntry<JsxA11YNoAccessKey> /** - * Disallow characters which are made with multiple code points in character class syntax - * @see https://eslint.org/docs/latest/rules/no-misleading-character-class + * Disallow `aria-hidden="true"` from being set on focusable elements. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-aria-hidden-on-focusable.md */ - 'no-misleading-character-class'?: Linter.RuleEntry<NoMisleadingCharacterClass> + 'jsx-a11y/no-aria-hidden-on-focusable'?: Linter.RuleEntry<JsxA11YNoAriaHiddenOnFocusable> /** - * Disallow mixed binary operators - * @see https://eslint.org/docs/latest/rules/no-mixed-operators - * @deprecated + * Enforce autoFocus prop is not used. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-autofocus.md */ - 'no-mixed-operators'?: Linter.RuleEntry<NoMixedOperators> + 'jsx-a11y/no-autofocus'?: Linter.RuleEntry<JsxA11YNoAutofocus> /** - * Disallow `require` calls to be mixed with regular variable declarations - * @see https://eslint.org/docs/latest/rules/no-mixed-requires - * @deprecated + * Enforce distracting elements are not used. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-distracting-elements.md */ - 'no-mixed-requires'?: Linter.RuleEntry<NoMixedRequires> + 'jsx-a11y/no-distracting-elements'?: Linter.RuleEntry<JsxA11YNoDistractingElements> /** - * Disallow mixed spaces and tabs for indentation - * @see https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs - * @deprecated + * Interactive elements should not be assigned non-interactive roles. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-interactive-element-to-noninteractive-role.md */ - 'no-mixed-spaces-and-tabs'?: Linter.RuleEntry<NoMixedSpacesAndTabs> + 'jsx-a11y/no-interactive-element-to-noninteractive-role'?: Linter.RuleEntry<JsxA11YNoInteractiveElementToNoninteractiveRole> /** - * Disallow use of chained assignment expressions - * @see https://eslint.org/docs/latest/rules/no-multi-assign + * Non-interactive elements should not be assigned mouse or keyboard event listeners. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-element-interactions.md */ - 'no-multi-assign'?: Linter.RuleEntry<NoMultiAssign> + 'jsx-a11y/no-noninteractive-element-interactions'?: Linter.RuleEntry<JsxA11YNoNoninteractiveElementInteractions> /** - * Disallow multiple spaces - * @see https://eslint.org/docs/latest/rules/no-multi-spaces - * @deprecated + * Non-interactive elements should not be assigned interactive roles. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-element-to-interactive-role.md */ - 'no-multi-spaces'?: Linter.RuleEntry<NoMultiSpaces> + 'jsx-a11y/no-noninteractive-element-to-interactive-role'?: Linter.RuleEntry<JsxA11YNoNoninteractiveElementToInteractiveRole> /** - * Disallow multiline strings - * @see https://eslint.org/docs/latest/rules/no-multi-str + * `tabIndex` should only be declared on interactive elements. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-tabindex.md */ - 'no-multi-str'?: Linter.RuleEntry<[]> + 'jsx-a11y/no-noninteractive-tabindex'?: Linter.RuleEntry<JsxA11YNoNoninteractiveTabindex> /** - * Disallow multiple empty lines - * @see https://eslint.org/docs/latest/rules/no-multiple-empty-lines + * Enforce usage of `onBlur` over `onChange` on select menus for accessibility. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-onchange.md * @deprecated */ - 'no-multiple-empty-lines'?: Linter.RuleEntry<NoMultipleEmptyLines> + 'jsx-a11y/no-onchange'?: Linter.RuleEntry<JsxA11YNoOnchange> /** - * Disallow assignments to native objects or read-only global variables - * @see https://eslint.org/docs/latest/rules/no-native-reassign - * @deprecated + * Enforce explicit role property is not the same as implicit/default role property on element. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-redundant-roles.md */ - 'no-native-reassign'?: Linter.RuleEntry<NoNativeReassign> + 'jsx-a11y/no-redundant-roles'?: Linter.RuleEntry<JsxA11YNoRedundantRoles> /** - * Disallow negated conditions - * @see https://eslint.org/docs/latest/rules/no-negated-condition + * Enforce that non-interactive, visible elements (such as `<div>`) that have click handlers use the role attribute. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-static-element-interactions.md */ - 'no-negated-condition'?: Linter.RuleEntry<[]> + 'jsx-a11y/no-static-element-interactions'?: Linter.RuleEntry<JsxA11YNoStaticElementInteractions> /** - * Disallow negating the left operand in `in` expressions - * @see https://eslint.org/docs/latest/rules/no-negated-in-lhs - * @deprecated + * Enforces using semantic DOM elements over the ARIA `role` property. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/prefer-tag-over-role.md */ - 'no-negated-in-lhs'?: Linter.RuleEntry<[]> + 'jsx-a11y/prefer-tag-over-role'?: Linter.RuleEntry<JsxA11YPreferTagOverRole> /** - * Disallow nested ternary expressions - * @see https://eslint.org/docs/latest/rules/no-nested-ternary + * Enforce that elements with ARIA roles must have all required attributes for that role. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-has-required-aria-props.md */ - 'no-nested-ternary'?: Linter.RuleEntry<[]> + 'jsx-a11y/role-has-required-aria-props'?: Linter.RuleEntry<JsxA11YRoleHasRequiredAriaProps> /** - * Disallow `new` operators outside of assignments or comparisons - * @see https://eslint.org/docs/latest/rules/no-new + * Enforce that elements with explicit or implicit roles defined contain only `aria-*` properties supported by that `role`. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-supports-aria-props.md */ - 'no-new'?: Linter.RuleEntry<[]> + 'jsx-a11y/role-supports-aria-props'?: Linter.RuleEntry<JsxA11YRoleSupportsAriaProps> /** - * Disallow `new` operators with the `Function` object - * @see https://eslint.org/docs/latest/rules/no-new-func + * Enforce `scope` prop is only used on `<th>` elements. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/scope.md */ - 'no-new-func'?: Linter.RuleEntry<[]> + 'jsx-a11y/scope'?: Linter.RuleEntry<JsxA11YScope> /** - * Disallow `new` operators with global non-constructor functions - * @see https://eslint.org/docs/latest/rules/no-new-native-nonconstructor + * Enforce `tabIndex` value is not greater than zero. + * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/tabindex-no-positive.md */ - 'no-new-native-nonconstructor'?: Linter.RuleEntry<[]> + 'jsx-a11y/tabindex-no-positive'?: Linter.RuleEntry<JsxA11YTabindexNoPositive> /** - * Disallow `Object` constructors - * @see https://eslint.org/docs/latest/rules/no-new-object + * Enforce the consistent use of either double or single quotes in JSX attributes + * @see https://eslint.org/docs/latest/rules/jsx-quotes * @deprecated */ - 'no-new-object'?: Linter.RuleEntry<[]> + 'jsx-quotes'?: Linter.RuleEntry<JsxQuotes> /** - * Disallow `new` operators with calls to `require` - * @see https://eslint.org/docs/latest/rules/no-new-require + * Enforce consistent spacing between keys and values in object literal properties + * @see https://eslint.org/docs/latest/rules/key-spacing * @deprecated */ - 'no-new-require'?: Linter.RuleEntry<[]> + 'key-spacing'?: Linter.RuleEntry<KeySpacing> /** - * Disallow `new` operators with the `Symbol` object - * @see https://eslint.org/docs/latest/rules/no-new-symbol + * Enforce consistent spacing before and after keywords + * @see https://eslint.org/docs/latest/rules/keyword-spacing * @deprecated */ - 'no-new-symbol'?: Linter.RuleEntry<[]> + 'keyword-spacing'?: Linter.RuleEntry<KeywordSpacing> /** - * Disallow `new` operators with the `String`, `Number`, and `Boolean` objects - * @see https://eslint.org/docs/latest/rules/no-new-wrappers + * Enforce position of line comments + * @see https://eslint.org/docs/latest/rules/line-comment-position + * @deprecated */ - 'no-new-wrappers'?: Linter.RuleEntry<[]> + 'line-comment-position'?: Linter.RuleEntry<LineCommentPosition> /** - * Disallow `\8` and `\9` escape sequences in string literals - * @see https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape + * Enforce consistent linebreak style + * @see https://eslint.org/docs/latest/rules/linebreak-style + * @deprecated */ - 'no-nonoctal-decimal-escape'?: Linter.RuleEntry<[]> + 'linebreak-style'?: Linter.RuleEntry<LinebreakStyle> /** - * Disallow calling global object properties as functions - * @see https://eslint.org/docs/latest/rules/no-obj-calls + * Require empty lines around comments + * @see https://eslint.org/docs/latest/rules/lines-around-comment + * @deprecated */ - 'no-obj-calls'?: Linter.RuleEntry<[]> + 'lines-around-comment'?: Linter.RuleEntry<LinesAroundComment> /** - * Disallow calls to the `Object` constructor without an argument - * @see https://eslint.org/docs/latest/rules/no-object-constructor + * Require or disallow newlines around directives + * @see https://eslint.org/docs/latest/rules/lines-around-directive + * @deprecated */ - 'no-object-constructor'?: Linter.RuleEntry<[]> + 'lines-around-directive'?: Linter.RuleEntry<LinesAroundDirective> /** - * Disallow octal literals - * @see https://eslint.org/docs/latest/rules/no-octal + * Require or disallow an empty line between class members + * @see https://eslint.org/docs/latest/rules/lines-between-class-members + * @deprecated */ - 'no-octal'?: Linter.RuleEntry<[]> + 'lines-between-class-members'?: Linter.RuleEntry<LinesBetweenClassMembers> /** - * Disallow octal escape sequences in string literals - * @see https://eslint.org/docs/latest/rules/no-octal-escape + * Require or disallow logical assignment operator shorthand + * @see https://eslint.org/docs/latest/rules/logical-assignment-operators */ - 'no-octal-escape'?: Linter.RuleEntry<[]> + 'logical-assignment-operators'?: Linter.RuleEntry<LogicalAssignmentOperators> /** - * Disallow reassigning function parameters - * @see https://eslint.org/docs/latest/rules/no-param-reassign + * Require languages for fenced code blocks + * @see https://github.com/eslint/markdown/blob/main/docs/rules/fenced-code-language.md */ - 'no-param-reassign'?: Linter.RuleEntry<NoParamReassign> + 'markdown/fenced-code-language'?: Linter.RuleEntry<MarkdownFencedCodeLanguage> /** - * Disallow string concatenation with `__dirname` and `__filename` - * @see https://eslint.org/docs/latest/rules/no-path-concat - * @deprecated + * Require or disallow metadata for fenced code blocks + * @see https://github.com/eslint/markdown/blob/main/docs/rules/fenced-code-meta.md */ - 'no-path-concat'?: Linter.RuleEntry<[]> + 'markdown/fenced-code-meta'?: Linter.RuleEntry<MarkdownFencedCodeMeta> /** - * Disallow the unary operators `++` and `--` - * @see https://eslint.org/docs/latest/rules/no-plusplus + * Enforce heading levels increment by one + * @see https://github.com/eslint/markdown/blob/main/docs/rules/heading-increment.md */ - 'no-plusplus'?: Linter.RuleEntry<NoPlusplus> + 'markdown/heading-increment'?: Linter.RuleEntry<MarkdownHeadingIncrement> /** - * Disallow the use of `process.env` - * @see https://eslint.org/docs/latest/rules/no-process-env - * @deprecated + * Disallow bare URLs + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-bare-urls.md */ - 'no-process-env'?: Linter.RuleEntry<[]> + 'markdown/no-bare-urls'?: Linter.RuleEntry<[]> /** - * Disallow the use of `process.exit()` - * @see https://eslint.org/docs/latest/rules/no-process-exit - * @deprecated + * Disallow duplicate definitions + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-duplicate-definitions.md */ - 'no-process-exit'?: Linter.RuleEntry<[]> + 'markdown/no-duplicate-definitions'?: Linter.RuleEntry<MarkdownNoDuplicateDefinitions> /** - * Disallow returning values from Promise executor functions - * @see https://eslint.org/docs/latest/rules/no-promise-executor-return + * Disallow duplicate headings in the same document + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-duplicate-headings.md */ - 'no-promise-executor-return'?: Linter.RuleEntry<NoPromiseExecutorReturn> + 'markdown/no-duplicate-headings'?: Linter.RuleEntry<MarkdownNoDuplicateHeadings> /** - * Disallow the use of the `__proto__` property - * @see https://eslint.org/docs/latest/rules/no-proto + * Disallow empty definitions + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-definitions.md */ - 'no-proto'?: Linter.RuleEntry<[]> + 'markdown/no-empty-definitions'?: Linter.RuleEntry<MarkdownNoEmptyDefinitions> /** - * Disallow calling some `Object.prototype` methods directly on objects - * @see https://eslint.org/docs/latest/rules/no-prototype-builtins + * Disallow empty images + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-images.md */ - 'no-prototype-builtins'?: Linter.RuleEntry<[]> + 'markdown/no-empty-images'?: Linter.RuleEntry<[]> /** - * Disallow variable redeclaration - * @see https://eslint.org/docs/latest/rules/no-redeclare + * Disallow empty links + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-links.md */ - 'no-redeclare'?: Linter.RuleEntry<NoRedeclare> + 'markdown/no-empty-links'?: Linter.RuleEntry<[]> /** - * Disallow multiple spaces in regular expressions - * @see https://eslint.org/docs/latest/rules/no-regex-spaces + * Disallow HTML tags + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-html.md */ - 'no-regex-spaces'?: Linter.RuleEntry<[]> + 'markdown/no-html'?: Linter.RuleEntry<MarkdownNoHtml> /** - * Disallow specified names in exports - * @see https://eslint.org/docs/latest/rules/no-restricted-exports + * Disallow invalid label references + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-invalid-label-refs.md */ - 'no-restricted-exports'?: Linter.RuleEntry<NoRestrictedExports> + 'markdown/no-invalid-label-refs'?: Linter.RuleEntry<[]> /** - * Disallow specified global variables - * @see https://eslint.org/docs/latest/rules/no-restricted-globals + * Disallow headings without a space after the hash characters + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-atx-heading-space.md */ - 'no-restricted-globals'?: Linter.RuleEntry<NoRestrictedGlobals> + 'markdown/no-missing-atx-heading-space'?: Linter.RuleEntry<MarkdownNoMissingAtxHeadingSpace> /** - * Disallow specified modules when loaded by `import` - * @see https://eslint.org/docs/latest/rules/no-restricted-imports + * Disallow missing label references + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-label-refs.md */ - 'no-restricted-imports'?: Linter.RuleEntry<NoRestrictedImports> + 'markdown/no-missing-label-refs'?: Linter.RuleEntry<MarkdownNoMissingLabelRefs> /** - * Disallow specified modules when loaded by `require` - * @see https://eslint.org/docs/latest/rules/no-restricted-modules - * @deprecated + * Disallow link fragments that do not reference valid headings + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-link-fragments.md */ - 'no-restricted-modules'?: Linter.RuleEntry<NoRestrictedModules> + 'markdown/no-missing-link-fragments'?: Linter.RuleEntry<MarkdownNoMissingLinkFragments> /** - * Disallow certain properties on certain objects - * @see https://eslint.org/docs/latest/rules/no-restricted-properties + * Disallow multiple H1 headings in the same document + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-multiple-h1.md */ - 'no-restricted-properties'?: Linter.RuleEntry<NoRestrictedProperties> + 'markdown/no-multiple-h1'?: Linter.RuleEntry<MarkdownNoMultipleH1> /** - * Disallow specified syntax - * @see https://eslint.org/docs/latest/rules/no-restricted-syntax + * Disallow URLs that match defined reference identifiers + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-reference-like-urls.md */ - 'no-restricted-syntax'?: Linter.RuleEntry<NoRestrictedSyntax> + 'markdown/no-reference-like-urls'?: Linter.RuleEntry<[]> /** - * Disallow assignment operators in `return` statements - * @see https://eslint.org/docs/latest/rules/no-return-assign + * Disallow reversed link and image syntax + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-reversed-media-syntax.md */ - 'no-return-assign'?: Linter.RuleEntry<NoReturnAssign> + 'markdown/no-reversed-media-syntax'?: Linter.RuleEntry<[]> /** - * Disallow unnecessary `return await` - * @see https://eslint.org/docs/latest/rules/no-return-await - * @deprecated + * Disallow spaces around emphasis markers + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-space-in-emphasis.md */ - 'no-return-await'?: Linter.RuleEntry<[]> + 'markdown/no-space-in-emphasis'?: Linter.RuleEntry<MarkdownNoSpaceInEmphasis> /** - * Disallow `javascript:` URLs - * @see https://eslint.org/docs/latest/rules/no-script-url + * Disallow unused definitions + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-unused-definitions.md */ - 'no-script-url'?: Linter.RuleEntry<[]> + 'markdown/no-unused-definitions'?: Linter.RuleEntry<MarkdownNoUnusedDefinitions> /** - * Disallow assignments where both sides are exactly the same - * @see https://eslint.org/docs/latest/rules/no-self-assign + * Require alternative text for images + * @see https://github.com/eslint/markdown/blob/main/docs/rules/require-alt-text.md */ - 'no-self-assign'?: Linter.RuleEntry<NoSelfAssign> + 'markdown/require-alt-text'?: Linter.RuleEntry<[]> /** - * Disallow comparisons where both sides are exactly the same - * @see https://eslint.org/docs/latest/rules/no-self-compare + * Disallow data rows in a GitHub Flavored Markdown table from having more cells than the header row + * @see https://github.com/eslint/markdown/blob/main/docs/rules/table-column-count.md */ - 'no-self-compare'?: Linter.RuleEntry<[]> + 'markdown/table-column-count'?: Linter.RuleEntry<MarkdownTableColumnCount> /** - * Disallow comma operators - * @see https://eslint.org/docs/latest/rules/no-sequences + * Enforce a maximum number of classes per file + * @see https://eslint.org/docs/latest/rules/max-classes-per-file */ - 'no-sequences'?: Linter.RuleEntry<NoSequences> + 'max-classes-per-file'?: Linter.RuleEntry<MaxClassesPerFile> /** - * Disallow returning values from setters - * @see https://eslint.org/docs/latest/rules/no-setter-return + * Enforce a maximum depth that blocks can be nested + * @see https://eslint.org/docs/latest/rules/max-depth */ - 'no-setter-return'?: Linter.RuleEntry<[]> + 'max-depth'?: Linter.RuleEntry<MaxDepth> /** - * Disallow variable declarations from shadowing variables declared in the outer scope - * @see https://eslint.org/docs/latest/rules/no-shadow + * Enforce a maximum line length + * @see https://eslint.org/docs/latest/rules/max-len + * @deprecated */ - 'no-shadow'?: Linter.RuleEntry<NoShadow> + 'max-len'?: Linter.RuleEntry<MaxLen> /** - * Disallow identifiers from shadowing restricted names - * @see https://eslint.org/docs/latest/rules/no-shadow-restricted-names + * Enforce a maximum number of lines per file + * @see https://eslint.org/docs/latest/rules/max-lines */ - 'no-shadow-restricted-names'?: Linter.RuleEntry<NoShadowRestrictedNames> + 'max-lines'?: Linter.RuleEntry<MaxLines> /** - * Disallow spacing between function identifiers and their applications (deprecated) - * @see https://eslint.org/docs/latest/rules/no-spaced-func - * @deprecated + * Enforce a maximum number of lines of code in a function + * @see https://eslint.org/docs/latest/rules/max-lines-per-function */ - 'no-spaced-func'?: Linter.RuleEntry<[]> + 'max-lines-per-function'?: Linter.RuleEntry<MaxLinesPerFunction> /** - * Disallow sparse arrays - * @see https://eslint.org/docs/latest/rules/no-sparse-arrays + * Enforce a maximum depth that callbacks can be nested + * @see https://eslint.org/docs/latest/rules/max-nested-callbacks */ - 'no-sparse-arrays'?: Linter.RuleEntry<[]> + 'max-nested-callbacks'?: Linter.RuleEntry<MaxNestedCallbacks> /** - * Disallow synchronous methods - * @see https://eslint.org/docs/latest/rules/no-sync - * @deprecated + * Enforce a maximum number of parameters in function definitions + * @see https://eslint.org/docs/latest/rules/max-params */ - 'no-sync'?: Linter.RuleEntry<NoSync> + 'max-params'?: Linter.RuleEntry<MaxParams> /** - * Disallow all tabs - * @see https://eslint.org/docs/latest/rules/no-tabs - * @deprecated + * Enforce a maximum number of statements allowed in function blocks + * @see https://eslint.org/docs/latest/rules/max-statements */ - 'no-tabs'?: Linter.RuleEntry<NoTabs> + 'max-statements'?: Linter.RuleEntry<MaxStatements> /** - * Disallow template literal placeholder syntax in regular strings - * @see https://eslint.org/docs/latest/rules/no-template-curly-in-string + * Enforce a maximum number of statements allowed per line + * @see https://eslint.org/docs/latest/rules/max-statements-per-line + * @deprecated */ - 'no-template-curly-in-string'?: Linter.RuleEntry<[]> + 'max-statements-per-line'?: Linter.RuleEntry<MaxStatementsPerLine> /** - * Disallow ternary operators - * @see https://eslint.org/docs/latest/rules/no-ternary + * Enforce a particular style for multiline comments + * @see https://eslint.org/docs/latest/rules/multiline-comment-style + * @deprecated */ - 'no-ternary'?: Linter.RuleEntry<[]> + 'multiline-comment-style'?: Linter.RuleEntry<MultilineCommentStyle> /** - * Disallow `this`/`super` before calling `super()` in constructors - * @see https://eslint.org/docs/latest/rules/no-this-before-super + * Enforce newlines between operands of ternary expressions + * @see https://eslint.org/docs/latest/rules/multiline-ternary + * @deprecated */ - 'no-this-before-super'?: Linter.RuleEntry<[]> + 'multiline-ternary'?: Linter.RuleEntry<MultilineTernary> /** - * Disallow throwing literals as exceptions - * @see https://eslint.org/docs/latest/rules/no-throw-literal + * Require constructor names to begin with a capital letter + * @see https://eslint.org/docs/latest/rules/new-cap */ - 'no-throw-literal'?: Linter.RuleEntry<[]> + 'new-cap'?: Linter.RuleEntry<NewCap> /** - * Disallow trailing whitespace at the end of lines - * @see https://eslint.org/docs/latest/rules/no-trailing-spaces + * Enforce or disallow parentheses when invoking a constructor with no arguments + * @see https://eslint.org/docs/latest/rules/new-parens * @deprecated */ - 'no-trailing-spaces'?: Linter.RuleEntry<NoTrailingSpaces> + 'new-parens'?: Linter.RuleEntry<NewParens> /** - * Disallow `let` or `var` variables that are read but never assigned - * @see https://eslint.org/docs/latest/rules/no-unassigned-vars + * Require or disallow an empty line after variable declarations + * @see https://eslint.org/docs/latest/rules/newline-after-var + * @deprecated */ - 'no-unassigned-vars'?: Linter.RuleEntry<[]> + 'newline-after-var'?: Linter.RuleEntry<NewlineAfterVar> /** - * Disallow the use of undeclared variables unless mentioned in `/*global *\/` comments - * @see https://eslint.org/docs/latest/rules/no-undef + * Require an empty line before `return` statements + * @see https://eslint.org/docs/latest/rules/newline-before-return + * @deprecated */ - 'no-undef'?: Linter.RuleEntry<NoUndef> + 'newline-before-return'?: Linter.RuleEntry<[]> /** - * Disallow initializing variables to `undefined` - * @see https://eslint.org/docs/latest/rules/no-undef-init + * Require a newline after each call in a method chain + * @see https://eslint.org/docs/latest/rules/newline-per-chained-call + * @deprecated */ - 'no-undef-init'?: Linter.RuleEntry<[]> + 'newline-per-chained-call'?: Linter.RuleEntry<NewlinePerChainedCall> /** - * Disallow the use of `undefined` as an identifier - * @see https://eslint.org/docs/latest/rules/no-undefined + * Disallow the use of `alert`, `confirm`, and `prompt` + * @see https://eslint.org/docs/latest/rules/no-alert */ - 'no-undefined'?: Linter.RuleEntry<[]> + 'no-alert'?: Linter.RuleEntry<[]> /** - * Disallow dangling underscores in identifiers - * @see https://eslint.org/docs/latest/rules/no-underscore-dangle + * Disallow `Array` constructors + * @see https://eslint.org/docs/latest/rules/no-array-constructor */ - 'no-underscore-dangle'?: Linter.RuleEntry<NoUnderscoreDangle> + 'no-array-constructor'?: Linter.RuleEntry<[]> /** - * Disallow confusing multiline expressions - * @see https://eslint.org/docs/latest/rules/no-unexpected-multiline + * Disallow using an async function as a Promise executor + * @see https://eslint.org/docs/latest/rules/no-async-promise-executor */ - 'no-unexpected-multiline'?: Linter.RuleEntry<[]> + 'no-async-promise-executor'?: Linter.RuleEntry<[]> /** - * Disallow unmodified loop conditions - * @see https://eslint.org/docs/latest/rules/no-unmodified-loop-condition + * Disallow `await` inside of loops + * @see https://eslint.org/docs/latest/rules/no-await-in-loop */ - 'no-unmodified-loop-condition'?: Linter.RuleEntry<[]> + 'no-await-in-loop'?: Linter.RuleEntry<[]> /** - * Disallow ternary operators when simpler alternatives exist - * @see https://eslint.org/docs/latest/rules/no-unneeded-ternary + * Disallow bitwise operators + * @see https://eslint.org/docs/latest/rules/no-bitwise */ - 'no-unneeded-ternary'?: Linter.RuleEntry<NoUnneededTernary> + 'no-bitwise'?: Linter.RuleEntry<NoBitwise> /** - * Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements - * @see https://eslint.org/docs/latest/rules/no-unreachable + * Disallow use of the `Buffer()` constructor + * @see https://eslint.org/docs/latest/rules/no-buffer-constructor + * @deprecated */ - 'no-unreachable'?: Linter.RuleEntry<[]> + 'no-buffer-constructor'?: Linter.RuleEntry<[]> /** - * Disallow loops with a body that allows only one iteration - * @see https://eslint.org/docs/latest/rules/no-unreachable-loop + * Disallow the use of `arguments.caller` or `arguments.callee` + * @see https://eslint.org/docs/latest/rules/no-caller */ - 'no-unreachable-loop'?: Linter.RuleEntry<NoUnreachableLoop> + 'no-caller'?: Linter.RuleEntry<[]> /** - * Disallow control flow statements in `finally` blocks - * @see https://eslint.org/docs/latest/rules/no-unsafe-finally + * Disallow lexical declarations in case clauses + * @see https://eslint.org/docs/latest/rules/no-case-declarations */ - 'no-unsafe-finally'?: Linter.RuleEntry<[]> + 'no-case-declarations'?: Linter.RuleEntry<[]> /** - * Disallow negating the left operand of relational operators - * @see https://eslint.org/docs/latest/rules/no-unsafe-negation + * Disallow `catch` clause parameters from shadowing variables in the outer scope + * @see https://eslint.org/docs/latest/rules/no-catch-shadow + * @deprecated */ - 'no-unsafe-negation'?: Linter.RuleEntry<NoUnsafeNegation> + 'no-catch-shadow'?: Linter.RuleEntry<[]> /** - * Disallow use of optional chaining in contexts where the `undefined` value is not allowed - * @see https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining + * Disallow reassigning class members + * @see https://eslint.org/docs/latest/rules/no-class-assign */ - 'no-unsafe-optional-chaining'?: Linter.RuleEntry<NoUnsafeOptionalChaining> + 'no-class-assign'?: Linter.RuleEntry<[]> /** - * Disallow unused expressions - * @see https://eslint.org/docs/latest/rules/no-unused-expressions + * Disallow comparing against `-0` + * @see https://eslint.org/docs/latest/rules/no-compare-neg-zero */ - 'no-unused-expressions'?: Linter.RuleEntry<NoUnusedExpressions> + 'no-compare-neg-zero'?: Linter.RuleEntry<[]> /** - * Disallow unused labels - * @see https://eslint.org/docs/latest/rules/no-unused-labels + * Disallow assignment operators in conditional expressions + * @see https://eslint.org/docs/latest/rules/no-cond-assign */ - 'no-unused-labels'?: Linter.RuleEntry<[]> + 'no-cond-assign'?: Linter.RuleEntry<NoCondAssign> /** - * Disallow unused private class members - * @see https://eslint.org/docs/latest/rules/no-unused-private-class-members + * Disallow arrow functions where they could be confused with comparisons + * @see https://eslint.org/docs/latest/rules/no-confusing-arrow + * @deprecated */ - 'no-unused-private-class-members'?: Linter.RuleEntry<[]> + 'no-confusing-arrow'?: Linter.RuleEntry<NoConfusingArrow> /** - * Disallow unused variables - * @see https://eslint.org/docs/latest/rules/no-unused-vars + * Disallow the use of `console` + * @see https://eslint.org/docs/latest/rules/no-console */ - 'no-unused-vars'?: Linter.RuleEntry<NoUnusedVars> + 'no-console'?: Linter.RuleEntry<NoConsole> /** - * Disallow the use of variables before they are defined - * @see https://eslint.org/docs/latest/rules/no-use-before-define + * Disallow reassigning `const`, `using`, and `await using` variables + * @see https://eslint.org/docs/latest/rules/no-const-assign */ - 'no-use-before-define'?: Linter.RuleEntry<NoUseBeforeDefine> + 'no-const-assign'?: Linter.RuleEntry<[]> /** - * Disallow variable assignments when the value is not used - * @see https://eslint.org/docs/latest/rules/no-useless-assignment + * Disallow expressions where the operation doesn't affect the value + * @see https://eslint.org/docs/latest/rules/no-constant-binary-expression */ - 'no-useless-assignment'?: Linter.RuleEntry<[]> + 'no-constant-binary-expression'?: Linter.RuleEntry<[]> /** - * Disallow useless backreferences in regular expressions - * @see https://eslint.org/docs/latest/rules/no-useless-backreference + * Disallow constant expressions in conditions + * @see https://eslint.org/docs/latest/rules/no-constant-condition */ - 'no-useless-backreference'?: Linter.RuleEntry<[]> + 'no-constant-condition'?: Linter.RuleEntry<NoConstantCondition> /** - * Disallow unnecessary calls to `.call()` and `.apply()` - * @see https://eslint.org/docs/latest/rules/no-useless-call + * Disallow returning value from constructor + * @see https://eslint.org/docs/latest/rules/no-constructor-return */ - 'no-useless-call'?: Linter.RuleEntry<[]> + 'no-constructor-return'?: Linter.RuleEntry<[]> /** - * Disallow unnecessary `catch` clauses - * @see https://eslint.org/docs/latest/rules/no-useless-catch + * Disallow `continue` statements + * @see https://eslint.org/docs/latest/rules/no-continue */ - 'no-useless-catch'?: Linter.RuleEntry<[]> + 'no-continue'?: Linter.RuleEntry<[]> /** - * Disallow unnecessary computed property keys in objects and classes - * @see https://eslint.org/docs/latest/rules/no-useless-computed-key + * Disallow control characters in regular expressions + * @see https://eslint.org/docs/latest/rules/no-control-regex */ - 'no-useless-computed-key'?: Linter.RuleEntry<NoUselessComputedKey> + 'no-control-regex'?: Linter.RuleEntry<[]> /** - * Disallow unnecessary concatenation of literals or template literals - * @see https://eslint.org/docs/latest/rules/no-useless-concat + * Disallow the use of `debugger` + * @see https://eslint.org/docs/latest/rules/no-debugger */ - 'no-useless-concat'?: Linter.RuleEntry<[]> + 'no-debugger'?: Linter.RuleEntry<[]> /** - * Disallow unnecessary constructors - * @see https://eslint.org/docs/latest/rules/no-useless-constructor + * Disallow deleting variables + * @see https://eslint.org/docs/latest/rules/no-delete-var */ - 'no-useless-constructor'?: Linter.RuleEntry<[]> + 'no-delete-var'?: Linter.RuleEntry<[]> /** - * Disallow unnecessary escape characters - * @see https://eslint.org/docs/latest/rules/no-useless-escape + * Disallow equal signs explicitly at the beginning of regular expressions + * @see https://eslint.org/docs/latest/rules/no-div-regex */ - 'no-useless-escape'?: Linter.RuleEntry<NoUselessEscape> + 'no-div-regex'?: Linter.RuleEntry<[]> /** - * Disallow renaming import, export, and destructured assignments to the same name - * @see https://eslint.org/docs/latest/rules/no-useless-rename + * Disallow duplicate arguments in `function` definitions + * @see https://eslint.org/docs/latest/rules/no-dupe-args */ - 'no-useless-rename'?: Linter.RuleEntry<NoUselessRename> + 'no-dupe-args'?: Linter.RuleEntry<[]> /** - * Disallow redundant return statements - * @see https://eslint.org/docs/latest/rules/no-useless-return + * Disallow duplicate class members + * @see https://eslint.org/docs/latest/rules/no-dupe-class-members */ - 'no-useless-return'?: Linter.RuleEntry<[]> + 'no-dupe-class-members'?: Linter.RuleEntry<[]> /** - * Require `let` or `const` instead of `var` - * @see https://eslint.org/docs/latest/rules/no-var + * Disallow duplicate conditions in if-else-if chains + * @see https://eslint.org/docs/latest/rules/no-dupe-else-if */ - 'no-var'?: Linter.RuleEntry<[]> + 'no-dupe-else-if'?: Linter.RuleEntry<[]> /** - * Disallow `void` operators - * @see https://eslint.org/docs/latest/rules/no-void + * Disallow duplicate keys in object literals + * @see https://eslint.org/docs/latest/rules/no-dupe-keys */ - 'no-void'?: Linter.RuleEntry<NoVoid> + 'no-dupe-keys'?: Linter.RuleEntry<[]> /** - * Disallow specified warning terms in comments - * @see https://eslint.org/docs/latest/rules/no-warning-comments + * Disallow duplicate case labels + * @see https://eslint.org/docs/latest/rules/no-duplicate-case */ - 'no-warning-comments'?: Linter.RuleEntry<NoWarningComments> + 'no-duplicate-case'?: Linter.RuleEntry<[]> /** - * Disallow whitespace before properties - * @see https://eslint.org/docs/latest/rules/no-whitespace-before-property - * @deprecated + * Disallow duplicate module imports + * @see https://eslint.org/docs/latest/rules/no-duplicate-imports */ - 'no-whitespace-before-property'?: Linter.RuleEntry<[]> + 'no-duplicate-imports'?: Linter.RuleEntry<NoDuplicateImports> /** - * Disallow `with` statements - * @see https://eslint.org/docs/latest/rules/no-with + * Disallow `else` blocks after `return` statements in `if` statements + * @see https://eslint.org/docs/latest/rules/no-else-return */ - 'no-with'?: Linter.RuleEntry<[]> + 'no-else-return'?: Linter.RuleEntry<NoElseReturn> /** - * require or disallow absolute version of dependency. - * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/absolute-version.html + * Disallow empty block statements + * @see https://eslint.org/docs/latest/rules/no-empty */ - 'node-dependencies/absolute-version'?: Linter.RuleEntry<NodeDependenciesAbsoluteVersion> + 'no-empty'?: Linter.RuleEntry<NoEmpty> /** - * enforce the versions of the engines of the dependencies to be compatible. - * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/compat-engines.html + * Disallow empty character classes in regular expressions + * @see https://eslint.org/docs/latest/rules/no-empty-character-class */ - 'node-dependencies/compat-engines'?: Linter.RuleEntry<NodeDependenciesCompatEngines> + 'no-empty-character-class'?: Linter.RuleEntry<[]> /** - * disallow having dependencies on deprecate packages. - * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/no-deprecated.html + * Disallow empty functions + * @see https://eslint.org/docs/latest/rules/no-empty-function */ - 'node-dependencies/no-deprecated'?: Linter.RuleEntry<NodeDependenciesNoDeprecated> + 'no-empty-function'?: Linter.RuleEntry<NoEmptyFunction> /** - * disallow duplicate dependencies. - * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/no-dupe-deps.html + * Disallow empty destructuring patterns + * @see https://eslint.org/docs/latest/rules/no-empty-pattern */ - 'node-dependencies/no-dupe-deps'?: Linter.RuleEntry<[]> + 'no-empty-pattern'?: Linter.RuleEntry<NoEmptyPattern> /** - * Disallows dependence on the specified package. - * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/no-restricted-deps.html + * Disallow empty static blocks + * @see https://eslint.org/docs/latest/rules/no-empty-static-block */ - 'node-dependencies/no-restricted-deps'?: Linter.RuleEntry<NodeDependenciesNoRestrictedDeps> + 'no-empty-static-block'?: Linter.RuleEntry<[]> /** - * require caret(`^`) version instead of range version. - * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/prefer-caret-range-version.html + * Disallow `null` comparisons without type-checking operators + * @see https://eslint.org/docs/latest/rules/no-eq-null */ - 'node-dependencies/prefer-caret-range-version'?: Linter.RuleEntry<[]> + 'no-eq-null'?: Linter.RuleEntry<[]> /** - * require tilde(`~`) version instead of range version. - * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/prefer-tilde-range-version.html + * Disallow the use of `eval()` + * @see https://eslint.org/docs/latest/rules/no-eval */ - 'node-dependencies/prefer-tilde-range-version'?: Linter.RuleEntry<[]> + 'no-eval'?: Linter.RuleEntry<NoEval> /** - * Require provenance information for dependencies - * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/require-provenance-deps.html + * Disallow reassigning exceptions in `catch` clauses + * @see https://eslint.org/docs/latest/rules/no-ex-assign */ - 'node-dependencies/require-provenance-deps'?: Linter.RuleEntry<NodeDependenciesRequireProvenanceDeps> + 'no-ex-assign'?: Linter.RuleEntry<[]> /** - * enforce the versions of the engines of the dependencies to be compatible. - * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/valid-engines.html - * @deprecated + * Disallow extending native types + * @see https://eslint.org/docs/latest/rules/no-extend-native */ - 'node-dependencies/valid-engines'?: Linter.RuleEntry<NodeDependenciesValidEngines> + 'no-extend-native'?: Linter.RuleEntry<NoExtendNative> /** - * enforce versions that is valid as a semantic version. - * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/valid-semver.html + * Disallow unnecessary calls to `.bind()` + * @see https://eslint.org/docs/latest/rules/no-extra-bind */ - 'node-dependencies/valid-semver'?: Linter.RuleEntry<[]> + 'no-extra-bind'?: Linter.RuleEntry<[]> /** - * require `return` statements after callbacks - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/callback-return.md + * Disallow unnecessary boolean casts + * @see https://eslint.org/docs/latest/rules/no-extra-boolean-cast */ - 'node/callback-return'?: Linter.RuleEntry<NodeCallbackReturn> + 'no-extra-boolean-cast'?: Linter.RuleEntry<NoExtraBooleanCast> /** - * enforce either `module.exports` or `exports` - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/exports-style.md + * Disallow unnecessary labels + * @see https://eslint.org/docs/latest/rules/no-extra-label */ - 'node/exports-style'?: Linter.RuleEntry<NodeExportsStyle> + 'no-extra-label'?: Linter.RuleEntry<[]> /** - * enforce the style of file extensions in `import` declarations - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/file-extension-in-import.md + * Disallow unnecessary parentheses + * @see https://eslint.org/docs/latest/rules/no-extra-parens + * @deprecated */ - 'node/file-extension-in-import'?: Linter.RuleEntry<NodeFileExtensionInImport> + 'no-extra-parens'?: Linter.RuleEntry<NoExtraParens> /** - * require `require()` calls to be placed at top-level module scope - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/global-require.md + * Disallow unnecessary semicolons + * @see https://eslint.org/docs/latest/rules/no-extra-semi + * @deprecated */ - 'node/global-require'?: Linter.RuleEntry<[]> + 'no-extra-semi'?: Linter.RuleEntry<[]> /** - * require error handling in callbacks - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/handle-callback-err.md + * Disallow fallthrough of `case` statements + * @see https://eslint.org/docs/latest/rules/no-fallthrough */ - 'node/handle-callback-err'?: Linter.RuleEntry<NodeHandleCallbackErr> + 'no-fallthrough'?: Linter.RuleEntry<NoFallthrough> /** - * require correct usage of hashbang - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/hashbang.md + * Disallow leading or trailing decimal points in numeric literals + * @see https://eslint.org/docs/latest/rules/no-floating-decimal + * @deprecated */ - 'node/hashbang'?: Linter.RuleEntry<NodeHashbang> + 'no-floating-decimal'?: Linter.RuleEntry<[]> /** - * enforce Node.js-style error-first callback pattern is followed - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-callback-literal.md + * Disallow reassigning `function` declarations + * @see https://eslint.org/docs/latest/rules/no-func-assign */ - 'node/no-callback-literal'?: Linter.RuleEntry<[]> + 'no-func-assign'?: Linter.RuleEntry<[]> /** - * disallow deprecated APIs - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-deprecated-api.md + * Disallow assignments to native objects or read-only global variables + * @see https://eslint.org/docs/latest/rules/no-global-assign */ - 'node/no-deprecated-api'?: Linter.RuleEntry<NodeNoDeprecatedApi> + 'no-global-assign'?: Linter.RuleEntry<NoGlobalAssign> /** - * disallow the assignment to `exports` - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-exports-assign.md + * Disallow shorthand type conversions + * @see https://eslint.org/docs/latest/rules/no-implicit-coercion */ - 'node/no-exports-assign'?: Linter.RuleEntry<[]> + 'no-implicit-coercion'?: Linter.RuleEntry<NoImplicitCoercion> /** - * disallow `import` declarations which import extraneous modules - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-extraneous-import.md + * Disallow declarations in the global scope + * @see https://eslint.org/docs/latest/rules/no-implicit-globals */ - 'node/no-extraneous-import'?: Linter.RuleEntry<NodeNoExtraneousImport> + 'no-implicit-globals'?: Linter.RuleEntry<NoImplicitGlobals> /** - * disallow `require()` expressions which import extraneous modules - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-extraneous-require.md + * Disallow the use of `eval()`-like methods + * @see https://eslint.org/docs/latest/rules/no-implied-eval */ - 'node/no-extraneous-require'?: Linter.RuleEntry<NodeNoExtraneousRequire> + 'no-implied-eval'?: Linter.RuleEntry<[]> /** - * disallow third-party modules which are hiding core modules - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-hide-core-modules.md - * @deprecated + * Disallow assigning to imported bindings + * @see https://eslint.org/docs/latest/rules/no-import-assign */ - 'node/no-hide-core-modules'?: Linter.RuleEntry<NodeNoHideCoreModules> + 'no-import-assign'?: Linter.RuleEntry<[]> /** - * disallow `import` declarations which import missing modules - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-missing-import.md + * Disallow inline comments after code + * @see https://eslint.org/docs/latest/rules/no-inline-comments */ - 'node/no-missing-import'?: Linter.RuleEntry<NodeNoMissingImport> + 'no-inline-comments'?: Linter.RuleEntry<NoInlineComments> /** - * disallow `require()` expressions which import missing modules - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-missing-require.md + * Disallow variable or `function` declarations in nested blocks + * @see https://eslint.org/docs/latest/rules/no-inner-declarations */ - 'node/no-missing-require'?: Linter.RuleEntry<NodeNoMissingRequire> + 'no-inner-declarations'?: Linter.RuleEntry<NoInnerDeclarations> /** - * disallow `require` calls to be mixed with regular variable declarations - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-mixed-requires.md + * Disallow invalid regular expression strings in `RegExp` constructors + * @see https://eslint.org/docs/latest/rules/no-invalid-regexp */ - 'node/no-mixed-requires'?: Linter.RuleEntry<NodeNoMixedRequires> + 'no-invalid-regexp'?: Linter.RuleEntry<NoInvalidRegexp> /** - * disallow `new` operators with calls to `require` - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-new-require.md + * Disallow use of `this` in contexts where the value of `this` is `undefined` + * @see https://eslint.org/docs/latest/rules/no-invalid-this */ - 'node/no-new-require'?: Linter.RuleEntry<[]> + 'no-invalid-this'?: Linter.RuleEntry<NoInvalidThis> /** - * disallow string concatenation with `__dirname` and `__filename` - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-path-concat.md + * Disallow irregular whitespace + * @see https://eslint.org/docs/latest/rules/no-irregular-whitespace */ - 'node/no-path-concat'?: Linter.RuleEntry<[]> + 'no-irregular-whitespace'?: Linter.RuleEntry<NoIrregularWhitespace> /** - * disallow the use of `process.env` - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-process-env.md + * Disallow the use of the `__iterator__` property + * @see https://eslint.org/docs/latest/rules/no-iterator */ - 'node/no-process-env'?: Linter.RuleEntry<NodeNoProcessEnv> + 'no-iterator'?: Linter.RuleEntry<[]> /** - * disallow the use of `process.exit()` - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-process-exit.md + * Disallow labels that share a name with a variable + * @see https://eslint.org/docs/latest/rules/no-label-var */ - 'node/no-process-exit'?: Linter.RuleEntry<[]> + 'no-label-var'?: Linter.RuleEntry<[]> /** - * disallow specified modules when loaded by `import` declarations - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-restricted-import.md + * Disallow labeled statements + * @see https://eslint.org/docs/latest/rules/no-labels */ - 'node/no-restricted-import'?: Linter.RuleEntry<NodeNoRestrictedImport> + 'no-labels'?: Linter.RuleEntry<NoLabels> /** - * disallow specified modules when loaded by `require` - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-restricted-require.md + * Disallow unnecessary nested blocks + * @see https://eslint.org/docs/latest/rules/no-lone-blocks */ - 'node/no-restricted-require'?: Linter.RuleEntry<NodeNoRestrictedRequire> + 'no-lone-blocks'?: Linter.RuleEntry<[]> /** - * disallow synchronous methods - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-sync.md + * Disallow `if` statements as the only statement in `else` blocks + * @see https://eslint.org/docs/latest/rules/no-lonely-if */ - 'node/no-sync'?: Linter.RuleEntry<NodeNoSync> + 'no-lonely-if'?: Linter.RuleEntry<[]> /** - * disallow top-level `await` in published modules - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-top-level-await.md + * Disallow function declarations that contain unsafe references inside loop statements + * @see https://eslint.org/docs/latest/rules/no-loop-func */ - 'node/no-top-level-await'?: Linter.RuleEntry<NodeNoTopLevelAwait> + 'no-loop-func'?: Linter.RuleEntry<[]> /** - * disallow `bin` files that npm ignores - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unpublished-bin.md + * Disallow literal numbers that lose precision + * @see https://eslint.org/docs/latest/rules/no-loss-of-precision */ - 'node/no-unpublished-bin'?: Linter.RuleEntry<NodeNoUnpublishedBin> + 'no-loss-of-precision'?: Linter.RuleEntry<[]> /** - * disallow `import` declarations which import private modules - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unpublished-import.md + * Disallow magic numbers + * @see https://eslint.org/docs/latest/rules/no-magic-numbers */ - 'node/no-unpublished-import'?: Linter.RuleEntry<NodeNoUnpublishedImport> + 'no-magic-numbers'?: Linter.RuleEntry<NoMagicNumbers> /** - * disallow `require()` expressions which import private modules - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unpublished-require.md + * Disallow characters which are made with multiple code points in character class syntax + * @see https://eslint.org/docs/latest/rules/no-misleading-character-class */ - 'node/no-unpublished-require'?: Linter.RuleEntry<NodeNoUnpublishedRequire> + 'no-misleading-character-class'?: Linter.RuleEntry<NoMisleadingCharacterClass> /** - * disallow unsupported ECMAScript built-ins on the specified version - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unsupported-features/es-builtins.md + * Disallow mixed binary operators + * @see https://eslint.org/docs/latest/rules/no-mixed-operators + * @deprecated */ - 'node/no-unsupported-features/es-builtins'?: Linter.RuleEntry<NodeNoUnsupportedFeaturesEsBuiltins> + 'no-mixed-operators'?: Linter.RuleEntry<NoMixedOperators> /** - * disallow unsupported ECMAScript syntax on the specified version - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unsupported-features/es-syntax.md + * Disallow `require` calls to be mixed with regular variable declarations + * @see https://eslint.org/docs/latest/rules/no-mixed-requires + * @deprecated */ - 'node/no-unsupported-features/es-syntax'?: Linter.RuleEntry<NodeNoUnsupportedFeaturesEsSyntax> + 'no-mixed-requires'?: Linter.RuleEntry<NoMixedRequires> /** - * disallow unsupported Node.js built-in APIs on the specified version - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unsupported-features/node-builtins.md + * Disallow mixed spaces and tabs for indentation + * @see https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs + * @deprecated */ - 'node/no-unsupported-features/node-builtins'?: Linter.RuleEntry<NodeNoUnsupportedFeaturesNodeBuiltins> + 'no-mixed-spaces-and-tabs'?: Linter.RuleEntry<NoMixedSpacesAndTabs> /** - * enforce either `Buffer` or `require("buffer").Buffer` - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/buffer.md + * Disallow use of chained assignment expressions + * @see https://eslint.org/docs/latest/rules/no-multi-assign */ - 'node/prefer-global/buffer'?: Linter.RuleEntry<NodePreferGlobalBuffer> + 'no-multi-assign'?: Linter.RuleEntry<NoMultiAssign> /** - * enforce either `console` or `require("console")` - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/console.md + * Disallow multiple spaces + * @see https://eslint.org/docs/latest/rules/no-multi-spaces + * @deprecated */ - 'node/prefer-global/console'?: Linter.RuleEntry<NodePreferGlobalConsole> + 'no-multi-spaces'?: Linter.RuleEntry<NoMultiSpaces> /** - * enforce either `crypto` or `require("crypto").webcrypto` - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/crypto.md + * Disallow multiline strings + * @see https://eslint.org/docs/latest/rules/no-multi-str */ - 'node/prefer-global/crypto'?: Linter.RuleEntry<NodePreferGlobalCrypto> + 'no-multi-str'?: Linter.RuleEntry<[]> /** - * enforce either `process` or `require("process")` - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/process.md + * Disallow multiple empty lines + * @see https://eslint.org/docs/latest/rules/no-multiple-empty-lines + * @deprecated */ - 'node/prefer-global/process'?: Linter.RuleEntry<NodePreferGlobalProcess> + 'no-multiple-empty-lines'?: Linter.RuleEntry<NoMultipleEmptyLines> /** - * enforce either `TextDecoder` or `require("util").TextDecoder` - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/text-decoder.md + * Disallow assignments to native objects or read-only global variables + * @see https://eslint.org/docs/latest/rules/no-native-reassign + * @deprecated */ - 'node/prefer-global/text-decoder'?: Linter.RuleEntry<NodePreferGlobalTextDecoder> + 'no-native-reassign'?: Linter.RuleEntry<NoNativeReassign> /** - * enforce either `TextEncoder` or `require("util").TextEncoder` - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/text-encoder.md + * Disallow negated conditions + * @see https://eslint.org/docs/latest/rules/no-negated-condition */ - 'node/prefer-global/text-encoder'?: Linter.RuleEntry<NodePreferGlobalTextEncoder> + 'no-negated-condition'?: Linter.RuleEntry<[]> /** - * enforce either global timer functions or `require("timers")` - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/timers.md + * Disallow negating the left operand in `in` expressions + * @see https://eslint.org/docs/latest/rules/no-negated-in-lhs + * @deprecated */ - 'node/prefer-global/timers'?: Linter.RuleEntry<NodePreferGlobalTimers> + 'no-negated-in-lhs'?: Linter.RuleEntry<[]> /** - * enforce either `URL` or `require("url").URL` - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url.md + * Disallow nested ternary expressions + * @see https://eslint.org/docs/latest/rules/no-nested-ternary */ - 'node/prefer-global/url'?: Linter.RuleEntry<NodePreferGlobalUrl> + 'no-nested-ternary'?: Linter.RuleEntry<[]> /** - * enforce either `URLSearchParams` or `require("url").URLSearchParams` - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url-search-params.md + * Disallow `new` operators outside of assignments or comparisons + * @see https://eslint.org/docs/latest/rules/no-new */ - 'node/prefer-global/url-search-params'?: Linter.RuleEntry<NodePreferGlobalUrlSearchParams> + 'no-new'?: Linter.RuleEntry<[]> /** - * enforce using the `node:` protocol when importing Node.js builtin modules. - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-node-protocol.md + * Disallow `new` operators with the `Function` object + * @see https://eslint.org/docs/latest/rules/no-new-func */ - 'node/prefer-node-protocol'?: Linter.RuleEntry<NodePreferNodeProtocol> + 'no-new-func'?: Linter.RuleEntry<[]> /** - * enforce `require("dns").promises` - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-promises/dns.md + * Disallow `new` operators with global non-constructor functions + * @see https://eslint.org/docs/latest/rules/no-new-native-nonconstructor */ - 'node/prefer-promises/dns'?: Linter.RuleEntry<[]> + 'no-new-native-nonconstructor'?: Linter.RuleEntry<[]> /** - * enforce `require("fs").promises` - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-promises/fs.md + * Disallow `Object` constructors + * @see https://eslint.org/docs/latest/rules/no-new-object + * @deprecated */ - 'node/prefer-promises/fs'?: Linter.RuleEntry<[]> + 'no-new-object'?: Linter.RuleEntry<[]> /** - * require that `process.exit()` expressions use the same code path as `throw` - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/process-exit-as-throw.md + * Disallow `new` operators with calls to `require` + * @see https://eslint.org/docs/latest/rules/no-new-require + * @deprecated */ - 'node/process-exit-as-throw'?: Linter.RuleEntry<[]> + 'no-new-require'?: Linter.RuleEntry<[]> /** - * require correct usage of hashbang - * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/hashbang.md + * Disallow `new` operators with the `Symbol` object + * @see https://eslint.org/docs/latest/rules/no-new-symbol * @deprecated */ - 'node/shebang'?: Linter.RuleEntry<NodeShebang> + 'no-new-symbol'?: Linter.RuleEntry<[]> + /** + * Disallow `new` operators with the `String`, `Number`, and `Boolean` objects + * @see https://eslint.org/docs/latest/rules/no-new-wrappers + */ + 'no-new-wrappers'?: Linter.RuleEntry<[]> /** - * Enforce the location of single-line statements - * @see https://eslint.org/docs/latest/rules/nonblock-statement-body-position - * @deprecated + * Disallow `\8` and `\9` escape sequences in string literals + * @see https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape */ - 'nonblock-statement-body-position'?: Linter.RuleEntry<NonblockStatementBodyPosition> + 'no-nonoctal-decimal-escape'?: Linter.RuleEntry<[]> /** - * Enforce consistent line breaks after opening and before closing braces - * @see https://eslint.org/docs/latest/rules/object-curly-newline - * @deprecated + * Disallow calling global object properties as functions + * @see https://eslint.org/docs/latest/rules/no-obj-calls */ - 'object-curly-newline'?: Linter.RuleEntry<ObjectCurlyNewline> + 'no-obj-calls'?: Linter.RuleEntry<[]> /** - * Enforce consistent spacing inside braces - * @see https://eslint.org/docs/latest/rules/object-curly-spacing - * @deprecated + * Disallow calls to the `Object` constructor without an argument + * @see https://eslint.org/docs/latest/rules/no-object-constructor */ - 'object-curly-spacing'?: Linter.RuleEntry<ObjectCurlySpacing> + 'no-object-constructor'?: Linter.RuleEntry<[]> /** - * Enforce placing object properties on separate lines - * @see https://eslint.org/docs/latest/rules/object-property-newline - * @deprecated + * Disallow octal literals + * @see https://eslint.org/docs/latest/rules/no-octal */ - 'object-property-newline'?: Linter.RuleEntry<ObjectPropertyNewline> + 'no-octal'?: Linter.RuleEntry<[]> /** - * Require or disallow method and property shorthand syntax for object literals - * @see https://eslint.org/docs/latest/rules/object-shorthand + * Disallow octal escape sequences in string literals + * @see https://eslint.org/docs/latest/rules/no-octal-escape */ - 'object-shorthand'?: Linter.RuleEntry<ObjectShorthand> + 'no-octal-escape'?: Linter.RuleEntry<[]> /** - * Enforce variables to be declared either together or separately in functions - * @see https://eslint.org/docs/latest/rules/one-var + * Disallow reassigning function parameters + * @see https://eslint.org/docs/latest/rules/no-param-reassign */ - 'one-var'?: Linter.RuleEntry<OneVar> + 'no-param-reassign'?: Linter.RuleEntry<NoParamReassign> /** - * Require or disallow newlines around variable declarations - * @see https://eslint.org/docs/latest/rules/one-var-declaration-per-line + * Disallow string concatenation with `__dirname` and `__filename` + * @see https://eslint.org/docs/latest/rules/no-path-concat * @deprecated */ - 'one-var-declaration-per-line'?: Linter.RuleEntry<OneVarDeclarationPerLine> + 'no-path-concat'?: Linter.RuleEntry<[]> /** - * Require or disallow assignment operator shorthand where possible - * @see https://eslint.org/docs/latest/rules/operator-assignment + * Disallow the unary operators `++` and `--` + * @see https://eslint.org/docs/latest/rules/no-plusplus */ - 'operator-assignment'?: Linter.RuleEntry<OperatorAssignment> + 'no-plusplus'?: Linter.RuleEntry<NoPlusplus> /** - * Enforce consistent linebreak style for operators - * @see https://eslint.org/docs/latest/rules/operator-linebreak + * Disallow the use of `process.env` + * @see https://eslint.org/docs/latest/rules/no-process-env * @deprecated */ - 'operator-linebreak'?: Linter.RuleEntry<OperatorLinebreak> + 'no-process-env'?: Linter.RuleEntry<[]> /** - * Require or disallow padding within blocks - * @see https://eslint.org/docs/latest/rules/padded-blocks + * Disallow the use of `process.exit()` + * @see https://eslint.org/docs/latest/rules/no-process-exit * @deprecated */ - 'padded-blocks'?: Linter.RuleEntry<PaddedBlocks> + 'no-process-exit'?: Linter.RuleEntry<[]> /** - * Require or disallow padding lines between statements - * @see https://eslint.org/docs/latest/rules/padding-line-between-statements - * @deprecated + * Disallow returning values from Promise executor functions + * @see https://eslint.org/docs/latest/rules/no-promise-executor-return */ - 'padding-line-between-statements'?: Linter.RuleEntry<PaddingLineBetweenStatements> + 'no-promise-executor-return'?: Linter.RuleEntry<NoPromiseExecutorReturn> /** - * Enforce sorted arrays before include method. - * @see https://perfectionist.dev/rules/sort-array-includes + * Disallow the use of the `__proto__` property + * @see https://eslint.org/docs/latest/rules/no-proto */ - 'perfectionist/sort-array-includes'?: Linter.RuleEntry<PerfectionistSortArrayIncludes> + 'no-proto'?: Linter.RuleEntry<[]> /** - * Enforce sorted arrays. - * @see https://perfectionist.dev/rules/sort-arrays + * Disallow calling some `Object.prototype` methods directly on objects + * @see https://eslint.org/docs/latest/rules/no-prototype-builtins */ - 'perfectionist/sort-arrays'?: Linter.RuleEntry<PerfectionistSortArrays> + 'no-prototype-builtins'?: Linter.RuleEntry<[]> /** - * Enforce sorted classes. - * @see https://perfectionist.dev/rules/sort-classes + * Disallow variable redeclaration + * @see https://eslint.org/docs/latest/rules/no-redeclare */ - 'perfectionist/sort-classes'?: Linter.RuleEntry<PerfectionistSortClasses> + 'no-redeclare'?: Linter.RuleEntry<NoRedeclare> /** - * Enforce sorted decorators. - * @see https://perfectionist.dev/rules/sort-decorators + * Disallow multiple spaces in regular expressions + * @see https://eslint.org/docs/latest/rules/no-regex-spaces */ - 'perfectionist/sort-decorators'?: Linter.RuleEntry<PerfectionistSortDecorators> + 'no-regex-spaces'?: Linter.RuleEntry<[]> /** - * Enforce sorted TypeScript enums. - * @see https://perfectionist.dev/rules/sort-enums + * Disallow specified names in exports + * @see https://eslint.org/docs/latest/rules/no-restricted-exports */ - 'perfectionist/sort-enums'?: Linter.RuleEntry<PerfectionistSortEnums> + 'no-restricted-exports'?: Linter.RuleEntry<NoRestrictedExports> /** - * Enforce sorted export attributes. - * @see https://perfectionist.dev/rules/sort-export-attributes + * Disallow specified global variables + * @see https://eslint.org/docs/latest/rules/no-restricted-globals */ - 'perfectionist/sort-export-attributes'?: Linter.RuleEntry<PerfectionistSortExportAttributes> + 'no-restricted-globals'?: Linter.RuleEntry<NoRestrictedGlobals> /** - * Enforce sorted exports. - * @see https://perfectionist.dev/rules/sort-exports + * Disallow specified modules when loaded by `import` + * @see https://eslint.org/docs/latest/rules/no-restricted-imports */ - 'perfectionist/sort-exports'?: Linter.RuleEntry<PerfectionistSortExports> + 'no-restricted-imports'?: Linter.RuleEntry<NoRestrictedImports> /** - * Enforce sorted heritage clauses. - * @see https://perfectionist.dev/rules/sort-heritage-clauses + * Disallow specified modules when loaded by `require` + * @see https://eslint.org/docs/latest/rules/no-restricted-modules + * @deprecated */ - 'perfectionist/sort-heritage-clauses'?: Linter.RuleEntry<PerfectionistSortHeritageClauses> + 'no-restricted-modules'?: Linter.RuleEntry<NoRestrictedModules> /** - * Enforce sorted import attributes. - * @see https://perfectionist.dev/rules/sort-import-attributes + * Disallow certain properties on certain objects + * @see https://eslint.org/docs/latest/rules/no-restricted-properties */ - 'perfectionist/sort-import-attributes'?: Linter.RuleEntry<PerfectionistSortImportAttributes> + 'no-restricted-properties'?: Linter.RuleEntry<NoRestrictedProperties> /** - * Enforce sorted imports. - * @see https://perfectionist.dev/rules/sort-imports + * Disallow specified syntax + * @see https://eslint.org/docs/latest/rules/no-restricted-syntax */ - 'perfectionist/sort-imports'?: Linter.RuleEntry<PerfectionistSortImports> + 'no-restricted-syntax'?: Linter.RuleEntry<NoRestrictedSyntax> /** - * Enforce sorted interface properties. - * @see https://perfectionist.dev/rules/sort-interfaces + * Disallow assignment operators in `return` statements + * @see https://eslint.org/docs/latest/rules/no-return-assign */ - 'perfectionist/sort-interfaces'?: Linter.RuleEntry<PerfectionistSortInterfaces> + 'no-return-assign'?: Linter.RuleEntry<NoReturnAssign> /** - * Enforce sorted intersection types. - * @see https://perfectionist.dev/rules/sort-intersection-types + * Disallow unnecessary `return await` + * @see https://eslint.org/docs/latest/rules/no-return-await + * @deprecated */ - 'perfectionist/sort-intersection-types'?: Linter.RuleEntry<PerfectionistSortIntersectionTypes> + 'no-return-await'?: Linter.RuleEntry<[]> /** - * Enforce sorted JSX props. - * @see https://perfectionist.dev/rules/sort-jsx-props + * Disallow `javascript:` URLs + * @see https://eslint.org/docs/latest/rules/no-script-url */ - 'perfectionist/sort-jsx-props'?: Linter.RuleEntry<PerfectionistSortJsxProps> + 'no-script-url'?: Linter.RuleEntry<[]> /** - * Enforce sorted Map elements. - * @see https://perfectionist.dev/rules/sort-maps + * Disallow assignments where both sides are exactly the same + * @see https://eslint.org/docs/latest/rules/no-self-assign */ - 'perfectionist/sort-maps'?: Linter.RuleEntry<PerfectionistSortMaps> + 'no-self-assign'?: Linter.RuleEntry<NoSelfAssign> /** - * Enforce sorted modules. - * @see https://perfectionist.dev/rules/sort-modules + * Disallow comparisons where both sides are exactly the same + * @see https://eslint.org/docs/latest/rules/no-self-compare */ - 'perfectionist/sort-modules'?: Linter.RuleEntry<PerfectionistSortModules> + 'no-self-compare'?: Linter.RuleEntry<[]> /** - * Enforce sorted named exports. - * @see https://perfectionist.dev/rules/sort-named-exports + * Disallow comma operators + * @see https://eslint.org/docs/latest/rules/no-sequences */ - 'perfectionist/sort-named-exports'?: Linter.RuleEntry<PerfectionistSortNamedExports> + 'no-sequences'?: Linter.RuleEntry<NoSequences> /** - * Enforce sorted named imports. - * @see https://perfectionist.dev/rules/sort-named-imports + * Disallow returning values from setters + * @see https://eslint.org/docs/latest/rules/no-setter-return */ - 'perfectionist/sort-named-imports'?: Linter.RuleEntry<PerfectionistSortNamedImports> + 'no-setter-return'?: Linter.RuleEntry<[]> /** - * Enforce sorted object types. - * @see https://perfectionist.dev/rules/sort-object-types + * Disallow variable declarations from shadowing variables declared in the outer scope + * @see https://eslint.org/docs/latest/rules/no-shadow */ - 'perfectionist/sort-object-types'?: Linter.RuleEntry<PerfectionistSortObjectTypes> + 'no-shadow'?: Linter.RuleEntry<NoShadow> /** - * Enforce sorted objects. - * @see https://perfectionist.dev/rules/sort-objects + * Disallow identifiers from shadowing restricted names + * @see https://eslint.org/docs/latest/rules/no-shadow-restricted-names */ - 'perfectionist/sort-objects'?: Linter.RuleEntry<PerfectionistSortObjects> + 'no-shadow-restricted-names'?: Linter.RuleEntry<NoShadowRestrictedNames> /** - * Enforce sorted sets. - * @see https://perfectionist.dev/rules/sort-sets + * Disallow spacing between function identifiers and their applications (deprecated) + * @see https://eslint.org/docs/latest/rules/no-spaced-func + * @deprecated */ - 'perfectionist/sort-sets'?: Linter.RuleEntry<PerfectionistSortSets> + 'no-spaced-func'?: Linter.RuleEntry<[]> /** - * Enforce sorted switch cases. - * @see https://perfectionist.dev/rules/sort-switch-case + * Disallow sparse arrays + * @see https://eslint.org/docs/latest/rules/no-sparse-arrays */ - 'perfectionist/sort-switch-case'?: Linter.RuleEntry<PerfectionistSortSwitchCase> + 'no-sparse-arrays'?: Linter.RuleEntry<[]> /** - * Enforce sorted union types. - * @see https://perfectionist.dev/rules/sort-union-types + * Disallow synchronous methods + * @see https://eslint.org/docs/latest/rules/no-sync + * @deprecated */ - 'perfectionist/sort-union-types'?: Linter.RuleEntry<PerfectionistSortUnionTypes> + 'no-sync'?: Linter.RuleEntry<NoSync> /** - * Enforce sorted variable declarations. - * @see https://perfectionist.dev/rules/sort-variable-declarations + * Disallow all tabs + * @see https://eslint.org/docs/latest/rules/no-tabs + * @deprecated */ - 'perfectionist/sort-variable-declarations'?: Linter.RuleEntry<PerfectionistSortVariableDeclarations> + 'no-tabs'?: Linter.RuleEntry<NoTabs> /** - * Enforce using "catalog:" in `package.json` - * @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/json/json-enforce-catalog.test.ts + * Disallow template literal placeholder syntax in regular strings + * @see https://eslint.org/docs/latest/rules/no-template-curly-in-string */ - 'pnpm/json-enforce-catalog'?: Linter.RuleEntry<PnpmJsonEnforceCatalog> + 'no-template-curly-in-string'?: Linter.RuleEntry<[]> /** - * Prefer having pnpm settings in `pnpm-workspace.yaml` instead of `package.json`. This requires pnpm v10.6+, see https://github.com/orgs/pnpm/discussions/9037. - * @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/json/json-prefer-workspace-settings.test.ts + * Disallow ternary operators + * @see https://eslint.org/docs/latest/rules/no-ternary */ - 'pnpm/json-prefer-workspace-settings'?: Linter.RuleEntry<PnpmJsonPreferWorkspaceSettings> + 'no-ternary'?: Linter.RuleEntry<[]> /** - * Enforce using valid catalog in `package.json` - * @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/json/json-valid-catalog.test.ts + * Disallow `this`/`super` before calling `super()` in constructors + * @see https://eslint.org/docs/latest/rules/no-this-before-super */ - 'pnpm/json-valid-catalog'?: Linter.RuleEntry<PnpmJsonValidCatalog> + 'no-this-before-super'?: Linter.RuleEntry<[]> /** - * Enforce settings in `pnpm-workspace.yaml` - * @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-enforce-settings.test.ts + * Disallow throwing literals as exceptions + * @see https://eslint.org/docs/latest/rules/no-throw-literal */ - 'pnpm/yaml-enforce-settings'?: Linter.RuleEntry<PnpmYamlEnforceSettings> + 'no-throw-literal'?: Linter.RuleEntry<[]> /** - * Disallow duplicate catalog items in `pnpm-workspace.yaml` - * @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-no-duplicate-catalog-item.test.ts + * Disallow trailing whitespace at the end of lines + * @see https://eslint.org/docs/latest/rules/no-trailing-spaces + * @deprecated + */ + 'no-trailing-spaces'?: Linter.RuleEntry<NoTrailingSpaces> + /** + * Disallow `let` or `var` variables that are read but never assigned + * @see https://eslint.org/docs/latest/rules/no-unassigned-vars + */ + 'no-unassigned-vars'?: Linter.RuleEntry<[]> + /** + * Disallow the use of undeclared variables unless mentioned in `/*global *\/` comments + * @see https://eslint.org/docs/latest/rules/no-undef */ - 'pnpm/yaml-no-duplicate-catalog-item'?: Linter.RuleEntry<PnpmYamlNoDuplicateCatalogItem> + 'no-undef'?: Linter.RuleEntry<NoUndef> /** - * Disallow unused catalogs in `pnpm-workspace.yaml` - * @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-no-unused-catalog-item.test.ts + * Disallow initializing variables to `undefined` + * @see https://eslint.org/docs/latest/rules/no-undef-init */ - 'pnpm/yaml-no-unused-catalog-item'?: Linter.RuleEntry<[]> + 'no-undef-init'?: Linter.RuleEntry<[]> /** - * Ensure all package patterns in `pnpm-workspace.yaml` match at least one directory - * @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-valid-packages.test.ts + * Disallow the use of `undefined` as an identifier + * @see https://eslint.org/docs/latest/rules/no-undefined */ - 'pnpm/yaml-valid-packages'?: Linter.RuleEntry<[]> + 'no-undefined'?: Linter.RuleEntry<[]> /** - * Require using arrow functions for callbacks - * @see https://eslint.org/docs/latest/rules/prefer-arrow-callback + * Disallow dangling underscores in identifiers + * @see https://eslint.org/docs/latest/rules/no-underscore-dangle */ - 'prefer-arrow-callback'?: Linter.RuleEntry<PreferArrowCallback> + 'no-underscore-dangle'?: Linter.RuleEntry<NoUnderscoreDangle> /** - * Require `const` declarations for variables that are never reassigned after declared - * @see https://eslint.org/docs/latest/rules/prefer-const + * Disallow confusing multiline expressions + * @see https://eslint.org/docs/latest/rules/no-unexpected-multiline */ - 'prefer-const'?: Linter.RuleEntry<PreferConst> + 'no-unexpected-multiline'?: Linter.RuleEntry<[]> /** - * Require destructuring from arrays and/or objects - * @see https://eslint.org/docs/latest/rules/prefer-destructuring + * Disallow unmodified loop conditions + * @see https://eslint.org/docs/latest/rules/no-unmodified-loop-condition */ - 'prefer-destructuring'?: Linter.RuleEntry<PreferDestructuring> + 'no-unmodified-loop-condition'?: Linter.RuleEntry<[]> /** - * Disallow the use of `Math.pow` in favor of the `**` operator - * @see https://eslint.org/docs/latest/rules/prefer-exponentiation-operator + * Disallow ternary operators when simpler alternatives exist + * @see https://eslint.org/docs/latest/rules/no-unneeded-ternary */ - 'prefer-exponentiation-operator'?: Linter.RuleEntry<[]> + 'no-unneeded-ternary'?: Linter.RuleEntry<NoUnneededTernary> /** - * Enforce using named capture group in regular expression - * @see https://eslint.org/docs/latest/rules/prefer-named-capture-group + * Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements + * @see https://eslint.org/docs/latest/rules/no-unreachable */ - 'prefer-named-capture-group'?: Linter.RuleEntry<[]> + 'no-unreachable'?: Linter.RuleEntry<[]> /** - * Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals - * @see https://eslint.org/docs/latest/rules/prefer-numeric-literals + * Disallow loops with a body that allows only one iteration + * @see https://eslint.org/docs/latest/rules/no-unreachable-loop */ - 'prefer-numeric-literals'?: Linter.RuleEntry<[]> + 'no-unreachable-loop'?: Linter.RuleEntry<NoUnreachableLoop> /** - * Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()` - * @see https://eslint.org/docs/latest/rules/prefer-object-has-own + * Disallow control flow statements in `finally` blocks + * @see https://eslint.org/docs/latest/rules/no-unsafe-finally */ - 'prefer-object-has-own'?: Linter.RuleEntry<[]> + 'no-unsafe-finally'?: Linter.RuleEntry<[]> /** - * Disallow using `Object.assign` with an object literal as the first argument and prefer the use of object spread instead - * @see https://eslint.org/docs/latest/rules/prefer-object-spread + * Disallow negating the left operand of relational operators + * @see https://eslint.org/docs/latest/rules/no-unsafe-negation */ - 'prefer-object-spread'?: Linter.RuleEntry<[]> + 'no-unsafe-negation'?: Linter.RuleEntry<NoUnsafeNegation> /** - * Require using Error objects as Promise rejection reasons - * @see https://eslint.org/docs/latest/rules/prefer-promise-reject-errors + * Disallow use of optional chaining in contexts where the `undefined` value is not allowed + * @see https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining */ - 'prefer-promise-reject-errors'?: Linter.RuleEntry<PreferPromiseRejectErrors> + 'no-unsafe-optional-chaining'?: Linter.RuleEntry<NoUnsafeOptionalChaining> /** - * Require `Reflect` methods where applicable - * @see https://eslint.org/docs/latest/rules/prefer-reflect - * @deprecated + * Disallow unused expressions + * @see https://eslint.org/docs/latest/rules/no-unused-expressions */ - 'prefer-reflect'?: Linter.RuleEntry<PreferReflect> + 'no-unused-expressions'?: Linter.RuleEntry<NoUnusedExpressions> /** - * Disallow use of the `RegExp` constructor in favor of regular expression literals - * @see https://eslint.org/docs/latest/rules/prefer-regex-literals + * Disallow unused labels + * @see https://eslint.org/docs/latest/rules/no-unused-labels */ - 'prefer-regex-literals'?: Linter.RuleEntry<PreferRegexLiterals> + 'no-unused-labels'?: Linter.RuleEntry<[]> /** - * Require rest parameters instead of `arguments` - * @see https://eslint.org/docs/latest/rules/prefer-rest-params + * Disallow unused private class members + * @see https://eslint.org/docs/latest/rules/no-unused-private-class-members */ - 'prefer-rest-params'?: Linter.RuleEntry<[]> + 'no-unused-private-class-members'?: Linter.RuleEntry<[]> /** - * Require spread operators instead of `.apply()` - * @see https://eslint.org/docs/latest/rules/prefer-spread + * Disallow unused variables + * @see https://eslint.org/docs/latest/rules/no-unused-vars */ - 'prefer-spread'?: Linter.RuleEntry<[]> + 'no-unused-vars'?: Linter.RuleEntry<NoUnusedVars> /** - * Require template literals instead of string concatenation - * @see https://eslint.org/docs/latest/rules/prefer-template + * Disallow the use of variables before they are defined + * @see https://eslint.org/docs/latest/rules/no-use-before-define */ - 'prefer-template'?: Linter.RuleEntry<[]> + 'no-use-before-define'?: Linter.RuleEntry<NoUseBeforeDefine> /** - * Disallow losing originally caught error when re-throwing custom errors - * @see https://eslint.org/docs/latest/rules/preserve-caught-error + * Disallow variable assignments when the value is not used + * @see https://eslint.org/docs/latest/rules/no-useless-assignment */ - 'preserve-caught-error'?: Linter.RuleEntry<PreserveCaughtError> + 'no-useless-assignment'?: Linter.RuleEntry<[]> /** - * @see https://github.com/prettier/eslint-plugin-prettier#options + * Disallow useless backreferences in regular expressions + * @see https://eslint.org/docs/latest/rules/no-useless-backreference */ - 'prettier/prettier'?: Linter.RuleEntry<PrettierPrettier> + 'no-useless-backreference'?: Linter.RuleEntry<[]> /** - * Require quotes around object literal property names - * @see https://eslint.org/docs/latest/rules/quote-props - * @deprecated + * Disallow unnecessary calls to `.call()` and `.apply()` + * @see https://eslint.org/docs/latest/rules/no-useless-call */ - 'quote-props'?: Linter.RuleEntry<QuoteProps> + 'no-useless-call'?: Linter.RuleEntry<[]> /** - * Enforce the consistent use of either backticks, double, or single quotes - * @see https://eslint.org/docs/latest/rules/quotes - * @deprecated + * Disallow unnecessary `catch` clauses + * @see https://eslint.org/docs/latest/rules/no-useless-catch */ - 'quotes'?: Linter.RuleEntry<Quotes> + 'no-useless-catch'?: Linter.RuleEntry<[]> /** - * Enforce the use of the radix argument when using `parseInt()` - * @see https://eslint.org/docs/latest/rules/radix + * Disallow unnecessary computed property keys in objects and classes + * @see https://eslint.org/docs/latest/rules/no-useless-computed-key */ - 'radix'?: Linter.RuleEntry<Radix> + 'no-useless-computed-key'?: Linter.RuleEntry<NoUselessComputedKey> /** - * Disallows DOM elements from using 'dangerouslySetInnerHTML'. - * @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml + * Disallow unnecessary concatenation of literals or template literals + * @see https://eslint.org/docs/latest/rules/no-useless-concat */ - 'react-dom/no-dangerously-set-innerhtml'?: Linter.RuleEntry<[]> + 'no-useless-concat'?: Linter.RuleEntry<[]> /** - * 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 + * Disallow unnecessary constructors + * @see https://eslint.org/docs/latest/rules/no-useless-constructor */ - 'react-dom/no-dangerously-set-innerhtml-with-children'?: Linter.RuleEntry<[]> + 'no-useless-constructor'?: Linter.RuleEntry<[]> /** - * Disallows 'findDOMNode'. - * @see https://eslint-react.xyz/docs/rules/dom-no-find-dom-node + * Disallow unnecessary escape characters + * @see https://eslint.org/docs/latest/rules/no-useless-escape */ - 'react-dom/no-find-dom-node'?: Linter.RuleEntry<[]> + 'no-useless-escape'?: Linter.RuleEntry<NoUselessEscape> /** - * Disallows 'flushSync'. - * @see https://eslint-react.xyz/docs/rules/dom-no-flush-sync + * Disallow renaming import, export, and destructured assignments to the same name + * @see https://eslint.org/docs/latest/rules/no-useless-rename */ - 'react-dom/no-flush-sync'?: Linter.RuleEntry<[]> + 'no-useless-rename'?: Linter.RuleEntry<NoUselessRename> /** - * Replaces usage of 'ReactDOM.hydrate()' with 'hydrateRoot()'. - * @see https://eslint-react.xyz/docs/rules/dom-no-hydrate + * Disallow redundant return statements + * @see https://eslint.org/docs/latest/rules/no-useless-return */ - 'react-dom/no-hydrate'?: Linter.RuleEntry<[]> + 'no-useless-return'?: Linter.RuleEntry<[]> /** - * Enforces an explicit 'type' attribute for 'button' elements. - * @see https://eslint-react.xyz/docs/rules/dom-no-missing-button-type + * Require `let` or `const` instead of `var` + * @see https://eslint.org/docs/latest/rules/no-var */ - 'react-dom/no-missing-button-type'?: Linter.RuleEntry<[]> + 'no-var'?: Linter.RuleEntry<[]> /** - * Enforces an explicit 'sandbox' attribute for 'iframe' elements. - * @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox + * Disallow `void` operators + * @see https://eslint.org/docs/latest/rules/no-void */ - 'react-dom/no-missing-iframe-sandbox'?: Linter.RuleEntry<[]> + 'no-void'?: Linter.RuleEntry<NoVoid> /** - * Enforces the absence of a 'namespace' in React elements. - * @see https://eslint-react.xyz/docs/rules/dom-no-namespace + * Disallow specified warning terms in comments + * @see https://eslint.org/docs/latest/rules/no-warning-comments */ - 'react-dom/no-namespace'?: Linter.RuleEntry<[]> + 'no-warning-comments'?: Linter.RuleEntry<NoWarningComments> /** - * Replaces usage of 'ReactDOM.render()' with 'createRoot(node).render()'. - * @see https://eslint-react.xyz/docs/rules/dom-no-render + * Disallow whitespace before properties + * @see https://eslint.org/docs/latest/rules/no-whitespace-before-property + * @deprecated */ - 'react-dom/no-render'?: Linter.RuleEntry<[]> + 'no-whitespace-before-property'?: Linter.RuleEntry<[]> /** - * Disallows the return value of 'ReactDOM.render'. - * @see https://eslint-react.xyz/docs/rules/dom-no-render-return-value + * Disallow `with` statements + * @see https://eslint.org/docs/latest/rules/no-with */ - 'react-dom/no-render-return-value'?: Linter.RuleEntry<[]> + 'no-with'?: Linter.RuleEntry<[]> /** - * Disallows 'javascript:' URLs as attribute values. - * @see https://eslint-react.xyz/docs/rules/dom-no-script-url + * require or disallow absolute version of dependency. + * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/absolute-version.html */ - 'react-dom/no-script-url'?: Linter.RuleEntry<[]> + 'node-dependencies/absolute-version'?: Linter.RuleEntry<NodeDependenciesAbsoluteVersion> /** - * 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 + * enforce the versions of the engines of the dependencies to be compatible. + * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/compat-engines.html */ - 'react-dom/no-string-style-prop'?: Linter.RuleEntry<[]> + 'node-dependencies/compat-engines'?: Linter.RuleEntry<NodeDependenciesCompatEngines> /** - * Disallows unknown 'DOM' properties. - * @see https://eslint-react.xyz/docs/rules/dom-no-unknown-property + * disallow having dependencies on deprecate packages. + * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/no-deprecated.html */ - 'react-dom/no-unknown-property'?: Linter.RuleEntry<ReactDomNoUnknownProperty> + 'node-dependencies/no-deprecated'?: Linter.RuleEntry<NodeDependenciesNoDeprecated> /** - * 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 + * disallow duplicate dependencies. + * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/no-dupe-deps.html */ - 'react-dom/no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]> + 'node-dependencies/no-dupe-deps'?: Linter.RuleEntry<[]> /** - * Disallows 'target="_blank"' without 'rel="noreferrer noopener"'. - * @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank + * Disallows dependence on the specified package. + * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/no-restricted-deps.html */ - 'react-dom/no-unsafe-target-blank'?: Linter.RuleEntry<[]> + 'node-dependencies/no-restricted-deps'?: Linter.RuleEntry<NodeDependenciesNoRestrictedDeps> /** - * Replaces usage of 'useFormState' with 'useActionState'. - * @see https://eslint-react.xyz/docs/rules/dom-no-use-form-state + * require caret(`^`) version instead of range version. + * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/prefer-caret-range-version.html */ - 'react-dom/no-use-form-state'?: Linter.RuleEntry<[]> + 'node-dependencies/prefer-caret-range-version'?: Linter.RuleEntry<[]> /** - * Disallows 'children' in void DOM elements. - * @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children + * require tilde(`~`) version instead of range version. + * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/prefer-tilde-range-version.html */ - 'react-dom/no-void-elements-with-children'?: Linter.RuleEntry<[]> + 'node-dependencies/prefer-tilde-range-version'?: Linter.RuleEntry<[]> /** - * Enforces importing React DOM via a namespace import. - * @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import + * Require provenance information for dependencies + * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/require-provenance-deps.html */ - 'react-dom/prefer-namespace-import'?: Linter.RuleEntry<[]> + 'node-dependencies/require-provenance-deps'?: Linter.RuleEntry<NodeDependenciesRequireProvenanceDeps> /** - * 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 + * enforce the versions of the engines of the dependencies to be compatible. + * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/valid-engines.html + * @deprecated */ - 'react-hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]> + 'node-dependencies/valid-engines'?: Linter.RuleEntry<NodeDependenciesValidEngines> /** - * Verifies that automatic effect dependencies are compiled if opted-in + * enforce versions that is valid as a semantic version. + * @see https://ota-meshi.github.io/eslint-plugin-node-dependencies/rules/valid-semver.html */ - 'react-hooks/automatic-effect-dependencies'?: Linter.RuleEntry<ReactHooksAutomaticEffectDependencies> + 'node-dependencies/valid-semver'?: Linter.RuleEntry<[]> /** - * Validates against calling capitalized functions/methods instead of using JSX + * require `return` statements after callbacks + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/callback-return.md */ - 'react-hooks/capitalized-calls'?: Linter.RuleEntry<ReactHooksCapitalizedCalls> + 'node/callback-return'?: Linter.RuleEntry<NodeCallbackReturn> /** - * Validates against higher order functions defining nested components or hooks. Components and hooks should be defined at the module level + * enforce either `module.exports` or `exports` + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/exports-style.md */ - 'react-hooks/component-hook-factories'?: Linter.RuleEntry<ReactHooksComponentHookFactories> + 'node/exports-style'?: Linter.RuleEntry<NodeExportsStyle> /** - * Validates the compiler configuration options + * enforce the style of file extensions in `import` declarations + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/file-extension-in-import.md */ - 'react-hooks/config'?: Linter.RuleEntry<ReactHooksConfig> + 'node/file-extension-in-import'?: Linter.RuleEntry<NodeFileExtensionInImport> /** - * Validates usage of error boundaries instead of try/catch for errors in child components + * require `require()` calls to be placed at top-level module scope + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/global-require.md */ - 'react-hooks/error-boundaries'?: Linter.RuleEntry<ReactHooksErrorBoundaries> + 'node/global-require'?: Linter.RuleEntry<[]> /** - * verifies the list of dependencies for Hooks like useEffect and similar - * @see https://github.com/facebook/react/issues/14920 + * require error handling in callbacks + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/handle-callback-err.md */ - 'react-hooks/exhaustive-deps'?: Linter.RuleEntry<ReactHooksExhaustiveDeps> + 'node/handle-callback-err'?: Linter.RuleEntry<NodeHandleCallbackErr> /** - * Validates usage of fbt + * require correct usage of hashbang + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/hashbang.md */ - 'react-hooks/fbt'?: Linter.RuleEntry<ReactHooksFbt> + 'node/hashbang'?: Linter.RuleEntry<NodeHashbang> /** - * Validates usage of `fire` + * enforce Node.js-style error-first callback pattern is followed + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-callback-literal.md */ - 'react-hooks/fire'?: Linter.RuleEntry<ReactHooksFire> + 'node/no-callback-literal'?: Linter.RuleEntry<[]> /** - * Validates configuration of [gating mode](https://react.dev/reference/react-compiler/gating) + * disallow deprecated APIs + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-deprecated-api.md */ - 'react-hooks/gating'?: Linter.RuleEntry<ReactHooksGating> + 'node/no-deprecated-api'?: Linter.RuleEntry<NodeNoDeprecatedApi> /** - * Validates against assignment/mutation of globals during render, part of ensuring that [side effects must render outside of render](https://react.dev/reference/rules/components-and-hooks-must-be-pure#side-effects-must-run-outside-of-render) + * disallow the assignment to `exports` + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-exports-assign.md */ - 'react-hooks/globals'?: Linter.RuleEntry<ReactHooksGlobals> + 'node/no-exports-assign'?: Linter.RuleEntry<[]> /** - * Validates the rules of hooks + * disallow `import` declarations which import extraneous modules + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-extraneous-import.md */ - 'react-hooks/hooks'?: Linter.RuleEntry<ReactHooksHooks> + 'node/no-extraneous-import'?: Linter.RuleEntry<NodeNoExtraneousImport> /** - * Validates against mutating props, state, and other values that [are immutable](https://react.dev/reference/rules/components-and-hooks-must-be-pure#props-and-state-are-immutable) + * disallow `require()` expressions which import extraneous modules + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-extraneous-require.md */ - 'react-hooks/immutability'?: Linter.RuleEntry<ReactHooksImmutability> + 'node/no-extraneous-require'?: Linter.RuleEntry<NodeNoExtraneousRequire> /** - * Validates against usage of libraries which are incompatible with memoization (manual or automatic) + * disallow third-party modules which are hiding core modules + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-hide-core-modules.md + * @deprecated */ - 'react-hooks/incompatible-library'?: Linter.RuleEntry<ReactHooksIncompatibleLibrary> + 'node/no-hide-core-modules'?: Linter.RuleEntry<NodeNoHideCoreModules> /** - * Internal invariants + * disallow `import` declarations which import missing modules + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-missing-import.md */ - 'react-hooks/invariant'?: Linter.RuleEntry<ReactHooksInvariant> + 'node/no-missing-import'?: Linter.RuleEntry<NodeNoMissingImport> /** - * Validates that effect dependencies are memoized + * disallow `require()` expressions which import missing modules + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-missing-require.md */ - 'react-hooks/memoized-effect-dependencies'?: Linter.RuleEntry<ReactHooksMemoizedEffectDependencies> + 'node/no-missing-require'?: Linter.RuleEntry<NodeNoMissingRequire> /** - * Validates against deriving values from state in an effect + * disallow `require` calls to be mixed with regular variable declarations + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-mixed-requires.md */ - 'react-hooks/no-deriving-state-in-effects'?: Linter.RuleEntry<ReactHooksNoDerivingStateInEffects> + 'node/no-mixed-requires'?: Linter.RuleEntry<NodeNoMixedRequires> /** - * Validates that existing manual memoized is preserved by the compiler. React Compiler will only compile components and hooks if its inference [matches or exceeds the existing manual memoization](https://react.dev/learn/react-compiler/introduction#what-should-i-do-about-usememo-usecallback-and-reactmemo) + * disallow `new` operators with calls to `require` + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-new-require.md */ - 'react-hooks/preserve-manual-memoization'?: Linter.RuleEntry<ReactHooksPreserveManualMemoization> + 'node/no-new-require'?: Linter.RuleEntry<[]> /** - * Validates that [components/hooks are pure](https://react.dev/reference/rules/components-and-hooks-must-be-pure) by checking that they do not call known-impure functions + * disallow string concatenation with `__dirname` and `__filename` + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-path-concat.md */ - 'react-hooks/purity'?: Linter.RuleEntry<ReactHooksPurity> + 'node/no-path-concat'?: Linter.RuleEntry<[]> /** - * Validates correct usage of refs, not reading/writing during render. See the "pitfalls" section in [`useRef()` usage](https://react.dev/reference/react/useRef#usage) + * disallow the use of `process.env` + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-process-env.md */ - 'react-hooks/refs'?: Linter.RuleEntry<ReactHooksRefs> + 'node/no-process-env'?: Linter.RuleEntry<NodeNoProcessEnv> /** - * Validates against suppression of other rules + * disallow the use of `process.exit()` + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-process-exit.md */ - 'react-hooks/rule-suppression'?: Linter.RuleEntry<ReactHooksRuleSuppression> + 'node/no-process-exit'?: Linter.RuleEntry<[]> /** - * enforces the Rules of Hooks - * @see https://react.dev/reference/rules/rules-of-hooks + * disallow specified modules when loaded by `import` declarations + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-restricted-import.md */ - 'react-hooks/rules-of-hooks'?: Linter.RuleEntry<ReactHooksRulesOfHooks> + 'node/no-restricted-import'?: Linter.RuleEntry<NodeNoRestrictedImport> /** - * Validates against calling setState synchronously in an effect, which can lead to re-renders that degrade performance + * disallow specified modules when loaded by `require` + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-restricted-require.md */ - 'react-hooks/set-state-in-effect'?: Linter.RuleEntry<ReactHooksSetStateInEffect> + 'node/no-restricted-require'?: Linter.RuleEntry<NodeNoRestrictedRequire> /** - * Validates against setting state during render, which can trigger additional renders and potential infinite render loops + * disallow synchronous methods + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-sync.md */ - 'react-hooks/set-state-in-render'?: Linter.RuleEntry<ReactHooksSetStateInRender> + 'node/no-sync'?: Linter.RuleEntry<NodeNoSync> /** - * Validates that components are static, not recreated every render. Components that are recreated dynamically can reset state and trigger excessive re-rendering + * disallow top-level `await` in published modules + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-top-level-await.md */ - 'react-hooks/static-components'?: Linter.RuleEntry<ReactHooksStaticComponents> + 'node/no-top-level-await'?: Linter.RuleEntry<NodeNoTopLevelAwait> /** - * Validates against invalid syntax + * disallow `bin` files that npm ignores + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unpublished-bin.md */ - 'react-hooks/syntax'?: Linter.RuleEntry<ReactHooksSyntax> + 'node/no-unpublished-bin'?: Linter.RuleEntry<NodeNoUnpublishedBin> /** - * Unimplemented features + * disallow `import` declarations which import private modules + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unpublished-import.md */ - 'react-hooks/todo'?: Linter.RuleEntry<ReactHooksTodo> + 'node/no-unpublished-import'?: Linter.RuleEntry<NodeNoUnpublishedImport> /** - * Validates against syntax that we do not plan to support in React Compiler + * disallow `require()` expressions which import private modules + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unpublished-require.md */ - 'react-hooks/unsupported-syntax'?: Linter.RuleEntry<ReactHooksUnsupportedSyntax> + 'node/no-unpublished-require'?: Linter.RuleEntry<NodeNoUnpublishedRequire> /** - * Validates usage of the useMemo() hook against common mistakes. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information. + * disallow unsupported ECMAScript built-ins on the specified version + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unsupported-features/es-builtins.md */ - 'react-hooks/use-memo'?: Linter.RuleEntry<ReactHooksUseMemo> + 'node/no-unsupported-features/es-builtins'?: Linter.RuleEntry<NodeNoUnsupportedFeaturesEsBuiltins> /** - * Validates that useMemos always return a value and that the result of the useMemo is used by the component/hook. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information. + * disallow unsupported ECMAScript syntax on the specified version + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unsupported-features/es-syntax.md */ - 'react-hooks/void-use-memo'?: Linter.RuleEntry<ReactHooksVoidUseMemo> + 'node/no-unsupported-features/es-syntax'?: Linter.RuleEntry<NodeNoUnsupportedFeaturesEsSyntax> /** - * Enforces naming conventions for components. - * @see https://eslint-react.xyz/docs/rules/naming-convention-component-name + * disallow unsupported Node.js built-in APIs on the specified version + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unsupported-features/node-builtins.md */ - 'react-naming-convention/component-name'?: Linter.RuleEntry<ReactNamingConventionComponentName> + 'node/no-unsupported-features/node-builtins'?: Linter.RuleEntry<NodeNoUnsupportedFeaturesNodeBuiltins> /** - * 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 + * enforce either `Buffer` or `require("buffer").Buffer` + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/buffer.md */ - 'react-naming-convention/context-name'?: Linter.RuleEntry<[]> + 'node/prefer-global/buffer'?: Linter.RuleEntry<NodePreferGlobalBuffer> /** - * Enforces consistent file-naming conventions. - * @see https://eslint-react.xyz/docs/rules/naming-convention-filename + * enforce either `console` or `require("console")` + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/console.md */ - 'react-naming-convention/filename'?: Linter.RuleEntry<ReactNamingConventionFilename> + 'node/prefer-global/console'?: Linter.RuleEntry<NodePreferGlobalConsole> /** - * Enforces consistent use of the JSX file extension. - * @see https://eslint-react.xyz/docs/rules/naming-convention-filename-extension + * enforce either `crypto` or `require("crypto").webcrypto` + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/crypto.md */ - 'react-naming-convention/filename-extension'?: Linter.RuleEntry<ReactNamingConventionFilenameExtension> + 'node/prefer-global/crypto'?: Linter.RuleEntry<NodePreferGlobalCrypto> /** - * Enforces identifier names assigned from 'useId' calls to be either 'id' or end with 'Id'. - * @see https://eslint-react.xyz/docs/rules/naming-convention-id-name + * enforce either `process` or `require("process")` + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/process.md */ - 'react-naming-convention/id-name'?: Linter.RuleEntry<[]> + 'node/prefer-global/process'?: Linter.RuleEntry<NodePreferGlobalProcess> /** - * 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 + * enforce either `TextDecoder` or `require("util").TextDecoder` + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/text-decoder.md */ - 'react-naming-convention/ref-name'?: Linter.RuleEntry<[]> + 'node/prefer-global/text-decoder'?: Linter.RuleEntry<NodePreferGlobalTextDecoder> /** - * Enforces destructuring and symmetric naming of the 'useState' hook value and setter. - * @see https://eslint-react.xyz/docs/rules/naming-convention-use-state + * enforce either `TextEncoder` or `require("util").TextEncoder` + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/text-encoder.md */ - 'react-naming-convention/use-state'?: Linter.RuleEntry<ReactNamingConventionUseState> - 'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents> + 'node/prefer-global/text-encoder'?: Linter.RuleEntry<NodePreferGlobalTextEncoder> /** - * 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 + * enforce either global timer functions or `require("timers")` + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/timers.md */ - 'react-web-api/no-leaked-event-listener'?: Linter.RuleEntry<[]> + 'node/prefer-global/timers'?: Linter.RuleEntry<NodePreferGlobalTimers> /** - * 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 + * enforce either `URL` or `require("url").URL` + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url.md */ - 'react-web-api/no-leaked-interval'?: Linter.RuleEntry<[]> + 'node/prefer-global/url'?: Linter.RuleEntry<NodePreferGlobalUrl> /** - * 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 + * enforce either `URLSearchParams` or `require("url").URLSearchParams` + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url-search-params.md */ - 'react-web-api/no-leaked-resize-observer'?: Linter.RuleEntry<[]> + 'node/prefer-global/url-search-params'?: Linter.RuleEntry<NodePreferGlobalUrlSearchParams> /** - * 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 + * enforce using the `node:` protocol when importing Node.js builtin modules. + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-node-protocol.md */ - 'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]> + 'node/prefer-node-protocol'?: Linter.RuleEntry<NodePreferNodeProtocol> /** - * Prevents unintentional '$' sign before expression. - * @see https://eslint-react.xyz/docs/rules/jsx-dollar + * enforce `require("dns").promises` + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-promises/dns.md */ - 'react/jsx-dollar'?: Linter.RuleEntry<[]> + 'node/prefer-promises/dns'?: Linter.RuleEntry<[]> /** - * Enforces 'key' prop placement before spread props. - * @see https://eslint-react.xyz/docs/rules/jsx-key-before-spread + * enforce `require("fs").promises` + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-promises/fs.md */ - 'react/jsx-key-before-spread'?: Linter.RuleEntry<[]> + 'node/prefer-promises/fs'?: Linter.RuleEntry<[]> /** - * 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 + * require that `process.exit()` expressions use the same code path as `throw` + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/process-exit-as-throw.md */ - 'react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]> + 'node/process-exit-as-throw'?: Linter.RuleEntry<[]> /** - * Disallows duplicate props in JSX elements. - * @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props + * require correct usage of hashbang + * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/hashbang.md + * @deprecated */ - 'react/jsx-no-duplicate-props'?: Linter.RuleEntry<[]> + 'node/shebang'?: Linter.RuleEntry<NodeShebang> /** - * Disallows immediately-invoked function expressions in JSX. - * @see https://eslint-react.xyz/docs/rules/jsx-no-iife + * Enforce the location of single-line statements + * @see https://eslint.org/docs/latest/rules/nonblock-statement-body-position + * @deprecated */ - 'react/jsx-no-iife'?: Linter.RuleEntry<[]> + 'nonblock-statement-body-position'?: Linter.RuleEntry<NonblockStatementBodyPosition> /** - * Prevents using variables in JSX that are not defined in the scope. - * @see https://eslint-react.xyz/docs/rules/jsx-no-undef + * Enforce consistent line breaks after opening and before closing braces + * @see https://eslint.org/docs/latest/rules/object-curly-newline + * @deprecated */ - 'react/jsx-no-undef'?: Linter.RuleEntry<[]> + 'object-curly-newline'?: Linter.RuleEntry<ObjectCurlyNewline> /** - * Enforces shorthand syntax for boolean props. - * @see https://eslint-react.xyz/docs/rules/jsx-shorthand-boolean + * Enforce consistent spacing inside braces + * @see https://eslint.org/docs/latest/rules/object-curly-spacing + * @deprecated */ - 'react/jsx-shorthand-boolean'?: Linter.RuleEntry<ReactJsxShorthandBoolean> + 'object-curly-spacing'?: Linter.RuleEntry<ObjectCurlySpacing> /** - * Enforces shorthand syntax for fragment elements. - * @see https://eslint-react.xyz/docs/rules/jsx-shorthand-fragment + * Enforce placing object properties on separate lines + * @see https://eslint.org/docs/latest/rules/object-property-newline + * @deprecated */ - 'react/jsx-shorthand-fragment'?: Linter.RuleEntry<ReactJsxShorthandFragment> + 'object-property-newline'?: Linter.RuleEntry<ObjectPropertyNewline> /** - * Marks React variables as used when JSX is present. - * @see https://eslint-react.xyz/docs/rules/jsx-uses-react + * Require or disallow method and property shorthand syntax for object literals + * @see https://eslint.org/docs/latest/rules/object-shorthand */ - 'react/jsx-uses-react'?: Linter.RuleEntry<[]> + 'object-shorthand'?: Linter.RuleEntry<ObjectShorthand> /** - * Marks JSX element variables as used. - * @see https://eslint-react.xyz/docs/rules/jsx-uses-vars + * Enforce variables to be declared either together or separately in functions + * @see https://eslint.org/docs/latest/rules/one-var */ - 'react/jsx-uses-vars'?: Linter.RuleEntry<[]> + 'one-var'?: Linter.RuleEntry<OneVar> /** - * Disallows accessing 'this.state' inside 'setState' calls. - * @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate + * Require or disallow newlines around variable declarations + * @see https://eslint.org/docs/latest/rules/one-var-declaration-per-line + * @deprecated */ - 'react/no-access-state-in-setstate'?: Linter.RuleEntry<[]> + 'one-var-declaration-per-line'?: Linter.RuleEntry<OneVarDeclarationPerLine> /** - * Disallows using an item's index in the array as its key. - * @see https://eslint-react.xyz/docs/rules/no-array-index-key + * Require or disallow assignment operator shorthand where possible + * @see https://eslint.org/docs/latest/rules/operator-assignment */ - 'react/no-array-index-key'?: Linter.RuleEntry<[]> + 'operator-assignment'?: Linter.RuleEntry<OperatorAssignment> /** - * Disallows the use of 'Children.count' from the 'react' package. - * @see https://eslint-react.xyz/docs/rules/no-children-count + * Enforce consistent linebreak style for operators + * @see https://eslint.org/docs/latest/rules/operator-linebreak + * @deprecated */ - 'react/no-children-count'?: Linter.RuleEntry<[]> + 'operator-linebreak'?: Linter.RuleEntry<OperatorLinebreak> /** - * Disallows the use of 'Children.forEach' from the 'react' package. - * @see https://eslint-react.xyz/docs/rules/no-children-for-each + * Require or disallow padding within blocks + * @see https://eslint.org/docs/latest/rules/padded-blocks + * @deprecated */ - 'react/no-children-for-each'?: Linter.RuleEntry<[]> + 'padded-blocks'?: Linter.RuleEntry<PaddedBlocks> /** - * Disallows the use of 'Children.map' from the 'react' package. - * @see https://eslint-react.xyz/docs/rules/no-children-map + * Require or disallow padding lines between statements + * @see https://eslint.org/docs/latest/rules/padding-line-between-statements + * @deprecated */ - 'react/no-children-map'?: Linter.RuleEntry<[]> + 'padding-line-between-statements'?: Linter.RuleEntry<PaddingLineBetweenStatements> /** - * Disallows the use of 'Children.only' from the 'react' package. - * @see https://eslint-react.xyz/docs/rules/no-children-only + * Enforce sorted arrays before include method. + * @see https://perfectionist.dev/rules/sort-array-includes */ - 'react/no-children-only'?: Linter.RuleEntry<[]> + 'perfectionist/sort-array-includes'?: Linter.RuleEntry<PerfectionistSortArrayIncludes> /** - * Disallows passing 'children' as a prop. - * @see https://eslint-react.xyz/docs/rules/no-children-prop + * Enforce sorted arrays. + * @see https://perfectionist.dev/rules/sort-arrays */ - 'react/no-children-prop'?: Linter.RuleEntry<[]> + 'perfectionist/sort-arrays'?: Linter.RuleEntry<PerfectionistSortArrays> /** - * Disallows the use of 'Children.toArray' from the 'react' package. - * @see https://eslint-react.xyz/docs/rules/no-children-to-array + * Enforce sorted classes. + * @see https://perfectionist.dev/rules/sort-classes */ - 'react/no-children-to-array'?: Linter.RuleEntry<[]> + 'perfectionist/sort-classes'?: Linter.RuleEntry<PerfectionistSortClasses> /** - * Disallows class components except for error boundaries. - * @see https://eslint-react.xyz/docs/rules/no-class-component + * Enforce sorted decorators. + * @see https://perfectionist.dev/rules/sort-decorators */ - 'react/no-class-component'?: Linter.RuleEntry<[]> + 'perfectionist/sort-decorators'?: Linter.RuleEntry<PerfectionistSortDecorators> /** - * Disallows 'cloneElement'. - * @see https://eslint-react.xyz/docs/rules/no-clone-element + * Enforce sorted TypeScript enums. + * @see https://perfectionist.dev/rules/sort-enums */ - 'react/no-clone-element'?: Linter.RuleEntry<[]> + 'perfectionist/sort-enums'?: Linter.RuleEntry<PerfectionistSortEnums> /** - * Replaces usage of 'componentWillMount' with 'UNSAFE_componentWillMount'. - * @see https://eslint-react.xyz/docs/rules/no-component-will-mount + * Enforce sorted export attributes. + * @see https://perfectionist.dev/rules/sort-export-attributes */ - 'react/no-component-will-mount'?: Linter.RuleEntry<[]> + 'perfectionist/sort-export-attributes'?: Linter.RuleEntry<PerfectionistSortExportAttributes> /** - * Replaces usage of 'componentWillReceiveProps' with 'UNSAFE_componentWillReceiveProps'. - * @see https://eslint-react.xyz/docs/rules/no-component-will-receive-props + * Enforce sorted exports. + * @see https://perfectionist.dev/rules/sort-exports */ - 'react/no-component-will-receive-props'?: Linter.RuleEntry<[]> + 'perfectionist/sort-exports'?: Linter.RuleEntry<PerfectionistSortExports> /** - * Replaces usage of 'componentWillUpdate' with 'UNSAFE_componentWillUpdate'. - * @see https://eslint-react.xyz/docs/rules/no-component-will-update + * Enforce sorted heritage clauses. + * @see https://perfectionist.dev/rules/sort-heritage-clauses */ - 'react/no-component-will-update'?: Linter.RuleEntry<[]> + 'perfectionist/sort-heritage-clauses'?: Linter.RuleEntry<PerfectionistSortHeritageClauses> /** - * Replaces usage of '<Context.Provider>' with '<Context>'. - * @see https://eslint-react.xyz/docs/rules/no-context-provider + * Enforce sorted import attributes. + * @see https://perfectionist.dev/rules/sort-import-attributes */ - 'react/no-context-provider'?: Linter.RuleEntry<[]> + 'perfectionist/sort-import-attributes'?: Linter.RuleEntry<PerfectionistSortImportAttributes> /** - * Disallows 'createRef' in function components. - * @see https://eslint-react.xyz/docs/rules/no-create-ref + * Enforce sorted imports. + * @see https://perfectionist.dev/rules/sort-imports */ - 'react/no-create-ref'?: Linter.RuleEntry<[]> + 'perfectionist/sort-imports'?: Linter.RuleEntry<PerfectionistSortImports> /** - * Disallows the 'defaultProps' property in favor of ES6 default parameters. - * @see https://eslint-react.xyz/docs/rules/no-default-props + * Enforce sorted interface properties. + * @see https://perfectionist.dev/rules/sort-interfaces */ - 'react/no-default-props'?: Linter.RuleEntry<[]> + 'perfectionist/sort-interfaces'?: Linter.RuleEntry<PerfectionistSortInterfaces> /** - * Disallows direct mutation of 'this.state'. - * @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state + * Enforce sorted intersection types. + * @see https://perfectionist.dev/rules/sort-intersection-types */ - 'react/no-direct-mutation-state'?: Linter.RuleEntry<[]> + 'perfectionist/sort-intersection-types'?: Linter.RuleEntry<PerfectionistSortIntersectionTypes> /** - * Prevents duplicate 'key' props on sibling elements when rendering lists. - * @see https://eslint-react.xyz/docs/rules/no-duplicate-key + * Enforce sorted JSX props. + * @see https://perfectionist.dev/rules/sort-jsx-props */ - 'react/no-duplicate-key'?: Linter.RuleEntry<[]> + 'perfectionist/sort-jsx-props'?: Linter.RuleEntry<PerfectionistSortJsxProps> /** - * Disallows certain props on components. - * @see https://eslint-react.xyz/docs/rules/no-forbidden-props - * @deprecated + * Enforce sorted Map elements. + * @see https://perfectionist.dev/rules/sort-maps */ - 'react/no-forbidden-props'?: Linter.RuleEntry<ReactNoForbiddenProps> + 'perfectionist/sort-maps'?: Linter.RuleEntry<PerfectionistSortMaps> /** - * Replaces usage of 'forwardRef' with passing 'ref' as a prop. - * @see https://eslint-react.xyz/docs/rules/no-forward-ref + * Enforce sorted modules. + * @see https://perfectionist.dev/rules/sort-modules */ - 'react/no-forward-ref'?: Linter.RuleEntry<[]> + 'perfectionist/sort-modules'?: Linter.RuleEntry<PerfectionistSortModules> /** - * Prevents implicitly passing the 'key' prop to components. - * @see https://eslint-react.xyz/docs/rules/no-implicit-key + * Enforce sorted named exports. + * @see https://perfectionist.dev/rules/sort-named-exports */ - 'react/no-implicit-key'?: Linter.RuleEntry<[]> + 'perfectionist/sort-named-exports'?: Linter.RuleEntry<PerfectionistSortNamedExports> /** - * Prevents problematic leaked values from being rendered. - * @see https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering + * Enforce sorted named imports. + * @see https://perfectionist.dev/rules/sort-named-imports */ - 'react/no-leaked-conditional-rendering'?: Linter.RuleEntry<[]> + 'perfectionist/sort-named-imports'?: Linter.RuleEntry<PerfectionistSortNamedImports> /** - * 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 + * Enforce sorted object types. + * @see https://perfectionist.dev/rules/sort-object-types */ - 'react/no-missing-component-display-name'?: Linter.RuleEntry<[]> + 'perfectionist/sort-object-types'?: Linter.RuleEntry<PerfectionistSortObjectTypes> /** - * 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 + * Enforce sorted objects. + * @see https://perfectionist.dev/rules/sort-objects */ - 'react/no-missing-context-display-name'?: Linter.RuleEntry<[]> + 'perfectionist/sort-objects'?: Linter.RuleEntry<PerfectionistSortObjects> /** - * Disallows missing 'key' on items in list rendering. - * @see https://eslint-react.xyz/docs/rules/no-missing-key + * Enforce sorted sets. + * @see https://perfectionist.dev/rules/sort-sets */ - 'react/no-missing-key'?: Linter.RuleEntry<[]> + 'perfectionist/sort-sets'?: Linter.RuleEntry<PerfectionistSortSets> /** - * Prevents incorrect usage of 'captureOwnerStack'. - * @see https://eslint-react.xyz/docs/rules/no-misused-capture-owner-stack + * Enforce sorted switch cases. + * @see https://perfectionist.dev/rules/sort-switch-case */ - 'react/no-misused-capture-owner-stack'?: Linter.RuleEntry<[]> + 'perfectionist/sort-switch-case'?: Linter.RuleEntry<PerfectionistSortSwitchCase> /** - * Disallows nesting component definitions inside other components. - * @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions + * Enforce sorted union types. + * @see https://perfectionist.dev/rules/sort-union-types */ - 'react/no-nested-component-definitions'?: Linter.RuleEntry<[]> + 'perfectionist/sort-union-types'?: Linter.RuleEntry<PerfectionistSortUnionTypes> /** - * Disallows nesting lazy component declarations inside other components. - * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations + * Enforce sorted variable declarations. + * @see https://perfectionist.dev/rules/sort-variable-declarations */ - 'react/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]> + 'perfectionist/sort-variable-declarations'?: Linter.RuleEntry<PerfectionistSortVariableDeclarations> /** - * Disallows 'propTypes' in favor of TypeScript or another type-checking solution. - * @see https://eslint-react.xyz/docs/rules/no-prop-types + * Enforce using "catalog:" in `package.json` + * @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/json/json-enforce-catalog.test.ts */ - 'react/no-prop-types'?: Linter.RuleEntry<[]> + 'pnpm/json-enforce-catalog'?: Linter.RuleEntry<PnpmJsonEnforceCatalog> /** - * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'. - * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update + * Prefer having pnpm settings in `pnpm-workspace.yaml` instead of `package.json`. This requires pnpm v10.6+, see https://github.com/orgs/pnpm/discussions/9037. + * @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/json/json-prefer-workspace-settings.test.ts */ - 'react/no-redundant-should-component-update'?: Linter.RuleEntry<[]> + 'pnpm/json-prefer-workspace-settings'?: Linter.RuleEntry<PnpmJsonPreferWorkspaceSettings> /** - * 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 + * Enforce using valid catalog in `package.json` + * @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/json/json-valid-catalog.test.ts */ - 'react/no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]> + 'pnpm/json-valid-catalog'?: Linter.RuleEntry<PnpmJsonValidCatalog> /** - * 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 + * Enforce settings in `pnpm-workspace.yaml` + * @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-enforce-settings.test.ts */ - 'react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]> + 'pnpm/yaml-enforce-settings'?: Linter.RuleEntry<PnpmYamlEnforceSettings> /** - * 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 + * Disallow duplicate catalog items in `pnpm-workspace.yaml` + * @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-no-duplicate-catalog-item.test.ts */ - 'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]> + 'pnpm/yaml-no-duplicate-catalog-item'?: Linter.RuleEntry<PnpmYamlNoDuplicateCatalogItem> /** - * Replaces string refs with callback refs. - * @see https://eslint-react.xyz/docs/rules/no-string-refs + * Disallow unused catalogs in `pnpm-workspace.yaml` + * @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-no-unused-catalog-item.test.ts */ - 'react/no-string-refs'?: Linter.RuleEntry<[]> + 'pnpm/yaml-no-unused-catalog-item'?: Linter.RuleEntry<[]> /** - * Disallows unnecessary 'key' props on nested child elements when rendering lists. - * @see https://eslint-react.xyz/docs/rules/no-unnecessary-key + * Ensure all package patterns in `pnpm-workspace.yaml` match at least one directory + * @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-valid-packages.test.ts */ - 'react/no-unnecessary-key'?: Linter.RuleEntry<[]> + 'pnpm/yaml-valid-packages'?: Linter.RuleEntry<[]> /** - * Disallows unnecessary usage of 'useCallback'. - * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback + * Require using arrow functions for callbacks + * @see https://eslint.org/docs/latest/rules/prefer-arrow-callback */ - 'react/no-unnecessary-use-callback'?: Linter.RuleEntry<[]> + 'prefer-arrow-callback'?: Linter.RuleEntry<PreferArrowCallback> /** - * Disallows unnecessary usage of 'useMemo'. - * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo + * Require `const` declarations for variables that are never reassigned after declared + * @see https://eslint.org/docs/latest/rules/prefer-const */ - 'react/no-unnecessary-use-memo'?: Linter.RuleEntry<[]> + 'prefer-const'?: Linter.RuleEntry<PreferConst> /** - * 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 + * Require destructuring from arrays and/or objects + * @see https://eslint.org/docs/latest/rules/prefer-destructuring */ - 'react/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]> + 'prefer-destructuring'?: Linter.RuleEntry<PreferDestructuring> /** - * Disallows unnecessary usage of 'useRef'. - * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-ref + * Disallow the use of `Math.pow` in favor of the `**` operator + * @see https://eslint.org/docs/latest/rules/prefer-exponentiation-operator */ - 'react/no-unnecessary-use-ref'?: Linter.RuleEntry<[]> + 'prefer-exponentiation-operator'?: Linter.RuleEntry<[]> /** - * Warns about the use of 'UNSAFE_componentWillMount' in class components. - * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount + * Enforce using named capture group in regular expression + * @see https://eslint.org/docs/latest/rules/prefer-named-capture-group */ - 'react/no-unsafe-component-will-mount'?: Linter.RuleEntry<[]> + 'prefer-named-capture-group'?: Linter.RuleEntry<[]> /** - * Warns about the use of 'UNSAFE_componentWillReceiveProps' in class components. - * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props + * Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals + * @see https://eslint.org/docs/latest/rules/prefer-numeric-literals */ - 'react/no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]> + 'prefer-numeric-literals'?: Linter.RuleEntry<[]> /** - * Warns about the use of 'UNSAFE_componentWillUpdate' in class components. - * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update + * Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()` + * @see https://eslint.org/docs/latest/rules/prefer-object-has-own */ - 'react/no-unsafe-component-will-update'?: Linter.RuleEntry<[]> + 'prefer-object-has-own'?: Linter.RuleEntry<[]> /** - * 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 + * Disallow using `Object.assign` with an object literal as the first argument and prefer the use of object spread instead + * @see https://eslint.org/docs/latest/rules/prefer-object-spread */ - 'react/no-unstable-context-value'?: Linter.RuleEntry<[]> + 'prefer-object-spread'?: Linter.RuleEntry<[]> /** - * Prevents using referential-type values as default props in object destructuring. - * @see https://eslint-react.xyz/docs/rules/no-unstable-default-props + * Require using Error objects as Promise rejection reasons + * @see https://eslint.org/docs/latest/rules/prefer-promise-reject-errors */ - 'react/no-unstable-default-props'?: Linter.RuleEntry<ReactNoUnstableDefaultProps> + 'prefer-promise-reject-errors'?: Linter.RuleEntry<PreferPromiseRejectErrors> /** - * Warns about unused class component methods and properties. - * @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members + * Require `Reflect` methods where applicable + * @see https://eslint.org/docs/latest/rules/prefer-reflect + * @deprecated */ - 'react/no-unused-class-component-members'?: Linter.RuleEntry<[]> + 'prefer-reflect'?: Linter.RuleEntry<PreferReflect> /** - * Warns about component props that are defined but never used. - * @see https://eslint-react.xyz/docs/rules/no-unused-props + * Disallow use of the `RegExp` constructor in favor of regular expression literals + * @see https://eslint.org/docs/latest/rules/prefer-regex-literals */ - 'react/no-unused-props'?: Linter.RuleEntry<[]> + 'prefer-regex-literals'?: Linter.RuleEntry<PreferRegexLiterals> /** - * Warns about unused class component state. - * @see https://eslint-react.xyz/docs/rules/no-unused-state + * Require rest parameters instead of `arguments` + * @see https://eslint.org/docs/latest/rules/prefer-rest-params */ - 'react/no-unused-state'?: Linter.RuleEntry<[]> + 'prefer-rest-params'?: Linter.RuleEntry<[]> /** - * Replaces usage of 'useContext' with 'use'. - * @see https://eslint-react.xyz/docs/rules/no-use-context + * Require spread operators instead of `.apply()` + * @see https://eslint.org/docs/latest/rules/prefer-spread */ - 'react/no-use-context'?: Linter.RuleEntry<[]> + 'prefer-spread'?: Linter.RuleEntry<[]> /** - * Disallows useless 'forwardRef' calls on components that don't use 'ref's. - * @see https://eslint-react.xyz/docs/rules/no-useless-forward-ref + * Require template literals instead of string concatenation + * @see https://eslint.org/docs/latest/rules/prefer-template */ - 'react/no-useless-forward-ref'?: Linter.RuleEntry<[]> + 'prefer-template'?: Linter.RuleEntry<[]> /** - * Disallows useless fragment elements. - * @see https://eslint-react.xyz/docs/rules/no-useless-fragment + * Disallow losing originally caught error when re-throwing custom errors + * @see https://eslint.org/docs/latest/rules/preserve-caught-error */ - 'react/no-useless-fragment'?: Linter.RuleEntry<ReactNoUselessFragment> + 'preserve-caught-error'?: Linter.RuleEntry<PreserveCaughtError> /** - * Enforces destructuring assignment for component props and context. - * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment + * @see https://github.com/prettier/eslint-plugin-prettier#options */ - 'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]> + 'prettier/prettier'?: Linter.RuleEntry<PrettierPrettier> /** - * Enforces importing React via a namespace import. - * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import + * Require quotes around object literal property names + * @see https://eslint.org/docs/latest/rules/quote-props + * @deprecated */ - 'react/prefer-namespace-import'?: Linter.RuleEntry<[]> + 'quote-props'?: Linter.RuleEntry<QuoteProps> /** - * Enforces read-only props in components. - * @see https://eslint-react.xyz/docs/rules/prefer-read-only-props + * Enforce the consistent use of either backticks, double, or single quotes + * @see https://eslint.org/docs/latest/rules/quotes + * @deprecated */ - 'react/prefer-read-only-props'?: Linter.RuleEntry<[]> + 'quotes'?: Linter.RuleEntry<Quotes> /** - * Enforces wrapping function calls made inside 'useState' in an 'initializer function'. - * @see https://eslint-react.xyz/docs/rules/prefer-use-state-lazy-initialization + * Enforce the use of the radix argument when using `parseInt()` + * @see https://eslint.org/docs/latest/rules/radix */ - 'react/prefer-use-state-lazy-initialization'?: Linter.RuleEntry<[]> + 'radix'?: Linter.RuleEntry<Radix> + 'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents> /** * disallow confusing quantifiers * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/confusing-quantifier.html @@ -7173,6 +7319,60 @@ export interface Rules { /* ======= Declarations ======= */ // ----- @bfra.me/missing-module-for-config ----- type BfraMeMissingModuleForConfig = []|[string[]] +// ----- @eslint-react/dom-no-unknown-property ----- +type EslintReactDomNoUnknownProperty = []|[{ + ignore?: string[] + requireDataLowercase?: boolean +}] +// ----- @eslint-react/exhaustive-deps ----- +type EslintReactExhaustiveDeps = []|[{ + additionalHooks?: string + enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean + experimental_autoDependenciesHooks?: string[] + requireExplicitEffectDeps?: boolean +}] +// ----- @eslint-react/jsx-no-useless-fragment ----- +type EslintReactJsxNoUselessFragment = []|[{ + + allowEmptyFragment?: boolean + + allowExpressions?: boolean +}] +// ----- @eslint-react/no-unstable-default-props ----- +type EslintReactNoUnstableDefaultProps = []|[{ + safeDefaultProps?: string[] +}] +// ----- @eslint-react/rules-of-hooks ----- +type EslintReactRulesOfHooks = []|[{ + additionalHooks?: string +}] +// ----- @eslint-react/use-state ----- +type EslintReactUseState = []|[{ + enforceAssignment?: boolean + enforceLazyInitialization?: boolean + enforceSetterName?: boolean +}] +// ----- @eslint-react/x-exhaustive-deps ----- +type EslintReactXExhaustiveDeps = []|[{ + additionalHooks?: string + enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean + experimental_autoDependenciesHooks?: string[] + requireExplicitEffectDeps?: boolean +}] +// ----- @eslint-react/x-no-unstable-default-props ----- +type EslintReactXNoUnstableDefaultProps = []|[{ + safeDefaultProps?: string[] +}] +// ----- @eslint-react/x-rules-of-hooks ----- +type EslintReactXRulesOfHooks = []|[{ + additionalHooks?: string +}] +// ----- @eslint-react/x-use-state ----- +type EslintReactXUseState = []|[{ + enforceAssignment?: boolean + enforceLazyInitialization?: boolean + enforceSetterName?: boolean +}] // ----- @next/next/no-html-link-for-pages ----- type NextNextNoHtmlLinkForPages = []|[(string | string[])] // ----- @stylistic/array-bracket-newline ----- @@ -17658,153 +17858,6 @@ type Quotes = []|[("single" | "double" | "backtick")]|[("single" | "double" | "b })] // ----- radix ----- type Radix = []|[("always" | "as-needed")] -// ----- react-dom/no-unknown-property ----- -type ReactDomNoUnknownProperty = []|[{ - ignore?: string[] - requireDataLowercase?: boolean -}] -// ----- react-hooks/automatic-effect-dependencies ----- -type ReactHooksAutomaticEffectDependencies = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/capitalized-calls ----- -type ReactHooksCapitalizedCalls = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/component-hook-factories ----- -type ReactHooksComponentHookFactories = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/config ----- -type ReactHooksConfig = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/error-boundaries ----- -type ReactHooksErrorBoundaries = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/exhaustive-deps ----- -type ReactHooksExhaustiveDeps = []|[{ - additionalHooks?: string - enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean - experimental_autoDependenciesHooks?: string[] - requireExplicitEffectDeps?: boolean -}] -// ----- react-hooks/fbt ----- -type ReactHooksFbt = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/fire ----- -type ReactHooksFire = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/gating ----- -type ReactHooksGating = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/globals ----- -type ReactHooksGlobals = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/hooks ----- -type ReactHooksHooks = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/immutability ----- -type ReactHooksImmutability = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/incompatible-library ----- -type ReactHooksIncompatibleLibrary = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/invariant ----- -type ReactHooksInvariant = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/memoized-effect-dependencies ----- -type ReactHooksMemoizedEffectDependencies = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/no-deriving-state-in-effects ----- -type ReactHooksNoDerivingStateInEffects = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/preserve-manual-memoization ----- -type ReactHooksPreserveManualMemoization = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/purity ----- -type ReactHooksPurity = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/refs ----- -type ReactHooksRefs = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/rule-suppression ----- -type ReactHooksRuleSuppression = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/rules-of-hooks ----- -type ReactHooksRulesOfHooks = []|[{ - additionalHooks?: string -}] -// ----- react-hooks/set-state-in-effect ----- -type ReactHooksSetStateInEffect = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/set-state-in-render ----- -type ReactHooksSetStateInRender = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/static-components ----- -type ReactHooksStaticComponents = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/syntax ----- -type ReactHooksSyntax = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/todo ----- -type ReactHooksTodo = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/unsupported-syntax ----- -type ReactHooksUnsupportedSyntax = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/use-memo ----- -type ReactHooksUseMemo = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-hooks/void-use-memo ----- -type ReactHooksVoidUseMemo = []|[{ - [k: string]: unknown | undefined -}] -// ----- react-naming-convention/component-name ----- -type ReactNamingConventionComponentName = []|[(("PascalCase" | "CONSTANT_CASE") | { - allowAllCaps?: boolean - excepts?: string[] - rule?: ("PascalCase" | "CONSTANT_CASE") -})] -// ----- react-naming-convention/filename ----- -type ReactNamingConventionFilename = []|[(("PascalCase" | "camelCase" | "kebab-case" | "snake_case") | { - excepts?: string[] - extensions?: string[] - rule?: ("PascalCase" | "camelCase" | "kebab-case" | "snake_case") -})] -// ----- react-naming-convention/filename-extension ----- -type ReactNamingConventionFilenameExtension = []|[(("always" | "as-needed") | { - allow?: ("always" | "as-needed") - extensions?: string[] - ignoreFilesWithoutCode?: boolean -})] -// ----- react-naming-convention/use-state ----- -type ReactNamingConventionUseState = []|[{ - enforceAssignment?: boolean - enforceSetterName?: boolean -}] // ----- react-refresh/only-export-components ----- type ReactRefreshOnlyExportComponents = []|[{ extraHOCs?: string[] @@ -17812,31 +17865,6 @@ type ReactRefreshOnlyExportComponents = []|[{ allowConstantExport?: boolean checkJS?: boolean }] -// ----- react/jsx-shorthand-boolean ----- -type ReactJsxShorthandBoolean = []|[(-1 | 1)] -// ----- react/jsx-shorthand-fragment ----- -type ReactJsxShorthandFragment = []|[(-1 | 1)] -// ----- react/no-forbidden-props ----- -type ReactNoForbiddenProps = []|[{ - forbid?: (string | { - excludedNodes?: string[] - prop: string - } | { - includedNodes?: string[] - prop: string - })[] -}] -// ----- react/no-unstable-default-props ----- -type ReactNoUnstableDefaultProps = []|[{ - safeDefaultProps?: string[] -}] -// ----- react/no-useless-fragment ----- -type ReactNoUselessFragment = []|[{ - - allowEmptyFragment?: boolean - - allowExpressions?: boolean -}] // ----- regexp/hexadecimal-escape ----- type RegexpHexadecimalEscape = []|[("always" | "never")] // ----- regexp/letter-case ----- diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c3925788c..f9b16be0f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -349,8 +349,8 @@ importers: specifier: workspace:* version: link:../.. '@eslint-react/eslint-plugin': - specifier: 2.13.0 - version: 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + specifier: 4.2.3 + version: 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) '@eslint/config-inspector': specifier: 1.5.0 version: 1.5.0(eslint@10.2.0(jiti@2.6.1)) @@ -931,44 +931,47 @@ packages: resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint-react/ast@2.13.0': - resolution: {integrity: sha512-43+5gmqV3MpatTzKnu/V2i/jXjmepvwhrb9MaGQvnXHQgq9J7/C7VVCCcwp6Rvp2QHAFquAAdvQDSL8IueTpeA==} - engines: {node: '>=20.19.0'} + '@eslint-react/ast@4.2.3': + resolution: {integrity: sha512-/XHJPFX8lsp+c/gMzFOnIxqH7YIXVX8SlMHuZ6XTUlYHkGquhydTtgso0VFiLQN1z3dThrybdgBq+JD+LSwK2w==} + engines: {node: '>=22.0.0'} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 - typescript: '>=4.8.4 <6.0.0' + eslint: ^10.0.0 + typescript: '*' - '@eslint-react/core@2.13.0': - resolution: {integrity: sha512-m62XDzkf1hpzW4sBc7uh7CT+8rBG2xz/itSADuEntlsg4YA7Jhb8hjU6VHf3wRFDwyfx5VnbV209sbJ7Azey0Q==} - engines: {node: '>=20.19.0'} + '@eslint-react/core@4.2.3': + resolution: {integrity: sha512-r0cgJlCemBb61f0qCrXS95hNq2ajIku5V7Tk45fROQu4HIV55ILJeN2ceea1LKmgRWy/pQw8+SvImronwWo16A==} + engines: {node: '>=22.0.0'} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 - typescript: '>=4.8.4 <6.0.0' + eslint: ^10.0.0 + typescript: '*' - '@eslint-react/eff@2.13.0': - resolution: {integrity: sha512-rEH2R8FQnUAblUW+v3ZHDU1wEhatbL1+U2B1WVuBXwSKqzF7BGaLqCPIU7o9vofumz5MerVfaCtJgI8jYe2Btg==} - engines: {node: '>=20.19.0'} + '@eslint-react/eslint-plugin@4.2.3': + resolution: {integrity: sha512-kJP6QWXfwI+T53xlUqWaCf3XrSWx6xnu6e50gpdnjNBJjv2FxQqm25Ef1wTEQWORnSyN7q18LU5i8hl4J/ZSXQ==} + engines: {node: '>=22.0.0'} + peerDependencies: + eslint: ^10.0.0 + typescript: '*' - '@eslint-react/eslint-plugin@2.13.0': - resolution: {integrity: sha512-iaMXpqnJCTW7317hg8L4wx7u5aIiPzZ+d1p59X8wXFgMHzFX4hNu4IfV8oygyjmWKdLsjKE9sEpv/UYWczlb+A==} - engines: {node: '>=20.19.0'} + '@eslint-react/jsx@4.2.3': + resolution: {integrity: sha512-lSwRo/PAwf1EvXRxpXA5yBhPIxahFuC4uHh84nc5OxE0mJ7YEmzmASR+ug3QOnVnfDsJDVo6AWVR7PSL99YkOQ==} + engines: {node: '>=22.0.0'} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 - typescript: '>=4.8.4 <6.0.0' + eslint: ^10.0.0 + typescript: '*' - '@eslint-react/shared@2.13.0': - resolution: {integrity: sha512-IOloCqrZ7gGBT4lFf9+0/wn7TfzU7JBRjYwTSyb9SDngsbeRrtW95ZpgUpS8/jen1wUEm6F08duAooTZ2FtsWA==} - engines: {node: '>=20.19.0'} + '@eslint-react/shared@4.2.3': + resolution: {integrity: sha512-6HermdKaTWkID0coAK46ynA9XIwUWGgA2Y+NK6qcmL/qbYzyRYs4hq+SmLMvZZ8DV/SFOaHRXl9iCTvjf6DvXQ==} + engines: {node: '>=22.0.0'} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 - typescript: '>=4.8.4 <6.0.0' + eslint: ^10.0.0 + typescript: '*' - '@eslint-react/var@2.13.0': - resolution: {integrity: sha512-dM+QaeiHR16qPQoJYg205MkdHYSWVa2B7ore5OFpOPlSwqDV3tLW7I+475WjbK7potq5QNPTxRa7VLp9FGeQqA==} - engines: {node: '>=20.19.0'} + '@eslint-react/var@4.2.3': + resolution: {integrity: sha512-zkQki2eYbQrMW4O6DCZDQzslFvw0sWAlvW/WWjocEIGHqRGC3IHWcRt3xsq8JPNOW4WjF4/LZ8czkyLoINV9rw==} + engines: {node: '>=22.0.0'} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 - typescript: '>=4.8.4 <6.0.0' + eslint: ^10.0.0 + typescript: '*' '@eslint/compat@2.0.4': resolution: {integrity: sha512-o598tCGstJv9Kk4XapwP+oDij9HD9Qr3V37ABzTfdzVvbFciV+sfg9zSW6olj6G/IXj7p89SwSzPnZ+JUEPIPg==} @@ -3214,19 +3217,12 @@ packages: eslint-config-prettier: optional: true - eslint-plugin-react-dom@2.13.0: - resolution: {integrity: sha512-+2IZzQ1WEFYOWatW+xvNUqmZn55YBCufzKA7hX3XQ/8eu85Mp4vnlOyNvdVHEOGhUnGuC6+9+zLK+IlEHKdKLQ==} - engines: {node: '>=20.19.0'} + eslint-plugin-react-dom@4.2.3: + resolution: {integrity: sha512-7FCB+kx0iwWw2OOb0aDrXU4Eds5ihrq6UACNVMmtv5c4qd82n+wRGQwXBQKlTbwR9gpfn3HRDlaofZX93gShlA==} + engines: {node: '>=22.0.0'} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 - typescript: '>=4.8.4 <6.0.0' - - eslint-plugin-react-hooks-extra@2.13.0: - resolution: {integrity: sha512-qIbha1nzuyhXM9SbEfrcGVqmyvQu7GAOB2sy9Y4Qo5S8nCqw4fSBxq+8lSce5Tk5Y7XzIkgHOhNyXEvUHRWFMQ==} - engines: {node: '>=20.19.0'} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 - typescript: '>=4.8.4 <6.0.0' + eslint: ^10.0.0 + typescript: '*' eslint-plugin-react-hooks@7.0.1: resolution: {integrity: sha512-O0d0m04evaNzEPoSW+59Mezf8Qt0InfgGIBJnpC0h3NH/WjUAR7BIKUfysC6todmtiZ/A0oUVS8Gce0WhBrHsA==} @@ -3234,38 +3230,45 @@ packages: peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 - eslint-plugin-react-naming-convention@2.13.0: - resolution: {integrity: sha512-uSd25JzSg2R4p81s3Wqck0AdwRlO9Yc+cZqTEXv7vW8exGGAM3mWnF6hgrgdqVJqBEGJIbS/Vx1r5BdKcY/MHA==} - engines: {node: '>=20.19.0'} + eslint-plugin-react-jsx@4.2.3: + resolution: {integrity: sha512-IUiYO1Qm/NDo/CVBa/nOP6lKJvPtDz7ucKsfcmrDYFS7NGyLJedubB4vFtMGZ2XGBFJeEYLnSo7Y+89b0qdynA==} + engines: {node: '>=22.0.0'} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 - typescript: '>=4.8.4 <6.0.0' + eslint: ^10.0.0 + typescript: '*' + + eslint-plugin-react-naming-convention@4.2.3: + resolution: {integrity: sha512-H4eq0ajs+K+tgn6/eeglkLN3HBWm4QyWbJ2jbwPo75gyPmEP7Xvr0jslcnAwnmQfiiKX+KqKuiOMAqOr0SXubg==} + engines: {node: '>=22.0.0'} + peerDependencies: + eslint: ^10.0.0 + typescript: '*' eslint-plugin-react-refresh@0.5.2: resolution: {integrity: sha512-hmgTH57GfzoTFjVN0yBwTggnsVUF2tcqi7RJZHqi9lIezSs4eFyAMktA68YD4r5kNw1mxyY4dmkyoFDb3FIqrA==} peerDependencies: eslint: ^9 || ^10 - eslint-plugin-react-rsc@2.13.0: - resolution: {integrity: sha512-RaftgITDLQm1zIgYyvR51sBdy4FlVaXFts5VISBaKbSUB0oqXyzOPxMHasfr9BCSjPLKus9zYe+G/Hr6rjFLXQ==} + eslint-plugin-react-rsc@4.2.3: + resolution: {integrity: sha512-m8gfimx1o7LRWUYI0dDNCUGgiEqEdUlQyM4I/28RQJEmmrmxj4HVTU6/AX7JCmOlhclghT/JA4C1sAVwOdbw7g==} engines: {node: '>=20.19.0'} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 - typescript: '>=4.8.4 <6.0.0' + eslint: ^10.0.0 + typescript: '*' - eslint-plugin-react-web-api@2.13.0: - resolution: {integrity: sha512-nmJbzIAte7PeAkp22CwcKEASkKi49MshSdiDGO1XuN3f4N4/8sBfDcWbQuLPde6JiuzDT/0+l7Gi8wwTHtR1kg==} - engines: {node: '>=20.19.0'} + eslint-plugin-react-web-api@4.2.3: + resolution: {integrity: sha512-iHXFiURfokcTicZ9DZsQHCV9BuVRqve7GFYNBBD5AVFzEWseCV+lXc6y2EoXxsQW8WfYhAwTZ5Yhr+fKJR7t1w==} + engines: {node: '>=22.0.0'} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 - typescript: '>=4.8.4 <6.0.0' + eslint: ^10.0.0 + typescript: '*' - eslint-plugin-react-x@2.13.0: - resolution: {integrity: sha512-cMNX0+ws/fWTgVxn52qAQbaFF2rqvaDAtjrPUzY6XOzPjY0rJQdR2tSlWJttz43r2yBfqu+LGvHlGpWL2wfpTQ==} - engines: {node: '>=20.19.0'} + eslint-plugin-react-x@4.2.3: + resolution: {integrity: sha512-kJZXa5QsGA4FzuTyKLKjFt9nm78CZcfHshfgfSXjVOshvlVGeg1RWyNZnXDW3hASdZ/REsPg2mGFYqwUPXnJ5Q==} + engines: {node: '>=22.0.0'} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 - typescript: '>=4.8.4 <6.0.0' + eslint: ^10.0.0 + typescript: '*' eslint-plugin-regexp@3.1.0: resolution: {integrity: sha512-qGXIC3DIKZHcK1H9A9+Byz9gmndY6TTSRkSMTZpNXdyCw2ObSehRgccJv35n9AdUakEjQp5VFNLas6BMXizCZg==} @@ -4025,12 +4028,6 @@ packages: is-hexadecimal@2.0.1: resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==} - is-immutable-type@5.0.1: - resolution: {integrity: sha512-LkHEOGVZZXxGl8vDs+10k3DvP++SEoYEAJLRk6buTFi6kD7QekThV7xHS0j6gpnUCQ0zpud/gMDGiV4dQneLTg==} - peerDependencies: - eslint: '*' - typescript: '>=4.7.4' - is-in-ci@2.0.0: resolution: {integrity: sha512-cFeerHriAnhrQSbpAxL37W1wcJKUUX07HyLWZCW1URJT/ra3GyUTzBgUnh24TMVfNTV2Hij2HLxkPHFZfOZy5w==} engines: {node: '>=20'} @@ -7215,9 +7212,8 @@ snapshots: '@eslint-community/regexpp@4.12.2': {} - '@eslint-react/ast@2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2)': + '@eslint-react/ast@4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2)': dependencies: - '@eslint-react/eff': 2.13.0 '@typescript-eslint/types': 8.58.1 '@typescript-eslint/typescript-estree': 8.58.1(typescript@6.0.2) '@typescript-eslint/utils': 8.58.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) @@ -7227,12 +7223,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint-react/core@2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2)': + '@eslint-react/core@4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2)': dependencies: - '@eslint-react/ast': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/eff': 2.13.0 - '@eslint-react/shared': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/var': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/ast': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/jsx': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/shared': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/var': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) '@typescript-eslint/scope-manager': 8.58.1 '@typescript-eslint/types': 8.58.1 '@typescript-eslint/utils': 8.58.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) @@ -7242,31 +7238,40 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint-react/eff@2.13.0': {} - - '@eslint-react/eslint-plugin@2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2)': + '@eslint-react/eslint-plugin@4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2)': dependencies: - '@eslint-react/eff': 2.13.0 - '@eslint-react/shared': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/shared': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) '@typescript-eslint/scope-manager': 8.58.1 '@typescript-eslint/type-utils': 8.58.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) '@typescript-eslint/types': 8.58.1 '@typescript-eslint/utils': 8.58.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) eslint: 10.2.0(jiti@2.6.1) - eslint-plugin-react-dom: 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - eslint-plugin-react-hooks-extra: 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - eslint-plugin-react-naming-convention: 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - eslint-plugin-react-rsc: 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - eslint-plugin-react-web-api: 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - eslint-plugin-react-x: 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + eslint-plugin-react-dom: 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + eslint-plugin-react-jsx: 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + eslint-plugin-react-naming-convention: 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + eslint-plugin-react-rsc: 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + eslint-plugin-react-web-api: 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + eslint-plugin-react-x: 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) ts-api-utils: 2.5.0(typescript@6.0.2) typescript: 6.0.2 transitivePeerDependencies: - supports-color - '@eslint-react/shared@2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2)': + '@eslint-react/jsx@4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2)': + dependencies: + '@eslint-react/ast': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/shared': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/var': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/types': 8.58.1 + '@typescript-eslint/utils': 8.58.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + eslint: 10.2.0(jiti@2.6.1) + ts-pattern: 5.9.0 + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + + '@eslint-react/shared@4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2)': dependencies: - '@eslint-react/eff': 2.13.0 '@typescript-eslint/utils': 8.58.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) eslint: 10.2.0(jiti@2.6.1) ts-pattern: 5.9.0 @@ -7275,11 +7280,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint-react/var@2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2)': + '@eslint-react/var@4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2)': dependencies: - '@eslint-react/ast': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/eff': 2.13.0 - '@eslint-react/shared': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/ast': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/shared': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) '@typescript-eslint/scope-manager': 8.58.1 '@typescript-eslint/types': 8.58.1 '@typescript-eslint/utils': 8.58.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) @@ -9866,13 +9870,13 @@ snapshots: optionalDependencies: eslint-config-prettier: 10.1.8(eslint@10.2.0(jiti@2.6.1)) - eslint-plugin-react-dom@2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2): + eslint-plugin-react-dom@4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2): dependencies: - '@eslint-react/ast': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/core': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/eff': 2.13.0 - '@eslint-react/shared': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/var': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/ast': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/core': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/jsx': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/shared': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/var': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) '@typescript-eslint/scope-manager': 8.58.1 '@typescript-eslint/types': 8.58.1 '@typescript-eslint/utils': 8.58.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) @@ -9883,23 +9887,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-react-hooks-extra@2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2): - dependencies: - '@eslint-react/ast': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/core': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/eff': 2.13.0 - '@eslint-react/shared': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/var': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@typescript-eslint/scope-manager': 8.58.1 - '@typescript-eslint/type-utils': 8.58.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@typescript-eslint/types': 8.58.1 - '@typescript-eslint/utils': 8.58.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - eslint: 10.2.0(jiti@2.6.1) - ts-pattern: 5.9.0 - typescript: 6.0.2 - transitivePeerDependencies: - - supports-color - eslint-plugin-react-hooks@7.0.1(eslint@10.2.0(jiti@2.6.1)): dependencies: '@babel/core': 7.29.0 @@ -9911,13 +9898,29 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-react-naming-convention@2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2): + eslint-plugin-react-jsx@4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2): dependencies: - '@eslint-react/ast': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/core': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/eff': 2.13.0 - '@eslint-react/shared': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/var': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/ast': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/core': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/jsx': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/shared': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/var': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/scope-manager': 8.58.1 + '@typescript-eslint/types': 8.58.1 + '@typescript-eslint/utils': 8.58.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + compare-versions: 6.1.1 + eslint: 10.2.0(jiti@2.6.1) + ts-pattern: 5.9.0 + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + + eslint-plugin-react-naming-convention@4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2): + dependencies: + '@eslint-react/ast': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/core': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/shared': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/var': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) '@typescript-eslint/scope-manager': 8.58.1 '@typescript-eslint/type-utils': 8.58.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) '@typescript-eslint/types': 8.58.1 @@ -9934,11 +9937,13 @@ snapshots: dependencies: eslint: 10.2.0(jiti@2.6.1) - eslint-plugin-react-rsc@2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2): + eslint-plugin-react-rsc@4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2): dependencies: - '@eslint-react/ast': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/shared': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/var': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/ast': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/shared': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/var': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@typescript-eslint/scope-manager': 8.58.1 + '@typescript-eslint/type-utils': 8.58.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) '@typescript-eslint/types': 8.58.1 '@typescript-eslint/utils': 8.58.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) eslint: 10.2.0(jiti@2.6.1) @@ -9947,13 +9952,12 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-react-web-api@2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2): + eslint-plugin-react-web-api@4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2): dependencies: - '@eslint-react/ast': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/core': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/eff': 2.13.0 - '@eslint-react/shared': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/var': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/ast': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/core': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/shared': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/var': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) '@typescript-eslint/scope-manager': 8.58.1 '@typescript-eslint/types': 8.58.1 '@typescript-eslint/utils': 8.58.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) @@ -9964,20 +9968,20 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-react-x@2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2): + eslint-plugin-react-x@4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2): dependencies: - '@eslint-react/ast': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/core': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/eff': 2.13.0 - '@eslint-react/shared': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - '@eslint-react/var': 2.13.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/ast': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/core': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/jsx': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/shared': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + '@eslint-react/var': 4.2.3(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) '@typescript-eslint/scope-manager': 8.58.1 '@typescript-eslint/type-utils': 8.58.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) '@typescript-eslint/types': 8.58.1 '@typescript-eslint/utils': 8.58.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) compare-versions: 6.1.1 eslint: 10.2.0(jiti@2.6.1) - is-immutable-type: 5.0.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + string-ts: 2.3.1 ts-api-utils: 2.5.0(typescript@6.0.2) ts-pattern: 5.9.0 typescript: 6.0.2 @@ -10975,16 +10979,6 @@ snapshots: is-hexadecimal@2.0.1: {} - is-immutable-type@5.0.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2): - dependencies: - '@typescript-eslint/type-utils': 8.58.1(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) - eslint: 10.2.0(jiti@2.6.1) - ts-api-utils: 2.5.0(typescript@6.0.2) - ts-declaration-location: 1.0.7(typescript@6.0.2) - typescript: 6.0.2 - transitivePeerDependencies: - - supports-color - is-in-ci@2.0.0: {} is-in-ssh@1.0.0: {} From dba1f8fc267a52163137e31e3918d4bc179f44dc Mon Sep 17 00:00:00 2001 From: fro-bot <80104189+fro-bot@users.noreply.github.com> Date: Wed, 15 Apr 2026 05:46:34 +0000 Subject: [PATCH 2/2] fix(eslint-config): update ReactTypeAwareRules to use @eslint-react/ prefix for v4 compatibility In @eslint-react/eslint-plugin v4, the unified plugin architecture registers rules under the `@eslint-react/` namespace rather than the legacy `react/` namespace. Update rule references from `react/no-implicit-key` and `react/no-leaked-conditional-rendering` to `@eslint-react/no-implicit-key` and `@eslint-react/no-leaked-conditional-rendering` to fix the ts-strict-with-react fixture test failure. --- packages/eslint-config/src/configs/react.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/eslint-config/src/configs/react.ts b/packages/eslint-config/src/configs/react.ts index 55ca253cc..d24c3a7c0 100644 --- a/packages/eslint-config/src/configs/react.ts +++ b/packages/eslint-config/src/configs/react.ts @@ -24,8 +24,8 @@ const ReactRouterPackages = [ const NextJsPackages = ['next'] const ReactTypeAwareRules: Config['rules'] = { - 'react/no-implicit-key': 'warn', - 'react/no-leaked-conditional-rendering': 'warn', + '@eslint-react/no-implicit-key': 'warn', + '@eslint-react/no-leaked-conditional-rendering': 'warn', } /**