From 8fa4deb0dfb0e2be45382e0517f49fdf2898c173 Mon Sep 17 00:00:00 2001 From: Harlan Wilton Date: Wed, 18 Feb 2026 19:44:20 +1100 Subject: [PATCH 01/11] feat: add Vercel Analytics support - New useScriptVercelAnalytics composable with track/pageview API - Queue init matching @vercel/analytics (window.va/window.vaq) - beforeSend callback for privacy filtering - FirstParty proxy support (rewrites va.vercel-scripts.com) - DSN option for non-Vercel deployments - Documentation, playground page, and E2E test --- .../scripts/analytics/vercel-analytics.md | 179 ++++++++++++++++++ .../vercel-analytics/nuxt-scripts.vue | 39 ++++ src/proxy-configs.ts | 11 ++ src/registry.ts | 11 ++ src/runtime/registry/vercel-analytics.ts | 114 +++++++++++ src/runtime/types.ts | 2 + test/e2e/basic.test.ts | 34 ++++ .../basic/pages/tpc/vercel-analytics.vue | 53 ++++++ 8 files changed, 443 insertions(+) create mode 100644 docs/content/scripts/analytics/vercel-analytics.md create mode 100644 playground/pages/third-parties/vercel-analytics/nuxt-scripts.vue create mode 100644 src/runtime/registry/vercel-analytics.ts create mode 100644 test/fixtures/basic/pages/tpc/vercel-analytics.vue diff --git a/docs/content/scripts/analytics/vercel-analytics.md b/docs/content/scripts/analytics/vercel-analytics.md new file mode 100644 index 00000000..668701a3 --- /dev/null +++ b/docs/content/scripts/analytics/vercel-analytics.md @@ -0,0 +1,179 @@ +--- +title: Vercel Analytics +description: Use Vercel Analytics in your Nuxt app. +links: + - label: Source + icon: i-simple-icons-github + to: https://github.com/nuxt/scripts/blob/main/src/runtime/registry/vercel-analytics.ts + size: xs + - label: Vercel Analytics + icon: i-simple-icons-vercel + to: https://vercel.com/docs/analytics + size: xs +--- + +[Vercel Analytics](https://vercel.com/docs/analytics) provides lightweight, privacy-friendly web analytics for your Nuxt app. It tracks page views and custom events with zero configuration when deployed on Vercel. + +The simplest way to load Vercel Analytics globally in your Nuxt App is to use Nuxt config. Alternatively you can directly +use the [useScriptVercelAnalytics](#usescriptvercelanalytics) composable. + +## Loading Globally + +If you'd like to avoid loading the analytics in development, you can use the [Environment overrides](https://nuxt.com/docs/getting-started/configuration#environment-overrides) in your Nuxt config. + +::code-group + +```ts [Always enabled] +export default defineNuxtConfig({ + scripts: { + registry: { + vercelAnalytics: true, + } + } +}) +``` + +```ts [Production only] +export default defineNuxtConfig({ + $production: { + scripts: { + registry: { + vercelAnalytics: true, + } + } + } +}) +``` + +```ts [Non-Vercel deployment] +export default defineNuxtConfig({ + scripts: { + registry: { + vercelAnalytics: { + dsn: 'YOUR_DSN', + } + } + } +}) +``` + +:: + +### First-Party Mode + +When `scripts.firstParty` is enabled, the analytics script is bundled locally and data collection requests are proxied through your server. This prevents ad blockers from blocking analytics and removes sensitive data from third-party requests. + +```ts +export default defineNuxtConfig({ + scripts: { + firstParty: true, + registry: { + vercelAnalytics: true, + } + } +}) +``` + +## useScriptVercelAnalytics + +The `useScriptVercelAnalytics` composable lets you have fine-grain control over when and how Vercel Analytics is loaded on your site. + +```ts +function useScriptVercelAnalytics(_options?: VercelAnalyticsInput & { beforeSend?: BeforeSend }) {} +``` + +Please follow the [Registry Scripts](/docs/guides/registry-scripts) guide to learn more about advanced usage. + +The composable comes with the following defaults: +- **Trigger: Client** Script will load when the Nuxt is hydrating to keep web vital metrics accurate. + +### VercelAnalyticsInput + +```ts +export const VercelAnalyticsOptions = object({ + /** + * The DSN of the project to send events to. + * Only required when self-hosting or deploying outside of Vercel. + */ + dsn: optional(string()), + /** + * Whether to disable automatic page view tracking on route changes. + * Set to true if you want to manually call pageview(). + */ + disableAutoTrack: optional(boolean()), + /** + * The mode to use for the analytics script. + * - `auto` - Automatically detect the environment (default) + * - `production` - Always use production script + * - `development` - Always use development script (logs to console) + */ + mode: optional(union([literal('auto'), literal('development'), literal('production')])), + /** + * Whether to enable debug logging in development. + * @default true + */ + debug: optional(boolean()), +}) +``` + +### VercelAnalyticsApi + +```ts +export interface VercelAnalyticsApi { + va: (event: string, properties?: unknown) => void + track: (name: string, properties?: Record) => void + pageview: (options?: { route?: string | null, path?: string }) => void +} +``` + +### BeforeSend + +You can pass a `beforeSend` callback to modify or filter events before they're sent. This is useful for stripping sensitive data from URLs. + +```ts +const { proxy } = useScriptVercelAnalytics({ + beforeSend(event) { + // Strip query params from URLs + const url = new URL(event.url) + url.search = '' + return { ...event, url: url.toString() } + }, +}) +``` + +Returning `null` from `beforeSend` will prevent the event from being sent. + +## Example + +Loading Vercel Analytics through `app.vue` when Nuxt is ready. + +```vue [app.vue] + +``` + +### Manual Tracking + +If you want full control over what gets tracked, disable automatic tracking and call `track` / `pageview` manually. + +```vue [app.vue] + +``` diff --git a/playground/pages/third-parties/vercel-analytics/nuxt-scripts.vue b/playground/pages/third-parties/vercel-analytics/nuxt-scripts.vue new file mode 100644 index 00000000..12c97759 --- /dev/null +++ b/playground/pages/third-parties/vercel-analytics/nuxt-scripts.vue @@ -0,0 +1,39 @@ + + + diff --git a/src/proxy-configs.ts b/src/proxy-configs.ts index 1cf457dc..89b6d2b1 100644 --- a/src/proxy-configs.ts +++ b/src/proxy-configs.ts @@ -307,6 +307,17 @@ function buildProxyConfig(collectPrefix: string) { [`${collectPrefix}/crisp/**`]: { proxy: 'https://client.crisp.chat/**' }, }, }, + + vercelAnalytics: { + // Vercel Analytics: trusted first-party analytics — minimal privacy needed + privacy: { ip: false, userAgent: false, language: false, screen: false, timezone: false, hardware: false }, + rewrite: [ + { from: 'va.vercel-scripts.com', to: `${collectPrefix}/vercel` }, + ], + routes: { + [`${collectPrefix}/vercel/**`]: { proxy: 'https://va.vercel-scripts.com/**' }, + }, + }, } satisfies Record } diff --git a/src/registry.ts b/src/registry.ts index ea0abad3..da304168 100644 --- a/src/registry.ts +++ b/src/registry.ts @@ -42,6 +42,17 @@ export async function registry(resolve?: (path: string, opts?: ResolvePathOption from: await resolve('./runtime/registry/cloudflare-web-analytics'), }, }, + { + label: 'Vercel Analytics', + src: 'https://va.vercel-scripts.com/v1/script.js', + proxy: 'vercelAnalytics', + category: 'analytics', + logo: ``, + import: { + name: 'useScriptVercelAnalytics', + from: await resolve('./runtime/registry/vercel-analytics'), + }, + }, { label: 'PostHog', src: false, diff --git a/src/runtime/registry/vercel-analytics.ts b/src/runtime/registry/vercel-analytics.ts new file mode 100644 index 00000000..5a07abc8 --- /dev/null +++ b/src/runtime/registry/vercel-analytics.ts @@ -0,0 +1,114 @@ +import { useRegistryScript } from '../utils' +import { boolean, literal, object, optional, string, union } from '#nuxt-scripts-validator' +import type { RegistryScriptInput } from '#nuxt-scripts/types' + +export type AllowedPropertyValues = string | number | boolean | null | undefined + +export interface BeforeSendEvent { + type: 'pageview' | 'event' + url: string +} + +export type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null + +export type VercelAnalyticsMode = 'auto' | 'development' | 'production' + +export const VercelAnalyticsOptions = object({ + /** + * The DSN of the project to send events to. + * Only required when self-hosting or deploying outside of Vercel. + */ + dsn: optional(string()), + /** + * Whether to disable automatic page view tracking on route changes. + * Set to true if you want to manually call pageview(). + */ + disableAutoTrack: optional(boolean()), + /** + * The mode to use for the analytics script. + * - `auto` - Automatically detect the environment (default) + * - `production` - Always use production script + * - `development` - Always use development script (logs to console) + */ + mode: optional(union([literal('auto'), literal('development'), literal('production')])), + /** + * Whether to enable debug logging in development. + * @default true + */ + debug: optional(boolean()), +}) + +export type VercelAnalyticsInput = RegistryScriptInput + +export interface VercelAnalyticsApi { + va: (event: string, properties?: unknown) => void + track: (name: string, properties?: Record) => void + pageview: (options?: { route?: string | null, path?: string }) => void +} + +declare global { + interface Window { + va?: (event: string, properties?: unknown) => void + vaq?: [string, unknown?][] + vam?: VercelAnalyticsMode + } +} + +export function useScriptVercelAnalytics(_options?: VercelAnalyticsInput & { beforeSend?: BeforeSend }) { + return useRegistryScript('vercelAnalytics', (options) => { + const scriptInput: { src: string, defer: boolean, 'data-dsn'?: string, 'data-disable-auto-track'?: string, 'data-debug'?: string } = { + src: 'https://va.vercel-scripts.com/v1/script.js', + defer: true, + } + + if (options?.dsn) + scriptInput['data-dsn'] = options.dsn + if (options?.disableAutoTrack) + scriptInput['data-disable-auto-track'] = '1' + if (options?.debug === false) + scriptInput['data-debug'] = 'false' + + return { + scriptInput, + schema: import.meta.dev ? VercelAnalyticsOptions : undefined, + scriptOptions: { + use: () => ({ + va: window.va as VercelAnalyticsApi['va'], + track(name: string, properties?: Record) { + if (!properties) { + window.va?.('event', { name }) + return + } + // Strip non-primitive values (objects) in production + const cleaned: Record = {} + for (const [key, value] of Object.entries(properties)) { + if (typeof value !== 'object' || value === null) + cleaned[key] = value + } + window.va?.('event', { name, data: cleaned }) + }, + pageview(opts?: { route?: string | null, path?: string }) { + window.va?.('pageview', opts) + }, + }), + }, + clientInit: import.meta.server + ? undefined + : () => { + if (window.va) return + // Set up the queue exactly as @vercel/analytics does + window.va = function (...params: [string, unknown?]) { + ; (window.vaq = window.vaq || []).push(params) + } + // Set mode + if (options?.mode && options.mode !== 'auto') { + window.vam = options.mode + } + // Register beforeSend middleware + if (_options?.beforeSend) { + window.va('beforeSend', _options.beforeSend) + } + }, + } + }, _options) +} diff --git a/src/runtime/types.ts b/src/runtime/types.ts index 25a8a19c..e00cfeaf 100644 --- a/src/runtime/types.ts +++ b/src/runtime/types.ts @@ -32,6 +32,7 @@ import type { SnapTrPixelInput } from './registry/snapchat-pixel' import type { StripeInput } from './registry/stripe' import type { TikTokPixelInput } from './registry/tiktok-pixel' import type { UmamiAnalyticsInput } from './registry/umami-analytics' +import type { VercelAnalyticsInput } from './registry/vercel-analytics' import type { VimeoPlayerInput } from './registry/vimeo-player' import type { XPixelInput } from './registry/x-pixel' import type { YouTubePlayerInput } from './registry/youtube-player' @@ -185,6 +186,7 @@ export interface ScriptRegistry { xPixel?: XPixelInput snapchatPixel?: SnapTrPixelInput youtubePlayer?: YouTubePlayerInput + vercelAnalytics?: VercelAnalyticsInput vimeoPlayer?: VimeoPlayerInput umamiAnalytics?: UmamiAnalyticsInput [key: `${string}-npm`]: NpmInput diff --git a/test/e2e/basic.test.ts b/test/e2e/basic.test.ts index 0503e96f..bab4cf35 100644 --- a/test/e2e/basic.test.ts +++ b/test/e2e/basic.test.ts @@ -370,6 +370,40 @@ describe('third-party-capital', () => { }) expect(hasGoogleApi).toBe(true) }) + + it('expect Vercel Analytics to initialize queue and handle events', { + timeout: 10000, + }, async () => { + const { page } = await createPage('/tpc/vercel-analytics') + await page.waitForTimeout(500) + + // Verify the queue was initialized (clientInit sets up window.va) + const hasQueue = await page.evaluate(() => { + return typeof window.va === 'function' + }) + expect(hasQueue).toBe(true) + + // Track an event via the UI button + await page.click('#track-event') + await page.waitForTimeout(300) + + const eventTracked = await page.$eval('#event-tracked', el => el.textContent?.trim()) + expect(eventTracked).toBe('true') + + // Send a pageview via the UI button + await page.click('#send-pageview') + await page.waitForTimeout(300) + + const pageviewSent = await page.$eval('#pageview-sent', el => el.textContent?.trim()) + expect(pageviewSent).toBe('true') + + // Verify the queue accumulated events (script won't load from /_vercel/insights in test env) + const queueLength = await page.evaluate(() => { + return (window.vaq || []).length + }) + // Queue should have: beforeSend (if configured) + event + pageview calls + expect(queueLength).toBeGreaterThanOrEqual(2) + }) }) describe('social-embeds', () => { diff --git a/test/fixtures/basic/pages/tpc/vercel-analytics.vue b/test/fixtures/basic/pages/tpc/vercel-analytics.vue new file mode 100644 index 00000000..e9719bfd --- /dev/null +++ b/test/fixtures/basic/pages/tpc/vercel-analytics.vue @@ -0,0 +1,53 @@ + + + From ca638752b488006cb4203cd6a3d25b55849f1368 Mon Sep 17 00:00:00 2001 From: Harlan Wilton Date: Wed, 18 Feb 2026 20:19:15 +1100 Subject: [PATCH 02/11] fix: address PR review feedback - Fix grammar: remove redundant "the" before Nuxt - Fix debug option: handle both true/false explicitly via data-debug attribute - Fix debug docs: clarify auto-enabled in dev/test, not @default true - Fix indentation: 2-space indent per project convention - Fix indent-binary-ops in types.ts --- .../scripts/analytics/vercel-analytics.md | 6 +- src/runtime/registry/vercel-analytics.ts | 172 +++++++++--------- 2 files changed, 89 insertions(+), 89 deletions(-) diff --git a/docs/content/scripts/analytics/vercel-analytics.md b/docs/content/scripts/analytics/vercel-analytics.md index 668701a3..a3d36e88 100644 --- a/docs/content/scripts/analytics/vercel-analytics.md +++ b/docs/content/scripts/analytics/vercel-analytics.md @@ -85,7 +85,7 @@ function useScriptVercelAnalytics(_options?: Verce Please follow the [Registry Scripts](/docs/guides/registry-scripts) guide to learn more about advanced usage. The composable comes with the following defaults: -- **Trigger: Client** Script will load when the Nuxt is hydrating to keep web vital metrics accurate. +- **Trigger: Client** Script will load when Nuxt is hydrating to keep web vital metrics accurate. ### VercelAnalyticsInput @@ -109,8 +109,8 @@ export const VercelAnalyticsOptions = object({ */ mode: optional(union([literal('auto'), literal('development'), literal('production')])), /** - * Whether to enable debug logging in development. - * @default true + * Whether to enable debug logging. + * Automatically enabled in development/test environments. */ debug: optional(boolean()), }) diff --git a/src/runtime/registry/vercel-analytics.ts b/src/runtime/registry/vercel-analytics.ts index 5a07abc8..011a4fb1 100644 --- a/src/runtime/registry/vercel-analytics.ts +++ b/src/runtime/registry/vercel-analytics.ts @@ -5,8 +5,8 @@ import type { RegistryScriptInput } from '#nuxt-scripts/types' export type AllowedPropertyValues = string | number | boolean | null | undefined export interface BeforeSendEvent { - type: 'pageview' | 'event' - url: string + type: 'pageview' | 'event' + url: string } export type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null @@ -14,101 +14,101 @@ export type BeforeSend = (event: BeforeSendEvent) => BeforeSendEvent | null export type VercelAnalyticsMode = 'auto' | 'development' | 'production' export const VercelAnalyticsOptions = object({ - /** - * The DSN of the project to send events to. - * Only required when self-hosting or deploying outside of Vercel. - */ - dsn: optional(string()), - /** - * Whether to disable automatic page view tracking on route changes. - * Set to true if you want to manually call pageview(). - */ - disableAutoTrack: optional(boolean()), - /** - * The mode to use for the analytics script. - * - `auto` - Automatically detect the environment (default) - * - `production` - Always use production script - * - `development` - Always use development script (logs to console) - */ - mode: optional(union([literal('auto'), literal('development'), literal('production')])), - /** - * Whether to enable debug logging in development. - * @default true - */ - debug: optional(boolean()), + /** + * The DSN of the project to send events to. + * Only required when self-hosting or deploying outside of Vercel. + */ + dsn: optional(string()), + /** + * Whether to disable automatic page view tracking on route changes. + * Set to true if you want to manually call pageview(). + */ + disableAutoTrack: optional(boolean()), + /** + * The mode to use for the analytics script. + * - `auto` - Automatically detect the environment (default) + * - `production` - Always use production script + * - `development` - Always use development script (logs to console) + */ + mode: optional(union([literal('auto'), literal('development'), literal('production')])), + /** + * Whether to enable debug logging. + * Automatically enabled in development/test environments. + */ + debug: optional(boolean()), }) export type VercelAnalyticsInput = RegistryScriptInput export interface VercelAnalyticsApi { - va: (event: string, properties?: unknown) => void - track: (name: string, properties?: Record) => void - pageview: (options?: { route?: string | null, path?: string }) => void + va: (event: string, properties?: unknown) => void + track: (name: string, properties?: Record) => void + pageview: (options?: { route?: string | null, path?: string }) => void } declare global { - interface Window { - va?: (event: string, properties?: unknown) => void - vaq?: [string, unknown?][] - vam?: VercelAnalyticsMode - } + interface Window { + va?: (event: string, properties?: unknown) => void + vaq?: [string, unknown?][] + vam?: VercelAnalyticsMode + } } export function useScriptVercelAnalytics(_options?: VercelAnalyticsInput & { beforeSend?: BeforeSend }) { - return useRegistryScript('vercelAnalytics', (options) => { - const scriptInput: { src: string, defer: boolean, 'data-dsn'?: string, 'data-disable-auto-track'?: string, 'data-debug'?: string } = { - src: 'https://va.vercel-scripts.com/v1/script.js', - defer: true, - } + return useRegistryScript('vercelAnalytics', (options) => { + const scriptInput: { 'src': string, 'defer': boolean, 'data-dsn'?: string, 'data-disable-auto-track'?: string, 'data-debug'?: string } = { + src: 'https://va.vercel-scripts.com/v1/script.js', + defer: true, + } - if (options?.dsn) - scriptInput['data-dsn'] = options.dsn - if (options?.disableAutoTrack) - scriptInput['data-disable-auto-track'] = '1' - if (options?.debug === false) - scriptInput['data-debug'] = 'false' + if (options?.dsn) + scriptInput['data-dsn'] = options.dsn + if (options?.disableAutoTrack) + scriptInput['data-disable-auto-track'] = '1' + if (options?.debug !== undefined) + scriptInput['data-debug'] = String(options.debug) - return { - scriptInput, - schema: import.meta.dev ? VercelAnalyticsOptions : undefined, - scriptOptions: { - use: () => ({ - va: window.va as VercelAnalyticsApi['va'], - track(name: string, properties?: Record) { - if (!properties) { - window.va?.('event', { name }) - return - } - // Strip non-primitive values (objects) in production - const cleaned: Record = {} - for (const [key, value] of Object.entries(properties)) { - if (typeof value !== 'object' || value === null) - cleaned[key] = value - } - window.va?.('event', { name, data: cleaned }) - }, - pageview(opts?: { route?: string | null, path?: string }) { - window.va?.('pageview', opts) - }, - }), - }, - clientInit: import.meta.server - ? undefined - : () => { - if (window.va) return - // Set up the queue exactly as @vercel/analytics does - window.va = function (...params: [string, unknown?]) { - ; (window.vaq = window.vaq || []).push(params) - } - // Set mode - if (options?.mode && options.mode !== 'auto') { - window.vam = options.mode - } - // Register beforeSend middleware - if (_options?.beforeSend) { - window.va('beforeSend', _options.beforeSend) - } - }, - } - }, _options) + return { + scriptInput, + schema: import.meta.dev ? VercelAnalyticsOptions : undefined, + scriptOptions: { + use: () => ({ + va: window.va as VercelAnalyticsApi['va'], + track(name: string, properties?: Record) { + if (!properties) { + window.va?.('event', { name }) + return + } + // Strip non-primitive values (objects) in production + const cleaned: Record = {} + for (const [key, value] of Object.entries(properties)) { + if (typeof value !== 'object' || value === null) + cleaned[key] = value + } + window.va?.('event', { name, data: cleaned }) + }, + pageview(opts?: { route?: string | null, path?: string }) { + window.va?.('pageview', opts) + }, + }), + }, + clientInit: import.meta.server + ? undefined + : () => { + if (window.va) return + // Set up the queue exactly as @vercel/analytics does + window.va = function (...params: [string, unknown?]) { + ; (window.vaq = window.vaq || []).push(params) + } + // Set mode + if (options?.mode && options.mode !== 'auto') { + window.vam = options.mode + } + // Register beforeSend middleware + if (_options?.beforeSend) { + window.va('beforeSend', _options.beforeSend) + } + }, + } + }, _options) } From f5858f52daebeddbd94a5f1cb2bb33912bb08f78 Mon Sep 17 00:00:00 2001 From: Harlan Wilton Date: Wed, 18 Feb 2026 23:25:20 +1100 Subject: [PATCH 03/11] chore: wip --- ...-plan-36c58a35-428c-4713-9b97-0035b1c49e20 | 1 + ...-plan-700ed628-9515-46bf-b08f-9a19b2a0de92 | 1 + ...count-700ed628-9515-46bf-b08f-9a19b2a0de92 | 1 + .claude/plans/461-rybbit-refresh.md | 61 + .claude/plans/522-gtm-config-callback.md | 43 + .claude/plans/ga-gtm-fixes.md | 29 + .claude/plans/google-maps-fixes.md | 79 + .claude/plans/youtube-player-fixes.md | 37 + .claude/session-context.md | 52 + .../skills/nuxt-test-utils-skilld/SKILL.md | 69 + .claude/skills/oxc-walker-skilld/SKILL.md | 87 + CLAUDE.md | 4 + .../scripts/analytics/vercel-analytics.md | 19 +- eslint-typegen.d.ts | 17167 ++++++++++++++++ img.png | Bin 0 -> 867800 bytes .../pages/third-parties/video-players.vue | 28 + src/runtime/registry/vercel-analytics.ts | 30 +- test/e2e-dev/first-party.test.ts | 24 + test/e2e/__snapshots__/proxy/metaPixel.json | 14 + ...ebook.net~signals~config~3925006.diff.json | 2 +- .../proxy/xPixel/t.co~1~i~adsct.diff.json | 2 +- test/e2e/basic.test.ts | 4 +- test/fixtures/first-party/nuxt.config.ts | 1 + .../first-party/pages/vercel-analytics.vue | 28 + test/unit/proxy-configs.test.ts | 2 +- 25 files changed, 17737 insertions(+), 48 deletions(-) create mode 100644 .claude/.active-plan-36c58a35-428c-4713-9b97-0035b1c49e20 create mode 100644 .claude/.active-plan-700ed628-9515-46bf-b08f-9a19b2a0de92 create mode 100644 .claude/.edit-count-700ed628-9515-46bf-b08f-9a19b2a0de92 create mode 100644 .claude/plans/461-rybbit-refresh.md create mode 100644 .claude/plans/522-gtm-config-callback.md create mode 100644 .claude/plans/ga-gtm-fixes.md create mode 100644 .claude/plans/google-maps-fixes.md create mode 100644 .claude/plans/youtube-player-fixes.md create mode 100644 .claude/session-context.md create mode 100644 .claude/skills/nuxt-test-utils-skilld/SKILL.md create mode 100644 .claude/skills/oxc-walker-skilld/SKILL.md create mode 100644 CLAUDE.md create mode 100644 eslint-typegen.d.ts create mode 100644 img.png create mode 100644 playground/pages/third-parties/video-players.vue create mode 100644 test/fixtures/first-party/pages/vercel-analytics.vue diff --git a/.claude/.active-plan-36c58a35-428c-4713-9b97-0035b1c49e20 b/.claude/.active-plan-36c58a35-428c-4713-9b97-0035b1c49e20 new file mode 100644 index 00000000..e3717fa7 --- /dev/null +++ b/.claude/.active-plan-36c58a35-428c-4713-9b97-0035b1c49e20 @@ -0,0 +1 @@ +/home/harlan/pkg/nuxt-scripts/.claude/plans/google-maps-fixes.md diff --git a/.claude/.active-plan-700ed628-9515-46bf-b08f-9a19b2a0de92 b/.claude/.active-plan-700ed628-9515-46bf-b08f-9a19b2a0de92 new file mode 100644 index 00000000..2bed8e24 --- /dev/null +++ b/.claude/.active-plan-700ed628-9515-46bf-b08f-9a19b2a0de92 @@ -0,0 +1 @@ +/home/harlan/pkg/nuxt-scripts/.claude/plans/461-rybbit-refresh.md diff --git a/.claude/.edit-count-700ed628-9515-46bf-b08f-9a19b2a0de92 b/.claude/.edit-count-700ed628-9515-46bf-b08f-9a19b2a0de92 new file mode 100644 index 00000000..0cfbf088 --- /dev/null +++ b/.claude/.edit-count-700ed628-9515-46bf-b08f-9a19b2a0de92 @@ -0,0 +1 @@ +2 diff --git a/.claude/plans/461-rybbit-refresh.md b/.claude/plans/461-rybbit-refresh.md new file mode 100644 index 00000000..2489ff7f --- /dev/null +++ b/.claude/plans/461-rybbit-refresh.md @@ -0,0 +1,61 @@ +# #461 - Rybbit custom events fail after refresh + +## Issue +- **Repro**: https://stackblitz.com/edit/nuxt-starter-qiz8t4kg +- **Problem**: Default page tracking works, but custom events (button clicks) fail after page refresh +- **Behavior**: + - Refresh page -> default track event fires correctly + - Click button -> NO event sent + - Navigate to another page -> click button -> events work again + +## Diagnosis + +State/timing issue on refresh vs SPA navigation: +- On refresh: script loads but proxy not ready for custom events +- On SPA nav: script already loaded, proxy works + +**Root cause**: The original `use()` function returned `null` when `window.rybbit` was undefined, which broke the @unhead/vue proxy's ability to queue calls. + +## Fix Applied + +Added `clientInit` to create a queue-based stub (following GA/Plausible pattern): + +```typescript +clientInit: import.meta.server + ? undefined + : () => { + const w = window as any + if (!w.rybbit) { + const queue: any[] = [] + w.rybbit = { + _q: queue, + pageview: function () { queue.push(['pageview', ...arguments]) }, + event: function () { queue.push(['event', ...arguments]) }, + identify: function () { queue.push(['identify', ...arguments]) }, + clearUserId: function () { queue.push(['clearUserId', ...arguments]) }, + getUserId: () => null, + } + } + }, +``` + +## Progress + +1. [x] Read Rybbit registry script +2. [x] Understand proxy initialization timing +3. [x] Compare state on refresh vs SPA navigation +4. [x] Fix initialization to ensure proxy ready for custom events on refresh +5. [x] All tests pass + +## Final Implementation + +The fix: +1. `clientInit` creates a stub with `_isStub` marker that queues calls to a closure-scoped array +2. `use()` calls `flushQueue()` on every invocation (called on script status changes) +3. `flushQueue()` detects real script (no `_isStub` marker) and replays queued calls + +Key insight: The original code returned `null` from `use()` when `window.rybbit` was undefined, breaking the proxy. The fix ensures `use()` always returns an object and queued calls are flushed when the real script loads. + +## Status: DONE + +Needs manual testing with StackBlitz reproduction to confirm fix. diff --git a/.claude/plans/522-gtm-config-callback.md b/.claude/plans/522-gtm-config-callback.md new file mode 100644 index 00000000..aef2a881 --- /dev/null +++ b/.claude/plans/522-gtm-config-callback.md @@ -0,0 +1,43 @@ +# #522 - onBeforeGtmStart callback not triggered via config + +## Issue +- **Repro**: https://stackblitz.com/edit/nuxt-starter-zwdg7pfn +- **Problem**: `onBeforeGtmStart` callback works when ID passed inline, but NOT when ID is in nuxt.config + +## Reproduction + +**Doesn't work** (ID in config): +```ts +// nuxt.config +scripts: { + registry: { + googleTagManager: { id: "GTM-XXXXXX" } + } +} + +// component +useScriptGoogleTagManager({ + onBeforeGtmStart: (gtag) => { /* NOT CALLED */ } +}) +``` + +**Works** (ID inline): +```ts +useScriptGoogleTagManager({ + id: 'GTM-XXXXXXXX', + onBeforeGtmStart: (gtag) => { /* CALLED */ } +}) +``` + +## Files to Investigate + +- `src/runtime/registry/google-tag-manager.ts` +- How registry scripts merge config vs inline options + +## Plan + +1. [ ] Read GTM registry script implementation +2. [ ] Trace how options merge between config and inline +3. [ ] Find where onBeforeGtmStart is called and why config-only path skips it +4. [ ] Fix option merging to preserve callbacks +5. [ ] Test with reproduction diff --git a/.claude/plans/ga-gtm-fixes.md b/.claude/plans/ga-gtm-fixes.md new file mode 100644 index 00000000..c1479949 --- /dev/null +++ b/.claude/plans/ga-gtm-fixes.md @@ -0,0 +1,29 @@ +# GA/GTM Fixes + +## Issues + +### #490 - Multi-lang GTAG docs +- **Status**: DONE (commit e961e71) +- **Action**: Close issue + +### #540 - GTM SSR Error +- **Status**: Needs reproduction +- **Error**: `useScriptGoogleTagManager(...) is not a function` +- **Info**: Reported on Nuxt 4.1.3, no repro provided +- MarkerClusterer error in comments is unrelated (Google Maps issue) + +## Tasks + +- [x] Identify GA/GTM issues +- [x] Close #490 +- [x] Request reproduction for #540 + +## Status: DONE + +Both GA/GTM issues resolved: +- #490 closed (docs already exist) +- #540 awaiting reproduction from reporter + +## Notes + +Server-side GA4 proxy (#238) handled separately. diff --git a/.claude/plans/google-maps-fixes.md b/.claude/plans/google-maps-fixes.md new file mode 100644 index 00000000..11b02a26 --- /dev/null +++ b/.claude/plans/google-maps-fixes.md @@ -0,0 +1,79 @@ +# Google Maps Fixes + +## Related Issues + +| # | Title | Status | +|---|-------|--------| +| **380** | crossOriginEmbedderPolicy CORS | Fixed (static maps proxy) | +| **83** | Optimize billing (cache static) | Fixed (static maps proxy) | +| **539** | Color mode (light/dark) | Fixed (mapIds prop) | +| **540** | MarkerClusterer optional peer dep | Fixed (inline types) | + +## Completed Work + +### Static Maps Proxy (PR #516 features - integrated) +- Added `googleStaticMapsProxy` config option in module.ts +- Created server handler at `/_scripts/google-static-maps-proxy` +- Updated ScriptGoogleMaps.vue to use proxy when enabled +- Enables caching with configurable `cacheMaxAge` (default 1 hour) +- Fixes CORS issues by serving static map images from same origin +- Reduces Google Maps API billing through server-side caching + +```ts +// nuxt.config.ts +export default defineNuxtConfig({ + scripts: { + googleStaticMapsProxy: { + enabled: true, + cacheMaxAge: 3600 // 1 hour + } + } +}) +``` + +### Color Mode Support (#539) +- Added `mapIds` prop: `{ light?: string, dark?: string }` +- Added `colorMode` prop for manual control +- Auto-detects @nuxtjs/color-mode if installed +- Watches color mode changes and updates map via `setOptions()` + +```vue + +``` + +### MarkerClusterer Optional Peer Dep (#540) +- Removed top-level type import from `@googlemaps/markerclusterer` +- Created inline types: `MarkerClustererInstance`, `MarkerClustererOptions` +- Cast constructor call to avoid type conflicts +- Build no longer fails when markerclusterer is not installed + +### Bug Fixes from Audit +1. **PinElement cleanup**: Added `onUnmounted` hook to clear pin content +2. **importLibrary cache**: Added failure retry logic (clears cache on rejection) + +## Audit Findings (addressed) + +### Fixed +- PinElement missing cleanup (memory leak) +- importLibrary cache race condition (failed imports cached forever) + +### Deferred (lower priority) +- queryToLatLngCache unbounded size (minor memory concern) +- async-promise-executor patterns (code style) +- Deep watch on markers (performance optimization) +- Marker hashing collision potential (edge case) + +## Files Changed + +- `src/module.ts` - googleStaticMapsProxy config +- `src/runtime/server/google-static-maps-proxy.ts` - NEW proxy handler +- `src/runtime/components/GoogleMaps/ScriptGoogleMaps.vue` - color mode, proxy +- `src/runtime/components/GoogleMaps/ScriptGoogleMapsMarkerClusterer.vue` - inline types +- `src/runtime/components/GoogleMaps/ScriptGoogleMapsPinElement.vue` - cleanup + +## Status: DONE + +All tests pass (130/130). Ready for review. diff --git a/.claude/plans/youtube-player-fixes.md b/.claude/plans/youtube-player-fixes.md new file mode 100644 index 00000000..5aa9ae94 --- /dev/null +++ b/.claude/plans/youtube-player-fixes.md @@ -0,0 +1,37 @@ +# YouTube Player Fixes + +Combined plan for #339, #297, #561 + +## Issues + +### #339 - ScriptYouTubePlayer loads ALL iframes on click +- **Repro**: https://stackblitz.com/edit/nuxt-starter-kq6qv7el +- **Problem**: Multiple YouTube players on page, clicking one loads ALL iframes +- **Cause**: Event delegation bug - likely shared state or wrong element targeting +- **Fix**: Isolate click handler per instance + +### #297 - YouTube bug with layouts + transitions + useFetch +- **Repro**: https://stackblitz.com/edit/nuxt-starter-aqvq3n +- **Problem**: Navigate between layouts, video on last page won't play after script loads +- **Cause**: Async state + layout transitions + useFetch timing issue +- **Fix**: Likely needs to handle component unmount/remount during transitions +- **Note**: Works if wrapped in `` + +### #561 - YouTube thumbnail objectFit changed to contain +- **Problem**: objectFit was changed from `cover` to `contain`, breaks non-16:9 videos (e.g. 9:16 shorts) +- **Cause**: Commit aab8428e changed the default +- **Fix**: Revert to `cover` or make it configurable + +## Files to Investigate + +- `src/runtime/components/ScriptYouTubePlayer.vue` +- Related composables for YouTube + +## Plan + +1. [ ] Read ScriptYouTubePlayer.vue component +2. [ ] Analyze #339 - find shared state causing all iframes to load +3. [ ] Analyze #297 - understand lifecycle during transitions +4. [ ] Analyze #561 - check objectFit styling, consider making it a prop +5. [ ] Write fixes +6. [ ] Test with reproductions diff --git a/.claude/session-context.md b/.claude/session-context.md new file mode 100644 index 00000000..31b54f51 --- /dev/null +++ b/.claude/session-context.md @@ -0,0 +1,52 @@ +# Session Context + +Last updated: 2026-01-20 21:57 + +## Git State +``` +Branch: pr-576 + M pnpm-lock.yaml + M src/module.ts + M src/runtime/composables/useScript.ts + M src/runtime/types.ts + M src/templates.ts + M test/fixtures/partytown/nuxt.config.ts + M test/fixtures/partytown/pages/index.vue + M test/unit/templates.test.ts +?? .claude/.active-plan-36c58a35-428c-4713-9b97-0035b1c49e20 +?? .claude/.active-plan-700ed628-9515-46bf-b08f-9a19b2a0de92 +?? .claude/.edit-count-700ed628-9515-46bf-b08f-9a19b2a0de92 +?? .claude/plans/461-rybbit-refresh.md +?? .claude/plans/522-gtm-config-callback.md +?? .claude/plans/ga-gtm-fixes.md +?? .claude/plans/google-maps-fixes.md +?? .claude/plans/youtube-player-fixes.md +?? .claude/session-context.md +?? .claude/sessions/ +?? github-sync.md +?? task-list.md +``` + +## Recent Commits +``` +dc11b94 Merge branch 'main' of github.com:nuxt/scripts into pr-576 +2a48e16 feat: useScript partytown quick-path using useHead +6259505 fix: partytown integration - use useHead for SSR, disable warmup +d3c0c97 doc: mark partytown as experimental with limitations +afb3979 Merge remote-tracking branch 'origin/main' +``` + +## Recently Modified +``` +./playground/.nuxt/nuxt.node.d.ts +./playground/.nuxt/nuxt.shared.d.ts +./playground/.nuxt/schema/nuxt.schema.d.ts +./playground/.nuxt/imports.d.ts +./playground/.nuxt/ui/accordion.ts +./playground/.nuxt/ui/alert.ts +./playground/.nuxt/ui/avatar-group.ts +./playground/.nuxt/ui/avatar.ts +./playground/.nuxt/ui/badge.ts +./playground/.nuxt/ui/banner.ts +``` + diff --git a/.claude/skills/nuxt-test-utils-skilld/SKILL.md b/.claude/skills/nuxt-test-utils-skilld/SKILL.md new file mode 100644 index 00000000..a491a06d --- /dev/null +++ b/.claude/skills/nuxt-test-utils-skilld/SKILL.md @@ -0,0 +1,69 @@ +--- +name: nuxt-test-utils-skilld +description: "ALWAYS use when writing code importing \"nuxt-test-utils\". Consult for debugging, best practices, or modifying nuxt-test-utils, nuxt test utils." +metadata: + version: 0.0.1 + generated_by: Claude Code · Haiku 4.5 + generated_at: 2026-03-03 +--- + +# richardeschloss/nuxt-test-utils `nuxt-test-utils` + +**Version:** 0.0.1 (May 2020) +**Deps:** lodash.template@^4.5.0, serialize-javascript@^3.0.0 +**Tags:** latest: 0.0.1 (May 2020) + +**References:** [package.json](./.skilld/pkg/package.json) — exports, entry points • [README](./.skilld/pkg/README.md) — setup, basic usage • [GitHub Issues](./.skilld/issues/_INDEX.md) — bugs, workarounds, edge cases + +## Search + +Use `skilld search` instead of grepping `.skilld/` directories — hybrid semantic + keyword search across all indexed docs, issues, and releases. If `skilld` is unavailable, use `npx -y skilld search`. + +```bash +skilld search "query" -p nuxt-test-utils +skilld search "issues:error handling" -p nuxt-test-utils +``` + +Filters: `docs:`, `issues:`, `releases:` prefix narrows by source type. + +## API Changes + +This section documents v0.0.1 as the initial release with foundational testing utilities for Nuxt modules and plugins. + +- NEW: `getModuleOptions(config, moduleName, optsContainer)` — Module utility to extract module options from Nuxt config, searches buildModules/modules/optsContainer [source](./.skilld/pkg/README.md:L79:86) + +- NEW: `ModuleContext({ options, module, compileOpts })` — Class providing test context for modules with `addTemplate()`, `addPlugin()`, `compilePlugin()`, and `registerModule()` methods [source](./.skilld/pkg/README.md:L87:97) + +- NEW: `compilePlugin({ src, tmpFile, options, overwrite })` — Plugin compilation utility that processes ERB templates and replaces `<%= JSON.stringify(options) %>` placeholders [source](./.skilld/pkg/README.md:L100:107) + +- NEW: `PluginContext(Plugin)` — Class constructor for testing plugins; intercepts `inject()` calls and stores injected items in `this.injected[label]` [source](./.skilld/pkg/README.md:L108:114) + +- NEW: `delay(ms)` — Promisified `setTimeout` wrapper for cleaner async test code [source](./.skilld/pkg/README.md:L117) + +- NEW: `nextTickP(ctx)` — Promise wrapper around `ctx.$nextTick()` for awaitable Vue tick handling [source](./.skilld/pkg/README.md:L118) + +- NEW: `watchP(ctx, prop, changesFn)` — Promise wrapper around `ctx.$watch()` for awaiting data changes in tests [source](./.skilld/pkg/README.md:L119) + +**Also changed:** Initial release (v0.0.1) with birth of nuxt-test-utils [source](./.skilld/pkg/CHANGELOG.md:L4:7) + +## Best Practices + +- Use selective imports for better tree-shaking and code clarity instead of importing the entire default export — only import the utilities you actually need in your test [source](./.skilld/pkg/README.md:L52:54) + +- Pass `optsContainer` parameter to `getModuleOptions()` when your module config options are in a custom container — the function searches buildModules, modules, then optsContainer in that order [source](./.skilld/pkg/README.md:L80:85) + +- Set `overwrite: false` (default) in `compilePlugin()` to cache compiled plugins across test runs — only use `overwrite: true` when testing plugin compilation changes [source](./.skilld/pkg/dist/pluginUtils.js:L10:12) + +- In `watchP()`, the callback function executes AFTER the watch listener is set up, ensuring the state change is captured by the listener [source](./.skilld/pkg/dist/waitUtils.js:L13:17) + +- Capture plugin injections in `PluginContext` by accessing `this.injected` after instantiation — this allows you to assert what the plugin injected [source](./.skilld/pkg/dist/pluginUtils.js:L26:32) + +- Call `registerModule()` as the final step to execute the module with mocked context — this triggers all addPlugin/addTemplate calls [source](./.skilld/pkg/dist/moduleUtils.js:L18:20) + +- Use ERB template syntax `<%= expression %>` in plugin files for option interpolation — the lodash template engine will replace these with compiled options [source](./.skilld/pkg/dist/pluginUtils.js:L18) + +- Access `serialize-javascript` in plugin templates for complex object serialization beyond JSON.stringify — it's injected into the template context automatically [source](./.skilld/pkg/README.md:L31) + +- Check `ctx.pluginAdded` and `ctx.templateAdded` properties after module execution — they contain the exact options passed to addPlugin/addTemplate calls [source](./.skilld/pkg/dist/moduleUtils.js:L6:16) + +- Use `ModuleContext.compilePlugin()` directly when testing plugin compilation in isolation without a full module context [source](./.skilld/pkg/dist/moduleUtils.js:L17) diff --git a/.claude/skills/oxc-walker-skilld/SKILL.md b/.claude/skills/oxc-walker-skilld/SKILL.md new file mode 100644 index 00000000..a023bf84 --- /dev/null +++ b/.claude/skills/oxc-walker-skilld/SKILL.md @@ -0,0 +1,87 @@ +--- +name: oxc-walker-skilld +description: "ALWAYS use when writing code importing \"oxc-walker\". Consult for debugging, best practices, or modifying oxc-walker, oxc walker." +metadata: + version: 0.7.0 + generated_by: Claude Code · Haiku 4.5 + generated_at: 2026-02-24 +--- + +# oxc-project/oxc-walker `oxc-walker` + +**Version:** 0.7.0 (Jan 2026) +**Deps:** magic-regexp@^0.10.0 +**Tags:** latest: 0.7.0 (Jan 2026) + +**References:** [package.json](./.skilld/pkg/package.json) — exports, entry points • [README](./.skilld/pkg/README.md) — setup, basic usage • [GitHub Issues](./.skilld/issues/_INDEX.md) — bugs, workarounds, edge cases • [Releases](./.skilld/releases/_INDEX.md) — changelog, breaking changes, new APIs + +## Search + +Use `skilld search` instead of grepping `.skilld/` directories — hybrid semantic + keyword search across all indexed docs, issues, and releases. If `skilld` is unavailable, use `npx -y skilld search`. + +```bash +skilld search "query" -p oxc-walker +skilld search "issues:error handling" -p oxc-walker +skilld search "releases:deprecated" -p oxc-walker +``` + +Filters: `docs:`, `issues:`, `releases:` prefix narrows by source type. + +## API Changes + +This section documents version-specific API changes -- prioritize recent major/minor releases. + +- NEW: `ScopeTrackerVariable` -- exported class in v0.7.0, enables `instanceof` checks on results from `scopeTracker.getDeclaration()`. Previously internal-only; LLMs will not know these classes are importable [source](./.skilld/releases/v0.7.0.md#features) + +- NEW: `ScopeTrackerFunction` -- exported class in v0.7.0, represents function declarations tracked by `ScopeTracker`. Import directly from `oxc-walker` for type narrowing [source](./.skilld/releases/v0.7.0.md#features) + +- NEW: `ScopeTrackerImport` -- exported class in v0.7.0, represents import declarations tracked by `ScopeTracker`. Has `.importNode` property for accessing the full `ImportDeclaration` [source](./.skilld/releases/v0.7.0.md#features) + +- NEW: `ScopeTrackerFunctionParam` -- exported class in v0.7.0, represents function parameters tracked by `ScopeTracker`. Has `.fnNode` for accessing the parent function node [source](./.skilld/releases/v0.7.0.md#features) + +- NEW: `ScopeTrackerIdentifier` -- exported class in v0.7.0, represents plain identifiers (e.g. class/enum names) tracked by `ScopeTracker` [source](./.skilld/releases/v0.7.0.md#features) + +- NEW: `ScopeTrackerCatchParam` -- exported class in v0.7.0, represents catch clause parameters tracked by `ScopeTracker`. Has `.catchNode` for the parent `CatchClause` [source](./.skilld/releases/v0.7.0.md#features) + +- NEW: `getUndeclaredIdentifiersInFunction(node)` -- exported in v0.7.0, returns `string[]` of identifier names referenced but not declared within a `Function` or `ArrowFunctionExpression` node [source](./.skilld/releases/v0.7.0.md#features) + +- NEW: `isBindingIdentifier(node, parent)` -- exported in v0.7.0, returns `boolean` indicating whether a node is a binding identifier given its parent context [source](./.skilld/releases/v0.7.0.md#features) + +- DEPRECATED: `ScopeTrackerFunctionParam.start` -- use `.fnNode.start` instead. The representation of this position may change in future versions [source](./.skilld/pkg/dist/index.d.ts:L279) + +- DEPRECATED: `ScopeTrackerFunctionParam.end` -- use `.fnNode.end` instead. The representation of this position may change in future versions [source](./.skilld/pkg/dist/index.d.ts:L283) + +- NEW: `ScopeTrackerNode` type -- union type exported in v0.7.0: `ScopeTrackerFunctionParam | ScopeTrackerFunction | ScopeTrackerVariable | ScopeTrackerIdentifier | ScopeTrackerImport | ScopeTrackerCatchParam`. Use for typing `getDeclaration()` results [source](./.skilld/releases/v0.7.0.md#features) + +- BREAKING: `oxc-parser` peer dependency -- v0.6.0 requires `oxc-parser` v0.98.0+. Older oxc-parser versions are no longer compatible [source](./.skilld/releases/v0.6.0.md#features) + +**Also changed:** `WalkOptions` type exported v0.7.0 · `WalkerEnter` type exported v0.7.0 · `WalkerLeave` type exported v0.7.0 · `WalkerCallbackContext` type exported v0.7.0 · `WalkerThisContextEnter` type exported v0.7.0 · `WalkerThisContextLeave` type exported v0.7.0 · `Identifier` type exported v0.7.0 · `ScopeTrackerOptions` type exported v0.7.0 + +## Best Practices + +- Use regular function expressions (not arrow functions) for `enter`/`leave` callbacks -- `this.skip()`, `this.replace()`, and `this.remove()` are bound via `this` context and won't work with arrow functions [source](./.skilld/pkg/dist/index.d.ts:L88:90) + +```ts +// correct +walk(ast, { enter(node) { this.skip() } }) +// broken -- this.skip is undefined +walk(ast, { enter: (node) => { this.skip() } }) +``` + +- Use `parseAndWalk` over separate `parseSync` + `walk` when you only need a single pass -- it returns `ParseResult` (including `program`) so you can still re-walk the AST if needed later [source](./.skilld/pkg/README.md#parse-and-walk-directly) + +- For hoisted declaration resolution, use the two-pass pattern: create `ScopeTracker({ preserveExitedScopes: true })`, run `parseAndWalk` as a pre-pass to collect all declarations, call `scopeTracker.freeze()`, then `walk(program, { scopeTracker })` for analysis -- without this, `getDeclaration()` returns `null` for identifiers declared after their usage in source order [source](./.skilld/pkg/README.md:L170:203) + +- Do not use `this.replace()` or `this.remove()` when a `ScopeTracker` is attached -- the scope tracker will not update its internal declarations, leaving stale scope data [source](./.skilld/pkg/README.md#thisreplacenewnode) + +- `this.remove()` takes precedence over `this.replace()` -- if both are called in the same callback, the node is removed regardless of replacement [source](./.skilld/pkg/README.md#thisremove) + +- `this.skip()` is only available in `enter`, not `leave`, and skipping a node also prevents its `leave()` callback from firing -- this means ScopeTracker state can become inconsistent if you skip nodes that create scopes [source](./.skilld/issues/issue-106.md) + +- Type-narrow `ScopeTrackerNode` using the `.type` discriminant or `instanceof` (v0.7.0+) to access parent declaration nodes -- `ScopeTrackerVariable` exposes `.variableNode`, `ScopeTrackerImport` exposes `.importNode`, `ScopeTrackerCatchParam` exposes `.catchNode`, `ScopeTrackerFunctionParam` exposes `.fnNode` [source](./.skilld/pkg/dist/index.d.ts:L268:311) + +- `isCurrentScopeUnder(scope)` uses strict child checking -- it returns `false` when the current scope equals the given scope, only `true` for descendants [source](./.skilld/pkg/dist/index.d.ts:L226:236) + +- Use `getUndeclaredIdentifiersInFunction(node)` to find free variables (closures) in a function or arrow function expression -- useful for tree-shaking analysis and determining if a function can be safely hoisted or moved [source](./.skilld/pkg/dist/index.d.ts:L246) + +- `ScopeTrackerFunctionParam.start` and `.end` are deprecated -- access the function's position via `.fnNode.start` and `.fnNode.end` instead [source](./.skilld/pkg/dist/index.d.ts:L277:285) diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..287e25d2 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,4 @@ + +Before modifying code, evaluate each installed skill against the current task. +For each skill, determine YES/NO relevance and invoke all YES skills before proceeding. + diff --git a/docs/content/scripts/analytics/vercel-analytics.md b/docs/content/scripts/analytics/vercel-analytics.md index a3d36e88..2f116618 100644 --- a/docs/content/scripts/analytics/vercel-analytics.md +++ b/docs/content/scripts/analytics/vercel-analytics.md @@ -79,7 +79,7 @@ export default defineNuxtConfig({ The `useScriptVercelAnalytics` composable lets you have fine-grain control over when and how Vercel Analytics is loaded on your site. ```ts -function useScriptVercelAnalytics(_options?: VercelAnalyticsInput & { beforeSend?: BeforeSend }) {} +function useScriptVercelAnalytics(_options?: VercelAnalyticsInput) {} ``` Please follow the [Registry Scripts](/docs/guides/registry-scripts) guide to learn more about advanced usage. @@ -126,23 +126,6 @@ export interface VercelAnalyticsApi { } ``` -### BeforeSend - -You can pass a `beforeSend` callback to modify or filter events before they're sent. This is useful for stripping sensitive data from URLs. - -```ts -const { proxy } = useScriptVercelAnalytics({ - beforeSend(event) { - // Strip query params from URLs - const url = new URL(event.url) - url.search = '' - return { ...event, url: url.toString() } - }, -}) -``` - -Returning `null` from `beforeSend` will prevent the event from being sent. - ## Example Loading Vercel Analytics through `app.vue` when Nuxt is ready. diff --git a/eslint-typegen.d.ts b/eslint-typegen.d.ts new file mode 100644 index 00000000..c57ae8c6 --- /dev/null +++ b/eslint-typegen.d.ts @@ -0,0 +1,17167 @@ +/* This file is generated by eslint-typegen, for augmenting rules types in ESLint */ +/* You might want to include this file in tsconfig.json but excluded from git */ +/* eslint-typegen-hash: rvbyxOejco_dytVgdBuGI7o9hAO1VGCwNIndqWflLVg */ + +/* eslint-disable */ +/* prettier-ignore */ +import type { Linter } from 'eslint' + +declare module 'eslint' { + namespace Linter { + interface RulesRecord extends RuleOptions {} + } +} + +export interface RuleOptions { + /** + * Enforce linebreaks after opening and before closing array brackets + * @see https://eslint.style/rules/array-bracket-newline + */ + '@stylistic/array-bracket-newline'?: Linter.RuleEntry + /** + * Enforce consistent spacing inside array brackets + * @see https://eslint.style/rules/array-bracket-spacing + */ + '@stylistic/array-bracket-spacing'?: Linter.RuleEntry + /** + * Enforce line breaks after each array element + * @see https://eslint.style/rules/array-element-newline + */ + '@stylistic/array-element-newline'?: Linter.RuleEntry + /** + * Require parentheses around arrow function arguments + * @see https://eslint.style/rules/arrow-parens + */ + '@stylistic/arrow-parens'?: Linter.RuleEntry + /** + * Enforce consistent spacing before and after the arrow in arrow functions + * @see https://eslint.style/rules/arrow-spacing + */ + '@stylistic/arrow-spacing'?: Linter.RuleEntry + /** + * Disallow or enforce spaces inside of blocks after opening block and before closing block + * @see https://eslint.style/rules/block-spacing + */ + '@stylistic/block-spacing'?: Linter.RuleEntry + /** + * Enforce consistent brace style for blocks + * @see https://eslint.style/rules/brace-style + */ + '@stylistic/brace-style'?: Linter.RuleEntry + /** + * Require or disallow trailing commas + * @see https://eslint.style/rules/comma-dangle + */ + '@stylistic/comma-dangle'?: Linter.RuleEntry + /** + * Enforce consistent spacing before and after commas + * @see https://eslint.style/rules/comma-spacing + */ + '@stylistic/comma-spacing'?: Linter.RuleEntry + /** + * Enforce consistent comma style + * @see https://eslint.style/rules/comma-style + */ + '@stylistic/comma-style'?: Linter.RuleEntry + /** + * Enforce consistent spacing inside computed property brackets + * @see https://eslint.style/rules/computed-property-spacing + */ + '@stylistic/computed-property-spacing'?: Linter.RuleEntry + /** + * Enforce consistent line breaks after opening and before closing braces + * @see https://eslint.style/rules/curly-newline + */ + '@stylistic/curly-newline'?: Linter.RuleEntry + /** + * Enforce consistent newlines before and after dots + * @see https://eslint.style/rules/dot-location + */ + '@stylistic/dot-location'?: Linter.RuleEntry + /** + * Require or disallow newline at the end of files + * @see https://eslint.style/rules/eol-last + */ + '@stylistic/eol-last'?: Linter.RuleEntry + /** + * Enforce consistent line break styles for JSX props + * @see https://eslint.style/rules/jsx-props-style + */ + '@stylistic/exp-jsx-props-style'?: Linter.RuleEntry + /** + * Enforce consistent spacing and line break styles inside brackets. + * @see https://eslint.style/rules/list-style + */ + '@stylistic/exp-list-style'?: Linter.RuleEntry + /** + * Enforce line breaks between arguments of a function call + * @see https://eslint.style/rules/function-call-argument-newline + */ + '@stylistic/function-call-argument-newline'?: Linter.RuleEntry + /** + * Require or disallow spacing between function identifiers and their invocations + * @see https://eslint.style/rules/function-call-spacing + */ + '@stylistic/function-call-spacing'?: Linter.RuleEntry + /** + * Enforce consistent line breaks inside function parentheses + * @see https://eslint.style/rules/function-paren-newline + */ + '@stylistic/function-paren-newline'?: Linter.RuleEntry + /** + * Enforce consistent spacing around `*` operators in generator functions + * @see https://eslint.style/rules/generator-star-spacing + */ + '@stylistic/generator-star-spacing'?: Linter.RuleEntry + /** + * Enforce the location of arrow function bodies + * @see https://eslint.style/rules/implicit-arrow-linebreak + */ + '@stylistic/implicit-arrow-linebreak'?: Linter.RuleEntry + /** + * Enforce consistent indentation + * @see https://eslint.style/rules/indent + */ + '@stylistic/indent'?: Linter.RuleEntry + /** + * Indentation for binary operators + * @see https://eslint.style/rules/indent-binary-ops + */ + '@stylistic/indent-binary-ops'?: Linter.RuleEntry + /** + * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions + * @see https://eslint.style/rules/jsx-child-element-spacing + */ + '@stylistic/jsx-child-element-spacing'?: Linter.RuleEntry<[]> + /** + * Enforce closing bracket location in JSX + * @see https://eslint.style/rules/jsx-closing-bracket-location + */ + '@stylistic/jsx-closing-bracket-location'?: Linter.RuleEntry + /** + * Enforce closing tag location for multiline JSX + * @see https://eslint.style/rules/jsx-closing-tag-location + */ + '@stylistic/jsx-closing-tag-location'?: 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 + */ + '@stylistic/jsx-curly-brace-presence'?: Linter.RuleEntry + /** + * Enforce consistent linebreaks in curly braces in JSX attributes and expressions + * @see https://eslint.style/rules/jsx-curly-newline + */ + '@stylistic/jsx-curly-newline'?: Linter.RuleEntry + /** + * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions + * @see https://eslint.style/rules/jsx-curly-spacing + */ + '@stylistic/jsx-curly-spacing'?: Linter.RuleEntry + /** + * Enforce or disallow spaces around equal signs in JSX attributes + * @see https://eslint.style/rules/jsx-equals-spacing + */ + '@stylistic/jsx-equals-spacing'?: Linter.RuleEntry + /** + * Enforce proper position of the first property in JSX + * @see https://eslint.style/rules/jsx-first-prop-new-line + */ + '@stylistic/jsx-first-prop-new-line'?: 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 + */ + '@stylistic/jsx-function-call-newline'?: Linter.RuleEntry + /** + * Enforce JSX indentation. Deprecated, use `indent` rule instead. + * @see https://eslint.style/rules/jsx-indent + * @deprecated + */ + '@stylistic/jsx-indent'?: Linter.RuleEntry + /** + * Enforce props indentation in JSX + * @see https://eslint.style/rules/jsx-indent-props + */ + '@stylistic/jsx-indent-props'?: Linter.RuleEntry + /** + * Enforce maximum of props on a single line in JSX + * @see https://eslint.style/rules/jsx-max-props-per-line + */ + '@stylistic/jsx-max-props-per-line'?: Linter.RuleEntry + /** + * Require or prevent a new line after jsx elements and expressions. + * @see https://eslint.style/rules/jsx-newline + */ + '@stylistic/jsx-newline'?: Linter.RuleEntry + /** + * Require one JSX element per line + * @see https://eslint.style/rules/jsx-one-expression-per-line + */ + '@stylistic/jsx-one-expression-per-line'?: Linter.RuleEntry + /** + * Enforce PascalCase for user-defined JSX components + * @see https://eslint.style/rules/jsx-pascal-case + */ + '@stylistic/jsx-pascal-case'?: 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 + */ + '@stylistic/jsx-props-no-multi-spaces'?: Linter.RuleEntry<[]> + /** + * Enforce the consistent use of either double or single quotes in JSX attributes + * @see https://eslint.style/rules/jsx-quotes + */ + '@stylistic/jsx-quotes'?: Linter.RuleEntry + /** + * Disallow extra closing tags for components without children + * @see https://eslint.style/rules/jsx-self-closing-comp + */ + '@stylistic/jsx-self-closing-comp'?: Linter.RuleEntry + /** + * Enforce props alphabetical sorting + * @see https://eslint.style/rules/jsx-sort-props + * @deprecated + */ + '@stylistic/jsx-sort-props'?: Linter.RuleEntry + /** + * Enforce whitespace in and around the JSX opening and closing brackets + * @see https://eslint.style/rules/jsx-tag-spacing + */ + '@stylistic/jsx-tag-spacing'?: Linter.RuleEntry + /** + * Disallow missing parentheses around multiline JSX + * @see https://eslint.style/rules/jsx-wrap-multilines + */ + '@stylistic/jsx-wrap-multilines'?: Linter.RuleEntry + /** + * Enforce consistent spacing between property names and type annotations in types and interfaces + * @see https://eslint.style/rules/key-spacing + */ + '@stylistic/key-spacing'?: Linter.RuleEntry + /** + * Enforce consistent spacing before and after keywords + * @see https://eslint.style/rules/keyword-spacing + */ + '@stylistic/keyword-spacing'?: Linter.RuleEntry + /** + * Enforce position of line comments + * @see https://eslint.style/rules/line-comment-position + */ + '@stylistic/line-comment-position'?: Linter.RuleEntry + /** + * Enforce consistent linebreak style + * @see https://eslint.style/rules/linebreak-style + */ + '@stylistic/linebreak-style'?: Linter.RuleEntry + /** + * Require empty lines around comments + * @see https://eslint.style/rules/lines-around-comment + */ + '@stylistic/lines-around-comment'?: Linter.RuleEntry + /** + * Require or disallow an empty line between class members + * @see https://eslint.style/rules/lines-between-class-members + */ + '@stylistic/lines-between-class-members'?: Linter.RuleEntry + /** + * Enforce a maximum line length + * @see https://eslint.style/rules/max-len + */ + '@stylistic/max-len'?: Linter.RuleEntry + /** + * Enforce a maximum number of statements allowed per line + * @see https://eslint.style/rules/max-statements-per-line + */ + '@stylistic/max-statements-per-line'?: Linter.RuleEntry + /** + * Require a specific member delimiter style for interfaces and type literals + * @see https://eslint.style/rules/member-delimiter-style + */ + '@stylistic/member-delimiter-style'?: Linter.RuleEntry + /** + * Enforce a particular style for multiline comments + * @see https://eslint.style/rules/multiline-comment-style + */ + '@stylistic/multiline-comment-style'?: Linter.RuleEntry + /** + * Enforce newlines between operands of ternary expressions + * @see https://eslint.style/rules/multiline-ternary + */ + '@stylistic/multiline-ternary'?: Linter.RuleEntry + /** + * Enforce or disallow parentheses when invoking a constructor with no arguments + * @see https://eslint.style/rules/new-parens + */ + '@stylistic/new-parens'?: Linter.RuleEntry + /** + * Require a newline after each call in a method chain + * @see https://eslint.style/rules/newline-per-chained-call + */ + '@stylistic/newline-per-chained-call'?: Linter.RuleEntry + /** + * Disallow arrow functions where they could be confused with comparisons + * @see https://eslint.style/rules/no-confusing-arrow + */ + '@stylistic/no-confusing-arrow'?: Linter.RuleEntry + /** + * Disallow unnecessary parentheses + * @see https://eslint.style/rules/no-extra-parens + */ + '@stylistic/no-extra-parens'?: Linter.RuleEntry + /** + * Disallow unnecessary semicolons + * @see https://eslint.style/rules/no-extra-semi + */ + '@stylistic/no-extra-semi'?: Linter.RuleEntry<[]> + /** + * Disallow leading or trailing decimal points in numeric literals + * @see https://eslint.style/rules/no-floating-decimal + */ + '@stylistic/no-floating-decimal'?: Linter.RuleEntry<[]> + /** + * Disallow mixed binary operators + * @see https://eslint.style/rules/no-mixed-operators + */ + '@stylistic/no-mixed-operators'?: Linter.RuleEntry + /** + * Disallow mixed spaces and tabs for indentation + * @see https://eslint.style/rules/no-mixed-spaces-and-tabs + */ + '@stylistic/no-mixed-spaces-and-tabs'?: Linter.RuleEntry + /** + * Disallow multiple spaces + * @see https://eslint.style/rules/no-multi-spaces + */ + '@stylistic/no-multi-spaces'?: Linter.RuleEntry + /** + * Disallow multiple empty lines + * @see https://eslint.style/rules/no-multiple-empty-lines + */ + '@stylistic/no-multiple-empty-lines'?: Linter.RuleEntry + /** + * Disallow all tabs + * @see https://eslint.style/rules/no-tabs + */ + '@stylistic/no-tabs'?: Linter.RuleEntry + /** + * Disallow trailing whitespace at the end of lines + * @see https://eslint.style/rules/no-trailing-spaces + */ + '@stylistic/no-trailing-spaces'?: Linter.RuleEntry + /** + * Disallow whitespace before properties + * @see https://eslint.style/rules/no-whitespace-before-property + */ + '@stylistic/no-whitespace-before-property'?: Linter.RuleEntry<[]> + /** + * Enforce the location of single-line statements + * @see https://eslint.style/rules/nonblock-statement-body-position + */ + '@stylistic/nonblock-statement-body-position'?: Linter.RuleEntry + /** + * Enforce consistent line breaks after opening and before closing braces + * @see https://eslint.style/rules/object-curly-newline + */ + '@stylistic/object-curly-newline'?: Linter.RuleEntry + /** + * Enforce consistent spacing inside braces + * @see https://eslint.style/rules/object-curly-spacing + */ + '@stylistic/object-curly-spacing'?: Linter.RuleEntry + /** + * Enforce placing object properties on separate lines + * @see https://eslint.style/rules/object-property-newline + */ + '@stylistic/object-property-newline'?: Linter.RuleEntry + /** + * Require or disallow newlines around variable declarations + * @see https://eslint.style/rules/one-var-declaration-per-line + */ + '@stylistic/one-var-declaration-per-line'?: Linter.RuleEntry + /** + * Enforce consistent linebreak style for operators + * @see https://eslint.style/rules/operator-linebreak + */ + '@stylistic/operator-linebreak'?: Linter.RuleEntry + /** + * Require or disallow padding within blocks + * @see https://eslint.style/rules/padded-blocks + */ + '@stylistic/padded-blocks'?: Linter.RuleEntry + /** + * Require or disallow padding lines between statements + * @see https://eslint.style/rules/padding-line-between-statements + */ + '@stylistic/padding-line-between-statements'?: Linter.RuleEntry + /** + * Require quotes around object literal, type literal, interfaces and enums property names + * @see https://eslint.style/rules/quote-props + */ + '@stylistic/quote-props'?: Linter.RuleEntry + /** + * Enforce the consistent use of either backticks, double, or single quotes + * @see https://eslint.style/rules/quotes + */ + '@stylistic/quotes'?: Linter.RuleEntry + /** + * Enforce spacing between rest and spread operators and their expressions + * @see https://eslint.style/rules/rest-spread-spacing + */ + '@stylistic/rest-spread-spacing'?: Linter.RuleEntry + /** + * Require or disallow semicolons instead of ASI + * @see https://eslint.style/rules/semi + */ + '@stylistic/semi'?: Linter.RuleEntry + /** + * Enforce consistent spacing before and after semicolons + * @see https://eslint.style/rules/semi-spacing + */ + '@stylistic/semi-spacing'?: Linter.RuleEntry + /** + * Enforce location of semicolons + * @see https://eslint.style/rules/semi-style + */ + '@stylistic/semi-style'?: Linter.RuleEntry + /** + * Enforce consistent spacing before blocks + * @see https://eslint.style/rules/space-before-blocks + */ + '@stylistic/space-before-blocks'?: Linter.RuleEntry + /** + * Enforce consistent spacing before function parenthesis + * @see https://eslint.style/rules/space-before-function-paren + */ + '@stylistic/space-before-function-paren'?: Linter.RuleEntry + /** + * Enforce consistent spacing inside parentheses + * @see https://eslint.style/rules/space-in-parens + */ + '@stylistic/space-in-parens'?: Linter.RuleEntry + /** + * Require spacing around infix operators + * @see https://eslint.style/rules/space-infix-ops + */ + '@stylistic/space-infix-ops'?: Linter.RuleEntry + /** + * Enforce consistent spacing before or after unary operators + * @see https://eslint.style/rules/space-unary-ops + */ + '@stylistic/space-unary-ops'?: Linter.RuleEntry + /** + * Enforce consistent spacing after the `//` or `/*` in a comment + * @see https://eslint.style/rules/spaced-comment + */ + '@stylistic/spaced-comment'?: Linter.RuleEntry + /** + * Enforce spacing around colons of switch statements + * @see https://eslint.style/rules/switch-colon-spacing + */ + '@stylistic/switch-colon-spacing'?: Linter.RuleEntry + /** + * Require or disallow spacing around embedded expressions of template strings + * @see https://eslint.style/rules/template-curly-spacing + */ + '@stylistic/template-curly-spacing'?: Linter.RuleEntry + /** + * Require or disallow spacing between template tags and their literals + * @see https://eslint.style/rules/template-tag-spacing + */ + '@stylistic/template-tag-spacing'?: Linter.RuleEntry + /** + * Require consistent spacing around type annotations + * @see https://eslint.style/rules/type-annotation-spacing + */ + '@stylistic/type-annotation-spacing'?: Linter.RuleEntry + /** + * Enforces consistent spacing inside TypeScript type generics + * @see https://eslint.style/rules/type-generic-spacing + */ + '@stylistic/type-generic-spacing'?: Linter.RuleEntry<[]> + /** + * Expect space before the type declaration in the named tuple + * @see https://eslint.style/rules/type-named-tuple-spacing + */ + '@stylistic/type-named-tuple-spacing'?: Linter.RuleEntry<[]> + /** + * Require parentheses around immediate `function` invocations + * @see https://eslint.style/rules/wrap-iife + */ + '@stylistic/wrap-iife'?: Linter.RuleEntry + /** + * Require parenthesis around regex literals + * @see https://eslint.style/rules/wrap-regex + */ + '@stylistic/wrap-regex'?: Linter.RuleEntry<[]> + /** + * Require or disallow spacing around the `*` in `yield*` expressions + * @see https://eslint.style/rules/yield-star-spacing + */ + '@stylistic/yield-star-spacing'?: Linter.RuleEntry + /** + * Require that function overload signatures be consecutive + * @see https://typescript-eslint.io/rules/adjacent-overload-signatures + */ + '@typescript-eslint/adjacent-overload-signatures'?: Linter.RuleEntry<[]> + /** + * Require consistently using either `T[]` or `Array` for arrays + * @see https://typescript-eslint.io/rules/array-type + */ + '@typescript-eslint/array-type'?: Linter.RuleEntry + /** + * Disallow awaiting a value that is not a Thenable + * @see https://typescript-eslint.io/rules/await-thenable + */ + '@typescript-eslint/await-thenable'?: Linter.RuleEntry<[]> + /** + * Disallow `@ts-` comments or require descriptions after directives + * @see https://typescript-eslint.io/rules/ban-ts-comment + */ + '@typescript-eslint/ban-ts-comment'?: Linter.RuleEntry + /** + * Disallow `// tslint:` comments + * @see https://typescript-eslint.io/rules/ban-tslint-comment + */ + '@typescript-eslint/ban-tslint-comment'?: Linter.RuleEntry<[]> + /** + * Enforce that literals on classes are exposed in a consistent style + * @see https://typescript-eslint.io/rules/class-literal-property-style + */ + '@typescript-eslint/class-literal-property-style'?: Linter.RuleEntry + /** + * Enforce that class methods utilize `this` + * @see https://typescript-eslint.io/rules/class-methods-use-this + */ + '@typescript-eslint/class-methods-use-this'?: 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 + */ + '@typescript-eslint/consistent-generic-constructors'?: Linter.RuleEntry + /** + * Require or disallow the `Record` type + * @see https://typescript-eslint.io/rules/consistent-indexed-object-style + */ + '@typescript-eslint/consistent-indexed-object-style'?: Linter.RuleEntry + /** + * Require `return` statements to either always or never specify values + * @see https://typescript-eslint.io/rules/consistent-return + */ + '@typescript-eslint/consistent-return'?: Linter.RuleEntry + /** + * Enforce consistent usage of type assertions + * @see https://typescript-eslint.io/rules/consistent-type-assertions + */ + '@typescript-eslint/consistent-type-assertions'?: Linter.RuleEntry + /** + * Enforce type definitions to consistently use either `interface` or `type` + * @see https://typescript-eslint.io/rules/consistent-type-definitions + */ + '@typescript-eslint/consistent-type-definitions'?: Linter.RuleEntry + /** + * Enforce consistent usage of type exports + * @see https://typescript-eslint.io/rules/consistent-type-exports + */ + '@typescript-eslint/consistent-type-exports'?: Linter.RuleEntry + /** + * Enforce consistent usage of type imports + * @see https://typescript-eslint.io/rules/consistent-type-imports + */ + '@typescript-eslint/consistent-type-imports'?: Linter.RuleEntry + /** + * Enforce default parameters to be last + * @see https://typescript-eslint.io/rules/default-param-last + */ + '@typescript-eslint/default-param-last'?: Linter.RuleEntry<[]> + /** + * Enforce dot notation whenever possible + * @see https://typescript-eslint.io/rules/dot-notation + */ + '@typescript-eslint/dot-notation'?: Linter.RuleEntry + /** + * Require explicit return types on functions and class methods + * @see https://typescript-eslint.io/rules/explicit-function-return-type + */ + '@typescript-eslint/explicit-function-return-type'?: Linter.RuleEntry + /** + * Require explicit accessibility modifiers on class properties and methods + * @see https://typescript-eslint.io/rules/explicit-member-accessibility + */ + '@typescript-eslint/explicit-member-accessibility'?: 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 + */ + '@typescript-eslint/explicit-module-boundary-types'?: Linter.RuleEntry + /** + * Require or disallow initialization in variable declarations + * @see https://typescript-eslint.io/rules/init-declarations + */ + '@typescript-eslint/init-declarations'?: Linter.RuleEntry + /** + * Enforce a maximum number of parameters in function definitions + * @see https://typescript-eslint.io/rules/max-params + */ + '@typescript-eslint/max-params'?: Linter.RuleEntry + /** + * Require a consistent member declaration order + * @see https://typescript-eslint.io/rules/member-ordering + */ + '@typescript-eslint/member-ordering'?: Linter.RuleEntry + /** + * Enforce using a particular method signature syntax + * @see https://typescript-eslint.io/rules/method-signature-style + */ + '@typescript-eslint/method-signature-style'?: Linter.RuleEntry + /** + * Enforce naming conventions for everything across a codebase + * @see https://typescript-eslint.io/rules/naming-convention + */ + '@typescript-eslint/naming-convention'?: Linter.RuleEntry + /** + * Disallow generic `Array` constructors + * @see https://typescript-eslint.io/rules/no-array-constructor + */ + '@typescript-eslint/no-array-constructor'?: Linter.RuleEntry<[]> + /** + * Disallow using the `delete` operator on array values + * @see https://typescript-eslint.io/rules/no-array-delete + */ + '@typescript-eslint/no-array-delete'?: 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 + */ + '@typescript-eslint/no-base-to-string'?: Linter.RuleEntry + /** + * Disallow non-null assertion in locations that may be confusing + * @see https://typescript-eslint.io/rules/no-confusing-non-null-assertion + */ + '@typescript-eslint/no-confusing-non-null-assertion'?: Linter.RuleEntry<[]> + /** + * Require expressions of type void to appear in statement position + * @see https://typescript-eslint.io/rules/no-confusing-void-expression + */ + '@typescript-eslint/no-confusing-void-expression'?: Linter.RuleEntry + /** + * Disallow using code marked as `@deprecated` + * @see https://typescript-eslint.io/rules/no-deprecated + */ + '@typescript-eslint/no-deprecated'?: Linter.RuleEntry + /** + * Disallow duplicate class members + * @see https://typescript-eslint.io/rules/no-dupe-class-members + */ + '@typescript-eslint/no-dupe-class-members'?: Linter.RuleEntry<[]> + /** + * Disallow duplicate enum member values + * @see https://typescript-eslint.io/rules/no-duplicate-enum-values + */ + '@typescript-eslint/no-duplicate-enum-values'?: Linter.RuleEntry<[]> + /** + * Disallow duplicate constituents of union or intersection types + * @see https://typescript-eslint.io/rules/no-duplicate-type-constituents + */ + '@typescript-eslint/no-duplicate-type-constituents'?: Linter.RuleEntry + /** + * Disallow using the `delete` operator on computed key expressions + * @see https://typescript-eslint.io/rules/no-dynamic-delete + */ + '@typescript-eslint/no-dynamic-delete'?: Linter.RuleEntry<[]> + /** + * Disallow empty functions + * @see https://typescript-eslint.io/rules/no-empty-function + */ + '@typescript-eslint/no-empty-function'?: Linter.RuleEntry + /** + * Disallow the declaration of empty interfaces + * @see https://typescript-eslint.io/rules/no-empty-interface + * @deprecated + */ + '@typescript-eslint/no-empty-interface'?: Linter.RuleEntry + /** + * Disallow accidentally using the "empty object" type + * @see https://typescript-eslint.io/rules/no-empty-object-type + */ + '@typescript-eslint/no-empty-object-type'?: Linter.RuleEntry + /** + * Disallow the `any` type + * @see https://typescript-eslint.io/rules/no-explicit-any + */ + '@typescript-eslint/no-explicit-any'?: Linter.RuleEntry + /** + * Disallow extra non-null assertions + * @see https://typescript-eslint.io/rules/no-extra-non-null-assertion + */ + '@typescript-eslint/no-extra-non-null-assertion'?: Linter.RuleEntry<[]> + /** + * Disallow classes used as namespaces + * @see https://typescript-eslint.io/rules/no-extraneous-class + */ + '@typescript-eslint/no-extraneous-class'?: Linter.RuleEntry + /** + * Require Promise-like statements to be handled appropriately + * @see https://typescript-eslint.io/rules/no-floating-promises + */ + '@typescript-eslint/no-floating-promises'?: Linter.RuleEntry + /** + * Disallow iterating over an array with a for-in loop + * @see https://typescript-eslint.io/rules/no-for-in-array + */ + '@typescript-eslint/no-for-in-array'?: Linter.RuleEntry<[]> + /** + * Disallow the use of `eval()`-like functions + * @see https://typescript-eslint.io/rules/no-implied-eval + */ + '@typescript-eslint/no-implied-eval'?: 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 + */ + '@typescript-eslint/no-import-type-side-effects'?: 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 + */ + '@typescript-eslint/no-inferrable-types'?: Linter.RuleEntry + /** + * Disallow `this` keywords outside of classes or class-like objects + * @see https://typescript-eslint.io/rules/no-invalid-this + */ + '@typescript-eslint/no-invalid-this'?: Linter.RuleEntry + /** + * Disallow `void` type outside of generic or return types + * @see https://typescript-eslint.io/rules/no-invalid-void-type + */ + '@typescript-eslint/no-invalid-void-type'?: Linter.RuleEntry + /** + * Disallow function declarations that contain unsafe references inside loop statements + * @see https://typescript-eslint.io/rules/no-loop-func + */ + '@typescript-eslint/no-loop-func'?: Linter.RuleEntry<[]> + /** + * Disallow literal numbers that lose precision + * @see https://typescript-eslint.io/rules/no-loss-of-precision + * @deprecated + */ + '@typescript-eslint/no-loss-of-precision'?: Linter.RuleEntry<[]> + /** + * Disallow magic numbers + * @see https://typescript-eslint.io/rules/no-magic-numbers + */ + '@typescript-eslint/no-magic-numbers'?: Linter.RuleEntry + /** + * Disallow the `void` operator except when used to discard a value + * @see https://typescript-eslint.io/rules/no-meaningless-void-operator + */ + '@typescript-eslint/no-meaningless-void-operator'?: Linter.RuleEntry + /** + * Enforce valid definition of `new` and `constructor` + * @see https://typescript-eslint.io/rules/no-misused-new + */ + '@typescript-eslint/no-misused-new'?: Linter.RuleEntry<[]> + /** + * Disallow Promises in places not designed to handle them + * @see https://typescript-eslint.io/rules/no-misused-promises + */ + '@typescript-eslint/no-misused-promises'?: Linter.RuleEntry + /** + * Disallow using the spread operator when it might cause unexpected behavior + * @see https://typescript-eslint.io/rules/no-misused-spread + */ + '@typescript-eslint/no-misused-spread'?: Linter.RuleEntry + /** + * Disallow enums from having both number and string members + * @see https://typescript-eslint.io/rules/no-mixed-enums + */ + '@typescript-eslint/no-mixed-enums'?: Linter.RuleEntry<[]> + /** + * Disallow TypeScript namespaces + * @see https://typescript-eslint.io/rules/no-namespace + */ + '@typescript-eslint/no-namespace'?: Linter.RuleEntry + /** + * 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 + */ + '@typescript-eslint/no-non-null-asserted-nullish-coalescing'?: Linter.RuleEntry<[]> + /** + * Disallow non-null assertions after an optional chain expression + * @see https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain + */ + '@typescript-eslint/no-non-null-asserted-optional-chain'?: Linter.RuleEntry<[]> + /** + * Disallow non-null assertions using the `!` postfix operator + * @see https://typescript-eslint.io/rules/no-non-null-assertion + */ + '@typescript-eslint/no-non-null-assertion'?: Linter.RuleEntry<[]> + /** + * Disallow variable redeclaration + * @see https://typescript-eslint.io/rules/no-redeclare + */ + '@typescript-eslint/no-redeclare'?: Linter.RuleEntry + /** + * Disallow members of unions and intersections that do nothing or override type information + * @see https://typescript-eslint.io/rules/no-redundant-type-constituents + */ + '@typescript-eslint/no-redundant-type-constituents'?: Linter.RuleEntry<[]> + /** + * Disallow invocation of `require()` + * @see https://typescript-eslint.io/rules/no-require-imports + */ + '@typescript-eslint/no-require-imports'?: Linter.RuleEntry + /** + * Disallow specified modules when loaded by `import` + * @see https://typescript-eslint.io/rules/no-restricted-imports + */ + '@typescript-eslint/no-restricted-imports'?: Linter.RuleEntry + /** + * Disallow certain types + * @see https://typescript-eslint.io/rules/no-restricted-types + */ + '@typescript-eslint/no-restricted-types'?: 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 + /** + * Disallow aliasing `this` + * @see https://typescript-eslint.io/rules/no-this-alias + */ + '@typescript-eslint/no-this-alias'?: Linter.RuleEntry + /** + * Disallow type aliases + * @see https://typescript-eslint.io/rules/no-type-alias + * @deprecated + */ + '@typescript-eslint/no-type-alias'?: Linter.RuleEntry + /** + * Disallow unnecessary equality comparisons against boolean literals + * @see https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare + */ + '@typescript-eslint/no-unnecessary-boolean-literal-compare'?: Linter.RuleEntry + /** + * Disallow conditionals where the type is always truthy or always falsy + * @see https://typescript-eslint.io/rules/no-unnecessary-condition + */ + '@typescript-eslint/no-unnecessary-condition'?: Linter.RuleEntry + /** + * Disallow unnecessary assignment of constructor property parameter + * @see https://typescript-eslint.io/rules/no-unnecessary-parameter-property-assignment + */ + '@typescript-eslint/no-unnecessary-parameter-property-assignment'?: Linter.RuleEntry<[]> + /** + * Disallow unnecessary namespace qualifiers + * @see https://typescript-eslint.io/rules/no-unnecessary-qualifier + */ + '@typescript-eslint/no-unnecessary-qualifier'?: Linter.RuleEntry<[]> + /** + * Disallow unnecessary template expressions + * @see https://typescript-eslint.io/rules/no-unnecessary-template-expression + */ + '@typescript-eslint/no-unnecessary-template-expression'?: Linter.RuleEntry<[]> + /** + * Disallow type arguments that are equal to the default + * @see https://typescript-eslint.io/rules/no-unnecessary-type-arguments + */ + '@typescript-eslint/no-unnecessary-type-arguments'?: Linter.RuleEntry<[]> + /** + * Disallow type assertions that do not change the type of an expression + * @see https://typescript-eslint.io/rules/no-unnecessary-type-assertion + */ + '@typescript-eslint/no-unnecessary-type-assertion'?: Linter.RuleEntry + /** + * Disallow unnecessary constraints on generic types + * @see https://typescript-eslint.io/rules/no-unnecessary-type-constraint + */ + '@typescript-eslint/no-unnecessary-type-constraint'?: Linter.RuleEntry<[]> + /** + * 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 + */ + '@typescript-eslint/no-unnecessary-type-conversion'?: Linter.RuleEntry<[]> + /** + * Disallow type parameters that aren't used multiple times + * @see https://typescript-eslint.io/rules/no-unnecessary-type-parameters + */ + '@typescript-eslint/no-unnecessary-type-parameters'?: Linter.RuleEntry<[]> + /** + * Disallow calling a function with a value with type `any` + * @see https://typescript-eslint.io/rules/no-unsafe-argument + */ + '@typescript-eslint/no-unsafe-argument'?: Linter.RuleEntry<[]> + /** + * Disallow assigning a value with type `any` to variables and properties + * @see https://typescript-eslint.io/rules/no-unsafe-assignment + */ + '@typescript-eslint/no-unsafe-assignment'?: Linter.RuleEntry<[]> + /** + * Disallow calling a value with type `any` + * @see https://typescript-eslint.io/rules/no-unsafe-call + */ + '@typescript-eslint/no-unsafe-call'?: Linter.RuleEntry<[]> + /** + * Disallow unsafe declaration merging + * @see https://typescript-eslint.io/rules/no-unsafe-declaration-merging + */ + '@typescript-eslint/no-unsafe-declaration-merging'?: Linter.RuleEntry<[]> + /** + * Disallow comparing an enum value with a non-enum value + * @see https://typescript-eslint.io/rules/no-unsafe-enum-comparison + */ + '@typescript-eslint/no-unsafe-enum-comparison'?: Linter.RuleEntry<[]> + /** + * Disallow using the unsafe built-in Function type + * @see https://typescript-eslint.io/rules/no-unsafe-function-type + */ + '@typescript-eslint/no-unsafe-function-type'?: Linter.RuleEntry<[]> + /** + * Disallow member access on a value with type `any` + * @see https://typescript-eslint.io/rules/no-unsafe-member-access + */ + '@typescript-eslint/no-unsafe-member-access'?: Linter.RuleEntry + /** + * Disallow returning a value with type `any` from a function + * @see https://typescript-eslint.io/rules/no-unsafe-return + */ + '@typescript-eslint/no-unsafe-return'?: Linter.RuleEntry<[]> + /** + * Disallow type assertions that narrow a type + * @see https://typescript-eslint.io/rules/no-unsafe-type-assertion + */ + '@typescript-eslint/no-unsafe-type-assertion'?: Linter.RuleEntry<[]> + /** + * Require unary negation to take a number + * @see https://typescript-eslint.io/rules/no-unsafe-unary-minus + */ + '@typescript-eslint/no-unsafe-unary-minus'?: Linter.RuleEntry<[]> + /** + * Disallow unused expressions + * @see https://typescript-eslint.io/rules/no-unused-expressions + */ + '@typescript-eslint/no-unused-expressions'?: Linter.RuleEntry + /** + * Disallow unused private class members + * @see https://typescript-eslint.io/rules/no-unused-private-class-members + */ + '@typescript-eslint/no-unused-private-class-members'?: Linter.RuleEntry<[]> + /** + * Disallow unused variables + * @see https://typescript-eslint.io/rules/no-unused-vars + */ + '@typescript-eslint/no-unused-vars'?: Linter.RuleEntry + /** + * Disallow the use of variables before they are defined + * @see https://typescript-eslint.io/rules/no-use-before-define + */ + '@typescript-eslint/no-use-before-define'?: Linter.RuleEntry + /** + * Disallow unnecessary constructors + * @see https://typescript-eslint.io/rules/no-useless-constructor + */ + '@typescript-eslint/no-useless-constructor'?: Linter.RuleEntry<[]> + /** + * Disallow default values that will never be used + * @see https://typescript-eslint.io/rules/no-useless-default-assignment + */ + '@typescript-eslint/no-useless-default-assignment'?: Linter.RuleEntry + /** + * Disallow empty exports that don't change anything in a module file + * @see https://typescript-eslint.io/rules/no-useless-empty-export + */ + '@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 + */ + '@typescript-eslint/no-var-requires'?: Linter.RuleEntry + /** + * Disallow using confusing built-in primitive class wrappers + * @see https://typescript-eslint.io/rules/no-wrapper-object-types + */ + '@typescript-eslint/no-wrapper-object-types'?: Linter.RuleEntry<[]> + /** + * Enforce non-null assertions over explicit type assertions + * @see https://typescript-eslint.io/rules/non-nullable-type-assertion-style + */ + '@typescript-eslint/non-nullable-type-assertion-style'?: Linter.RuleEntry<[]> + /** + * Disallow throwing non-`Error` values as exceptions + * @see https://typescript-eslint.io/rules/only-throw-error + */ + '@typescript-eslint/only-throw-error'?: Linter.RuleEntry + /** + * Require or disallow parameter properties in class constructors + * @see https://typescript-eslint.io/rules/parameter-properties + */ + '@typescript-eslint/parameter-properties'?: Linter.RuleEntry + /** + * Enforce the use of `as const` over literal type + * @see https://typescript-eslint.io/rules/prefer-as-const + */ + '@typescript-eslint/prefer-as-const'?: Linter.RuleEntry<[]> + /** + * Require destructuring from arrays and/or objects + * @see https://typescript-eslint.io/rules/prefer-destructuring + */ + '@typescript-eslint/prefer-destructuring'?: Linter.RuleEntry + /** + * Require each enum member value to be explicitly initialized + * @see https://typescript-eslint.io/rules/prefer-enum-initializers + */ + '@typescript-eslint/prefer-enum-initializers'?: Linter.RuleEntry<[]> + /** + * 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 + */ + '@typescript-eslint/prefer-find'?: Linter.RuleEntry<[]> + /** + * Enforce the use of `for-of` loop over the standard `for` loop where possible + * @see https://typescript-eslint.io/rules/prefer-for-of + */ + '@typescript-eslint/prefer-for-of'?: Linter.RuleEntry<[]> + /** + * 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 + /** + * 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 + /** + * 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 + /** + * 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 + /** + * 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 + /** + * 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 + /** + * 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 + /** + * Enforce using `@ts-expect-error` over `@ts-ignore` + * @see https://typescript-eslint.io/rules/prefer-ts-expect-error + * @deprecated + */ + '@typescript-eslint/prefer-ts-expect-error'?: Linter.RuleEntry<[]> + /** + * Require any function or method that returns a Promise to be marked async + * @see https://typescript-eslint.io/rules/promise-function-async + */ + '@typescript-eslint/promise-function-async'?: Linter.RuleEntry + /** + * Enforce that `get()` types should be assignable to their equivalent `set()` type + * @see https://typescript-eslint.io/rules/related-getter-setter-pairs + */ + '@typescript-eslint/related-getter-setter-pairs'?: Linter.RuleEntry<[]> + /** + * Require `Array#sort` and `Array#toSorted` calls to always provide a `compareFunction` + * @see https://typescript-eslint.io/rules/require-array-sort-compare + */ + '@typescript-eslint/require-array-sort-compare'?: Linter.RuleEntry + /** + * Disallow async functions which do not return promises and have no `await` expression + * @see https://typescript-eslint.io/rules/require-await + */ + '@typescript-eslint/require-await'?: Linter.RuleEntry<[]> + /** + * 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 + */ + '@typescript-eslint/restrict-plus-operands'?: Linter.RuleEntry + /** + * Enforce template literal expressions to be of `string` type + * @see https://typescript-eslint.io/rules/restrict-template-expressions + */ + '@typescript-eslint/restrict-template-expressions'?: Linter.RuleEntry + /** + * Enforce consistent awaiting of returned promises + * @see https://typescript-eslint.io/rules/return-await + */ + '@typescript-eslint/return-await'?: Linter.RuleEntry + /** + * Enforce constituents of a type union/intersection to be sorted alphabetically + * @see https://typescript-eslint.io/rules/sort-type-constituents + * @deprecated + */ + '@typescript-eslint/sort-type-constituents'?: Linter.RuleEntry + /** + * Disallow certain types in boolean expressions + * @see https://typescript-eslint.io/rules/strict-boolean-expressions + */ + '@typescript-eslint/strict-boolean-expressions'?: Linter.RuleEntry + /** + * Disallow passing a value-returning function in a position accepting a void function + * @see https://typescript-eslint.io/rules/strict-void-return + */ + '@typescript-eslint/strict-void-return'?: Linter.RuleEntry + /** + * Require switch-case statements to be exhaustive + * @see https://typescript-eslint.io/rules/switch-exhaustiveness-check + */ + '@typescript-eslint/switch-exhaustiveness-check'?: Linter.RuleEntry + /** + * 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 + /** + * Require type annotations in certain places + * @see https://typescript-eslint.io/rules/typedef + * @deprecated + */ + '@typescript-eslint/typedef'?: Linter.RuleEntry + /** + * Enforce unbound methods are called with their expected scope + * @see https://typescript-eslint.io/rules/unbound-method + */ + '@typescript-eslint/unbound-method'?: Linter.RuleEntry + /** + * 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 + */ + '@typescript-eslint/unified-signatures'?: Linter.RuleEntry + /** + * Enforce typing arguments in Promise rejection callbacks as `unknown` + * @see https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable + */ + '@typescript-eslint/use-unknown-in-catch-callback-variable'?: Linter.RuleEntry<[]> + /** + * Enforce getter and setter pairs in objects and classes + * @see https://eslint.org/docs/latest/rules/accessor-pairs + */ + 'accessor-pairs'?: Linter.RuleEntry + /** + * 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 + /** + * Enforce consistent spacing inside array brackets + * @see https://eslint.org/docs/latest/rules/array-bracket-spacing + * @deprecated + */ + 'array-bracket-spacing'?: Linter.RuleEntry + /** + * Enforce `return` statements in callbacks of array methods + * @see https://eslint.org/docs/latest/rules/array-callback-return + */ + 'array-callback-return'?: Linter.RuleEntry + /** + * Enforce line breaks after each array element + * @see https://eslint.org/docs/latest/rules/array-element-newline + * @deprecated + */ + 'array-element-newline'?: Linter.RuleEntry + /** + * Require braces around arrow function bodies + * @see https://eslint.org/docs/latest/rules/arrow-body-style + */ + 'arrow-body-style'?: Linter.RuleEntry + /** + * Require parentheses around arrow function arguments + * @see https://eslint.org/docs/latest/rules/arrow-parens + * @deprecated + */ + 'arrow-parens'?: Linter.RuleEntry + /** + * Enforce consistent spacing before and after the arrow in arrow functions + * @see https://eslint.org/docs/latest/rules/arrow-spacing + * @deprecated + */ + 'arrow-spacing'?: Linter.RuleEntry + /** + * Enforce the use of variables within the scope they are defined + * @see https://eslint.org/docs/latest/rules/block-scoped-var + */ + 'block-scoped-var'?: Linter.RuleEntry<[]> + /** + * Disallow or enforce spaces inside of blocks after opening block and before closing block + * @see https://eslint.org/docs/latest/rules/block-spacing + * @deprecated + */ + 'block-spacing'?: Linter.RuleEntry + /** + * Enforce consistent brace style for blocks + * @see https://eslint.org/docs/latest/rules/brace-style + * @deprecated + */ + 'brace-style'?: Linter.RuleEntry + /** + * Require `return` statements after callbacks + * @see https://eslint.org/docs/latest/rules/callback-return + * @deprecated + */ + 'callback-return'?: Linter.RuleEntry + /** + * Enforce camelcase naming convention + * @see https://eslint.org/docs/latest/rules/camelcase + */ + 'camelcase'?: Linter.RuleEntry + /** + * Enforce or disallow capitalization of the first letter of a comment + * @see https://eslint.org/docs/latest/rules/capitalized-comments + */ + 'capitalized-comments'?: Linter.RuleEntry + /** + * Enforce that class methods utilize `this` + * @see https://eslint.org/docs/latest/rules/class-methods-use-this + */ + 'class-methods-use-this'?: Linter.RuleEntry + /** + * Require or disallow trailing commas + * @see https://eslint.org/docs/latest/rules/comma-dangle + * @deprecated + */ + 'comma-dangle'?: Linter.RuleEntry + /** + * Enforce consistent spacing before and after commas + * @see https://eslint.org/docs/latest/rules/comma-spacing + * @deprecated + */ + 'comma-spacing'?: Linter.RuleEntry + /** + * Enforce consistent comma style + * @see https://eslint.org/docs/latest/rules/comma-style + * @deprecated + */ + 'comma-style'?: Linter.RuleEntry + /** + * Enforce a maximum cyclomatic complexity allowed in a program + * @see https://eslint.org/docs/latest/rules/complexity + */ + 'complexity'?: Linter.RuleEntry + /** + * Enforce consistent spacing inside computed property brackets + * @see https://eslint.org/docs/latest/rules/computed-property-spacing + * @deprecated + */ + 'computed-property-spacing'?: Linter.RuleEntry + /** + * Require `return` statements to either always or never specify values + * @see https://eslint.org/docs/latest/rules/consistent-return + */ + 'consistent-return'?: Linter.RuleEntry + /** + * Enforce consistent naming when capturing the current execution context + * @see https://eslint.org/docs/latest/rules/consistent-this + */ + 'consistent-this'?: Linter.RuleEntry + /** + * Require `super()` calls in constructors + * @see https://eslint.org/docs/latest/rules/constructor-super + */ + 'constructor-super'?: Linter.RuleEntry<[]> + /** + * Enforce consistent brace style for all control statements + * @see https://eslint.org/docs/latest/rules/curly + */ + 'curly'?: Linter.RuleEntry + /** + * Require `default` cases in `switch` statements + * @see https://eslint.org/docs/latest/rules/default-case + */ + 'default-case'?: Linter.RuleEntry + /** + * Enforce `default` clauses in `switch` statements to be last + * @see https://eslint.org/docs/latest/rules/default-case-last + */ + 'default-case-last'?: Linter.RuleEntry<[]> + /** + * Enforce default parameters to be last + * @see https://eslint.org/docs/latest/rules/default-param-last + */ + 'default-param-last'?: Linter.RuleEntry<[]> + /** + * Enforce consistent newlines before and after dots + * @see https://eslint.org/docs/latest/rules/dot-location + * @deprecated + */ + 'dot-location'?: Linter.RuleEntry + /** + * Enforce dot notation whenever possible + * @see https://eslint.org/docs/latest/rules/dot-notation + */ + 'dot-notation'?: Linter.RuleEntry + /** + * Require or disallow newline at the end of files + * @see https://eslint.org/docs/latest/rules/eol-last + * @deprecated + */ + 'eol-last'?: Linter.RuleEntry + /** + * Require the use of `===` and `!==` + * @see https://eslint.org/docs/latest/rules/eqeqeq + */ + 'eqeqeq'?: Linter.RuleEntry + /** + * Enforce `for` loop update clause moving the counter in the right direction + * @see https://eslint.org/docs/latest/rules/for-direction + */ + 'for-direction'?: Linter.RuleEntry<[]> + /** + * Require or disallow spacing between function identifiers and their invocations + * @see https://eslint.org/docs/latest/rules/func-call-spacing + * @deprecated + */ + 'func-call-spacing'?: Linter.RuleEntry + /** + * 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 + */ + 'func-name-matching'?: Linter.RuleEntry + /** + * Require or disallow named `function` expressions + * @see https://eslint.org/docs/latest/rules/func-names + */ + 'func-names'?: Linter.RuleEntry + /** + * Enforce the consistent use of either `function` declarations or expressions assigned to variables + * @see https://eslint.org/docs/latest/rules/func-style + */ + 'func-style'?: Linter.RuleEntry + /** + * Enforce line breaks between arguments of a function call + * @see https://eslint.org/docs/latest/rules/function-call-argument-newline + * @deprecated + */ + 'function-call-argument-newline'?: Linter.RuleEntry + /** + * Enforce consistent line breaks inside function parentheses + * @see https://eslint.org/docs/latest/rules/function-paren-newline + * @deprecated + */ + 'function-paren-newline'?: Linter.RuleEntry + /** + * Enforce consistent spacing around `*` operators in generator functions + * @see https://eslint.org/docs/latest/rules/generator-star-spacing + * @deprecated + */ + 'generator-star-spacing'?: Linter.RuleEntry + /** + * Enforce `return` statements in getters + * @see https://eslint.org/docs/latest/rules/getter-return + */ + 'getter-return'?: Linter.RuleEntry + /** + * Require `require()` calls to be placed at top-level module scope + * @see https://eslint.org/docs/latest/rules/global-require + * @deprecated + */ + 'global-require'?: Linter.RuleEntry<[]> + /** + * Require grouped accessor pairs in object literals and classes + * @see https://eslint.org/docs/latest/rules/grouped-accessor-pairs + */ + 'grouped-accessor-pairs'?: Linter.RuleEntry + /** + * Require `for-in` loops to include an `if` statement + * @see https://eslint.org/docs/latest/rules/guard-for-in + */ + 'guard-for-in'?: Linter.RuleEntry<[]> + /** + * Require error handling in callbacks + * @see https://eslint.org/docs/latest/rules/handle-callback-err + * @deprecated + */ + 'handle-callback-err'?: Linter.RuleEntry + /** + * Disallow specified identifiers + * @see https://eslint.org/docs/latest/rules/id-blacklist + * @deprecated + */ + 'id-blacklist'?: Linter.RuleEntry + /** + * Disallow specified identifiers + * @see https://eslint.org/docs/latest/rules/id-denylist + */ + 'id-denylist'?: Linter.RuleEntry + /** + * Enforce minimum and maximum identifier lengths + * @see https://eslint.org/docs/latest/rules/id-length + */ + 'id-length'?: Linter.RuleEntry + /** + * Require identifiers to match a specified regular expression + * @see https://eslint.org/docs/latest/rules/id-match + */ + 'id-match'?: Linter.RuleEntry + /** + * Enforce the location of arrow function bodies + * @see https://eslint.org/docs/latest/rules/implicit-arrow-linebreak + * @deprecated + */ + 'implicit-arrow-linebreak'?: 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.1/docs/rules/consistent-type-specifier-style.md + */ + 'import-x/consistent-type-specifier-style'?: Linter.RuleEntry + /** + * Ensure a default export is present, given a default import. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/default.md + */ + 'import-x/default'?: 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.1/docs/rules/dynamic-import-chunkname.md + */ + 'import-x/dynamic-import-chunkname'?: Linter.RuleEntry + /** + * 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.1/docs/rules/export.md + */ + 'import-x/export'?: Linter.RuleEntry<[]> + /** + * Ensure all exports appear after other statements. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/exports-last.md + */ + 'import-x/exports-last'?: Linter.RuleEntry<[]> + /** + * Ensure consistent use of file extension within the import path. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/extensions.md + */ + 'import-x/extensions'?: Linter.RuleEntry + /** + * Ensure all imports appear before other statements. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/first.md + */ + 'import-x/first'?: Linter.RuleEntry + /** + * 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.1/docs/rules/group-exports.md + */ + 'import-x/group-exports'?: Linter.RuleEntry<[]> + /** + * Replaced by `import-x/first`. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/imports-first.md + * @deprecated + */ + 'import-x/imports-first'?: Linter.RuleEntry + /** + * Enforce the maximum number of dependencies a module can have. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/max-dependencies.md + */ + 'import-x/max-dependencies'?: Linter.RuleEntry + /** + * 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.1/docs/rules/named.md + */ + 'import-x/named'?: Linter.RuleEntry + /** + * Ensure imported namespaces contain dereferenced properties as they are dereferenced. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/namespace.md + */ + 'import-x/namespace'?: Linter.RuleEntry + /** + * Enforce a newline after import statements. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/newline-after-import.md + */ + 'import-x/newline-after-import'?: Linter.RuleEntry + /** + * Forbid import of modules using absolute paths. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-absolute-path.md + */ + 'import-x/no-absolute-path'?: Linter.RuleEntry + /** + * Forbid AMD `require` and `define` calls. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-amd.md + */ + 'import-x/no-amd'?: Linter.RuleEntry<[]> + /** + * Forbid anonymous values as default exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-anonymous-default-export.md + */ + 'import-x/no-anonymous-default-export'?: Linter.RuleEntry + /** + * Forbid CommonJS `require` calls and `module.exports` or `exports.*`. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-commonjs.md + */ + 'import-x/no-commonjs'?: Linter.RuleEntry + /** + * 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.1/docs/rules/no-cycle.md + */ + 'import-x/no-cycle'?: Linter.RuleEntry + /** + * Forbid default exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-default-export.md + */ + 'import-x/no-default-export'?: Linter.RuleEntry<[]> + /** + * Forbid imported names marked with `@deprecated` documentation tag. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-deprecated.md + */ + 'import-x/no-deprecated'?: Linter.RuleEntry<[]> + /** + * Forbid repeated import of the same module in multiple places. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-duplicates.md + */ + 'import-x/no-duplicates'?: Linter.RuleEntry + /** + * Forbid `require()` calls with expressions. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-dynamic-require.md + */ + 'import-x/no-dynamic-require'?: Linter.RuleEntry + /** + * Forbid empty named import blocks. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-empty-named-blocks.md + */ + 'import-x/no-empty-named-blocks'?: Linter.RuleEntry<[]> + /** + * Forbid the use of extraneous packages. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-extraneous-dependencies.md + */ + 'import-x/no-extraneous-dependencies'?: Linter.RuleEntry + /** + * Forbid import statements with CommonJS module.exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-import-module-exports.md + */ + 'import-x/no-import-module-exports'?: Linter.RuleEntry + /** + * Forbid importing the submodules of other modules. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-internal-modules.md + */ + 'import-x/no-internal-modules'?: Linter.RuleEntry + /** + * Forbid the use of mutable exports with `var` or `let`. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-mutable-exports.md + */ + 'import-x/no-mutable-exports'?: Linter.RuleEntry<[]> + /** + * Forbid use of exported name as identifier of default export. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-as-default.md + */ + 'import-x/no-named-as-default'?: Linter.RuleEntry<[]> + /** + * Forbid use of exported name as property of default export. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-as-default-member.md + */ + 'import-x/no-named-as-default-member'?: Linter.RuleEntry<[]> + /** + * Forbid named default exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-default.md + */ + 'import-x/no-named-default'?: Linter.RuleEntry<[]> + /** + * Forbid named exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-export.md + */ + 'import-x/no-named-export'?: Linter.RuleEntry<[]> + /** + * Forbid namespace (a.k.a. "wildcard" `*`) imports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-namespace.md + */ + 'import-x/no-namespace'?: Linter.RuleEntry + /** + * Forbid Node.js builtin modules. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-nodejs-modules.md + */ + 'import-x/no-nodejs-modules'?: Linter.RuleEntry + /** + * Forbid importing packages through relative paths. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-relative-packages.md + */ + 'import-x/no-relative-packages'?: Linter.RuleEntry + /** + * Forbid importing modules from parent directories. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-relative-parent-imports.md + */ + 'import-x/no-relative-parent-imports'?: Linter.RuleEntry + /** + * Forbid importing a default export by a different name. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-rename-default.md + */ + 'import-x/no-rename-default'?: Linter.RuleEntry + /** + * Enforce which files can be imported in a given folder. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-restricted-paths.md + */ + 'import-x/no-restricted-paths'?: Linter.RuleEntry + /** + * Forbid a module from importing itself. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-self-import.md + */ + 'import-x/no-self-import'?: Linter.RuleEntry<[]> + /** + * Forbid unassigned imports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-unassigned-import.md + */ + 'import-x/no-unassigned-import'?: Linter.RuleEntry + /** + * Ensure imports point to a file/module that can be resolved. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-unresolved.md + */ + 'import-x/no-unresolved'?: Linter.RuleEntry + /** + * 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.1/docs/rules/no-unused-modules.md + */ + 'import-x/no-unused-modules'?: Linter.RuleEntry + /** + * Forbid unnecessary path segments in import and require statements. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-useless-path-segments.md + */ + 'import-x/no-useless-path-segments'?: Linter.RuleEntry + /** + * Forbid webpack loader syntax in imports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-webpack-loader-syntax.md + */ + 'import-x/no-webpack-loader-syntax'?: Linter.RuleEntry<[]> + /** + * Enforce a convention in module import order. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/order.md + */ + 'import-x/order'?: Linter.RuleEntry + /** + * 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.1/docs/rules/prefer-default-export.md + */ + 'import-x/prefer-default-export'?: Linter.RuleEntry + /** + * 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.1/docs/rules/prefer-namespace-import.md + */ + 'import-x/prefer-namespace-import'?: Linter.RuleEntry + /** + * Forbid potentially ambiguous parse goal (`script` vs. `module`). + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/unambiguous.md + */ + 'import-x/unambiguous'?: 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.1/docs/rules/consistent-type-specifier-style.md + */ + 'import/consistent-type-specifier-style'?: Linter.RuleEntry + /** + * Ensure a default export is present, given a default import. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/default.md + */ + 'import/default'?: 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.1/docs/rules/dynamic-import-chunkname.md + */ + 'import/dynamic-import-chunkname'?: Linter.RuleEntry + /** + * 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.1/docs/rules/export.md + */ + 'import/export'?: Linter.RuleEntry<[]> + /** + * Ensure all exports appear after other statements. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/exports-last.md + */ + 'import/exports-last'?: Linter.RuleEntry<[]> + /** + * Ensure consistent use of file extension within the import path. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/extensions.md + */ + 'import/extensions'?: Linter.RuleEntry + /** + * Ensure all imports appear before other statements. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/first.md + */ + 'import/first'?: Linter.RuleEntry + /** + * 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.1/docs/rules/group-exports.md + */ + 'import/group-exports'?: Linter.RuleEntry<[]> + /** + * Replaced by `import-x/first`. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/imports-first.md + * @deprecated + */ + 'import/imports-first'?: Linter.RuleEntry + /** + * Enforce the maximum number of dependencies a module can have. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/max-dependencies.md + */ + 'import/max-dependencies'?: Linter.RuleEntry + /** + * 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.1/docs/rules/named.md + */ + 'import/named'?: Linter.RuleEntry + /** + * Ensure imported namespaces contain dereferenced properties as they are dereferenced. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/namespace.md + */ + 'import/namespace'?: Linter.RuleEntry + /** + * Enforce a newline after import statements. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/newline-after-import.md + */ + 'import/newline-after-import'?: Linter.RuleEntry + /** + * Forbid import of modules using absolute paths. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-absolute-path.md + */ + 'import/no-absolute-path'?: Linter.RuleEntry + /** + * Forbid AMD `require` and `define` calls. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-amd.md + */ + 'import/no-amd'?: Linter.RuleEntry<[]> + /** + * Forbid anonymous values as default exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-anonymous-default-export.md + */ + 'import/no-anonymous-default-export'?: Linter.RuleEntry + /** + * Forbid CommonJS `require` calls and `module.exports` or `exports.*`. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-commonjs.md + */ + 'import/no-commonjs'?: Linter.RuleEntry + /** + * 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.1/docs/rules/no-cycle.md + */ + 'import/no-cycle'?: Linter.RuleEntry + /** + * Forbid default exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-default-export.md + */ + 'import/no-default-export'?: Linter.RuleEntry<[]> + /** + * Forbid imported names marked with `@deprecated` documentation tag. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-deprecated.md + */ + 'import/no-deprecated'?: Linter.RuleEntry<[]> + /** + * Forbid repeated import of the same module in multiple places. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-duplicates.md + */ + 'import/no-duplicates'?: Linter.RuleEntry + /** + * Forbid `require()` calls with expressions. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-dynamic-require.md + */ + 'import/no-dynamic-require'?: Linter.RuleEntry + /** + * Forbid empty named import blocks. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-empty-named-blocks.md + */ + 'import/no-empty-named-blocks'?: Linter.RuleEntry<[]> + /** + * Forbid the use of extraneous packages. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-extraneous-dependencies.md + */ + 'import/no-extraneous-dependencies'?: Linter.RuleEntry + /** + * Forbid import statements with CommonJS module.exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-import-module-exports.md + */ + 'import/no-import-module-exports'?: Linter.RuleEntry + /** + * Forbid importing the submodules of other modules. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-internal-modules.md + */ + 'import/no-internal-modules'?: Linter.RuleEntry + /** + * Forbid the use of mutable exports with `var` or `let`. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-mutable-exports.md + */ + 'import/no-mutable-exports'?: Linter.RuleEntry<[]> + /** + * Forbid use of exported name as identifier of default export. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-as-default.md + */ + 'import/no-named-as-default'?: Linter.RuleEntry<[]> + /** + * Forbid use of exported name as property of default export. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-as-default-member.md + */ + 'import/no-named-as-default-member'?: Linter.RuleEntry<[]> + /** + * Forbid named default exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-default.md + */ + 'import/no-named-default'?: Linter.RuleEntry<[]> + /** + * Forbid named exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-export.md + */ + 'import/no-named-export'?: Linter.RuleEntry<[]> + /** + * Forbid namespace (a.k.a. "wildcard" `*`) imports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-namespace.md + */ + 'import/no-namespace'?: Linter.RuleEntry + /** + * Forbid Node.js builtin modules. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-nodejs-modules.md + */ + 'import/no-nodejs-modules'?: Linter.RuleEntry + /** + * Forbid importing packages through relative paths. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-relative-packages.md + */ + 'import/no-relative-packages'?: Linter.RuleEntry + /** + * Forbid importing modules from parent directories. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-relative-parent-imports.md + */ + 'import/no-relative-parent-imports'?: Linter.RuleEntry + /** + * Forbid importing a default export by a different name. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-rename-default.md + */ + 'import/no-rename-default'?: Linter.RuleEntry + /** + * Enforce which files can be imported in a given folder. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-restricted-paths.md + */ + 'import/no-restricted-paths'?: Linter.RuleEntry + /** + * Forbid a module from importing itself. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-self-import.md + */ + 'import/no-self-import'?: Linter.RuleEntry<[]> + /** + * Forbid unassigned imports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-unassigned-import.md + */ + 'import/no-unassigned-import'?: Linter.RuleEntry + /** + * Ensure imports point to a file/module that can be resolved. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-unresolved.md + */ + 'import/no-unresolved'?: Linter.RuleEntry + /** + * 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.1/docs/rules/no-unused-modules.md + */ + 'import/no-unused-modules'?: Linter.RuleEntry + /** + * Forbid unnecessary path segments in import and require statements. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-useless-path-segments.md + */ + 'import/no-useless-path-segments'?: Linter.RuleEntry + /** + * Forbid webpack loader syntax in imports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-webpack-loader-syntax.md + */ + 'import/no-webpack-loader-syntax'?: Linter.RuleEntry<[]> + /** + * Enforce a convention in module import order. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/order.md + */ + 'import/order'?: Linter.RuleEntry + /** + * 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.1/docs/rules/prefer-default-export.md + */ + 'import/prefer-default-export'?: Linter.RuleEntry + /** + * 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.1/docs/rules/prefer-namespace-import.md + */ + 'import/prefer-namespace-import'?: Linter.RuleEntry + /** + * Forbid potentially ambiguous parse goal (`script` vs. `module`). + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/unambiguous.md + */ + 'import/unambiguous'?: Linter.RuleEntry<[]> + /** + * Enforce consistent indentation + * @see https://eslint.org/docs/latest/rules/indent + * @deprecated + */ + 'indent'?: Linter.RuleEntry + /** + * Enforce consistent indentation + * @see https://eslint.org/docs/latest/rules/indent-legacy + * @deprecated + */ + 'indent-legacy'?: Linter.RuleEntry + /** + * Require or disallow initialization in variable declarations + * @see https://eslint.org/docs/latest/rules/init-declarations + */ + 'init-declarations'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/check-access'?: Linter.RuleEntry<[]> + /** + * 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 + */ + 'jsdoc/check-alignment'?: Linter.RuleEntry + /** + * @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 + */ + 'jsdoc/check-examples'?: Linter.RuleEntry + /** + * Reports invalid padding inside JSDoc blocks. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-indentation.md#repos-sticky-header + */ + 'jsdoc/check-indentation'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/check-line-alignment'?: 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 + */ + 'jsdoc/check-param-names'?: 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 + */ + 'jsdoc/check-property-names'?: 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 + */ + 'jsdoc/check-syntax'?: 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 + */ + 'jsdoc/check-tag-names'?: 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 + */ + 'jsdoc/check-template-names'?: 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 + */ + 'jsdoc/check-types'?: 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 + */ + 'jsdoc/check-values'?: 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 + */ + 'jsdoc/convert-to-jsdoc-comments'?: 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 + */ + 'jsdoc/empty-tags'?: 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 + */ + 'jsdoc/escape-inline-tags'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/implements-on-classes'?: 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 + */ + 'jsdoc/imports-as-dependencies'?: 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 + */ + 'jsdoc/informative-docs'?: 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 + */ + 'jsdoc/lines-before-block'?: 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 + */ + 'jsdoc/match-description'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/match-name'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/multiline-blocks'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/no-bad-blocks'?: 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 + */ + 'jsdoc/no-blank-block-descriptions'?: 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 + */ + 'jsdoc/no-blank-blocks'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/no-defaults'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/no-missing-syntax'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/no-multi-asterisks'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/no-restricted-syntax'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/no-types'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/no-undefined-types'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/prefer-import-tag'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/reject-any-type'?: Linter.RuleEntry<[]> + /** + * Reports use of `Function` type + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/reject-function-type.md#repos-sticky-header + */ + 'jsdoc/reject-function-type'?: 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 + */ + 'jsdoc/require-asterisk-prefix'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/require-description'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/require-description-complete-sentence'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/require-example'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/require-file-overview'?: 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 + */ + 'jsdoc/require-hyphen-before-param-description'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/require-jsdoc'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/require-next-description'?: 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 + */ + 'jsdoc/require-next-type'?: 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 + */ + 'jsdoc/require-param'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/require-param-description'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/require-param-name'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/require-param-type'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/require-property'?: 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 + */ + 'jsdoc/require-property-description'?: 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 + */ + 'jsdoc/require-property-name'?: 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 + */ + 'jsdoc/require-property-type'?: 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 + */ + 'jsdoc/require-rejects'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/require-returns'?: 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 + */ + 'jsdoc/require-returns-check'?: 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 + */ + 'jsdoc/require-returns-description'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/require-returns-type'?: 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 + */ + 'jsdoc/require-tags'?: 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 + */ + 'jsdoc/require-template'?: 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 + */ + 'jsdoc/require-template-description'?: Linter.RuleEntry<[]> + /** + * 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 + */ + 'jsdoc/require-throws'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/require-throws-description'?: 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 + */ + 'jsdoc/require-throws-type'?: Linter.RuleEntry<[]> + /** + * 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 + */ + 'jsdoc/require-yields'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/require-yields-check'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/require-yields-description'?: Linter.RuleEntry<[]> + /** + * 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 + */ + 'jsdoc/require-yields-type'?: Linter.RuleEntry<[]> + /** + * 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 + */ + 'jsdoc/sort-tags'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/tag-lines'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/text-escaping'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/ts-method-signature-style'?: 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 + */ + 'jsdoc/ts-no-empty-object-type'?: Linter.RuleEntry<[]> + /** + * 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 + */ + 'jsdoc/ts-no-unnecessary-template-expression'?: 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 + */ + 'jsdoc/ts-prefer-function-type'?: Linter.RuleEntry + /** + * Formats JSDoc type values. + * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/type-formatting.md#repos-sticky-header + */ + 'jsdoc/type-formatting'?: Linter.RuleEntry + /** + * 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 + */ + 'jsdoc/valid-types'?: Linter.RuleEntry + /** + * Enforce the consistent use of either double or single quotes in JSX attributes + * @see https://eslint.org/docs/latest/rules/jsx-quotes + * @deprecated + */ + 'jsx-quotes'?: Linter.RuleEntry + /** + * Enforce consistent spacing between keys and values in object literal properties + * @see https://eslint.org/docs/latest/rules/key-spacing + * @deprecated + */ + 'key-spacing'?: Linter.RuleEntry + /** + * Enforce consistent spacing before and after keywords + * @see https://eslint.org/docs/latest/rules/keyword-spacing + * @deprecated + */ + 'keyword-spacing'?: Linter.RuleEntry + /** + * Enforce position of line comments + * @see https://eslint.org/docs/latest/rules/line-comment-position + * @deprecated + */ + 'line-comment-position'?: Linter.RuleEntry + /** + * Enforce consistent linebreak style + * @see https://eslint.org/docs/latest/rules/linebreak-style + * @deprecated + */ + 'linebreak-style'?: Linter.RuleEntry + /** + * Require empty lines around comments + * @see https://eslint.org/docs/latest/rules/lines-around-comment + * @deprecated + */ + 'lines-around-comment'?: Linter.RuleEntry + /** + * Require or disallow newlines around directives + * @see https://eslint.org/docs/latest/rules/lines-around-directive + * @deprecated + */ + 'lines-around-directive'?: Linter.RuleEntry + /** + * Require or disallow an empty line between class members + * @see https://eslint.org/docs/latest/rules/lines-between-class-members + * @deprecated + */ + 'lines-between-class-members'?: Linter.RuleEntry + /** + * Require or disallow logical assignment operator shorthand + * @see https://eslint.org/docs/latest/rules/logical-assignment-operators + */ + 'logical-assignment-operators'?: Linter.RuleEntry + /** + * Require languages for fenced code blocks + * @see https://github.com/eslint/markdown/blob/main/docs/rules/fenced-code-language.md + */ + 'markdown/fenced-code-language'?: Linter.RuleEntry + /** + * Enforce heading levels increment by one + * @see https://github.com/eslint/markdown/blob/main/docs/rules/heading-increment.md + */ + 'markdown/heading-increment'?: Linter.RuleEntry + /** + * Disallow bare URLs + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-bare-urls.md + */ + 'markdown/no-bare-urls'?: Linter.RuleEntry<[]> + /** + * Disallow duplicate definitions + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-duplicate-definitions.md + */ + 'markdown/no-duplicate-definitions'?: Linter.RuleEntry + /** + * Disallow duplicate headings in the same document + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-duplicate-headings.md + */ + 'markdown/no-duplicate-headings'?: Linter.RuleEntry + /** + * Disallow empty definitions + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-definitions.md + */ + 'markdown/no-empty-definitions'?: Linter.RuleEntry + /** + * Disallow empty images + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-images.md + */ + 'markdown/no-empty-images'?: Linter.RuleEntry<[]> + /** + * Disallow empty links + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-links.md + */ + 'markdown/no-empty-links'?: Linter.RuleEntry<[]> + /** + * Disallow HTML tags + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-html.md + */ + 'markdown/no-html'?: Linter.RuleEntry + /** + * Disallow invalid label references + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-invalid-label-refs.md + */ + 'markdown/no-invalid-label-refs'?: 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 + */ + 'markdown/no-missing-atx-heading-space'?: Linter.RuleEntry + /** + * Disallow missing label references + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-label-refs.md + */ + 'markdown/no-missing-label-refs'?: Linter.RuleEntry + /** + * Disallow link fragments that do not reference valid headings + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-link-fragments.md + */ + 'markdown/no-missing-link-fragments'?: Linter.RuleEntry + /** + * Disallow multiple H1 headings in the same document + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-multiple-h1.md + */ + 'markdown/no-multiple-h1'?: Linter.RuleEntry + /** + * Disallow URLs that match defined reference identifiers + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-reference-like-urls.md + */ + 'markdown/no-reference-like-urls'?: Linter.RuleEntry<[]> + /** + * Disallow reversed link and image syntax + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-reversed-media-syntax.md + */ + 'markdown/no-reversed-media-syntax'?: Linter.RuleEntry<[]> + /** + * Disallow spaces around emphasis markers + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-space-in-emphasis.md + */ + 'markdown/no-space-in-emphasis'?: Linter.RuleEntry + /** + * Disallow unused definitions + * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-unused-definitions.md + */ + 'markdown/no-unused-definitions'?: Linter.RuleEntry + /** + * Require alternative text for images + * @see https://github.com/eslint/markdown/blob/main/docs/rules/require-alt-text.md + */ + 'markdown/require-alt-text'?: Linter.RuleEntry<[]> + /** + * 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 + */ + 'markdown/table-column-count'?: Linter.RuleEntry + /** + * Enforce a maximum number of classes per file + * @see https://eslint.org/docs/latest/rules/max-classes-per-file + */ + 'max-classes-per-file'?: Linter.RuleEntry + /** + * Enforce a maximum depth that blocks can be nested + * @see https://eslint.org/docs/latest/rules/max-depth + */ + 'max-depth'?: Linter.RuleEntry + /** + * Enforce a maximum line length + * @see https://eslint.org/docs/latest/rules/max-len + * @deprecated + */ + 'max-len'?: Linter.RuleEntry + /** + * Enforce a maximum number of lines per file + * @see https://eslint.org/docs/latest/rules/max-lines + */ + 'max-lines'?: Linter.RuleEntry + /** + * Enforce a maximum number of lines of code in a function + * @see https://eslint.org/docs/latest/rules/max-lines-per-function + */ + 'max-lines-per-function'?: Linter.RuleEntry + /** + * Enforce a maximum depth that callbacks can be nested + * @see https://eslint.org/docs/latest/rules/max-nested-callbacks + */ + 'max-nested-callbacks'?: Linter.RuleEntry + /** + * Enforce a maximum number of parameters in function definitions + * @see https://eslint.org/docs/latest/rules/max-params + */ + 'max-params'?: Linter.RuleEntry + /** + * Enforce a maximum number of statements allowed in function blocks + * @see https://eslint.org/docs/latest/rules/max-statements + */ + 'max-statements'?: Linter.RuleEntry + /** + * Enforce a maximum number of statements allowed per line + * @see https://eslint.org/docs/latest/rules/max-statements-per-line + * @deprecated + */ + 'max-statements-per-line'?: Linter.RuleEntry + /** + * Enforce a particular style for multiline comments + * @see https://eslint.org/docs/latest/rules/multiline-comment-style + * @deprecated + */ + 'multiline-comment-style'?: Linter.RuleEntry + /** + * Enforce newlines between operands of ternary expressions + * @see https://eslint.org/docs/latest/rules/multiline-ternary + * @deprecated + */ + 'multiline-ternary'?: Linter.RuleEntry + /** + * Require constructor names to begin with a capital letter + * @see https://eslint.org/docs/latest/rules/new-cap + */ + 'new-cap'?: Linter.RuleEntry + /** + * Enforce or disallow parentheses when invoking a constructor with no arguments + * @see https://eslint.org/docs/latest/rules/new-parens + * @deprecated + */ + 'new-parens'?: Linter.RuleEntry + /** + * Require or disallow an empty line after variable declarations + * @see https://eslint.org/docs/latest/rules/newline-after-var + * @deprecated + */ + 'newline-after-var'?: Linter.RuleEntry + /** + * Require an empty line before `return` statements + * @see https://eslint.org/docs/latest/rules/newline-before-return + * @deprecated + */ + 'newline-before-return'?: Linter.RuleEntry<[]> + /** + * Require a newline after each call in a method chain + * @see https://eslint.org/docs/latest/rules/newline-per-chained-call + * @deprecated + */ + 'newline-per-chained-call'?: Linter.RuleEntry + /** + * Disallow the use of `alert`, `confirm`, and `prompt` + * @see https://eslint.org/docs/latest/rules/no-alert + */ + 'no-alert'?: Linter.RuleEntry<[]> + /** + * Disallow `Array` constructors + * @see https://eslint.org/docs/latest/rules/no-array-constructor + */ + 'no-array-constructor'?: Linter.RuleEntry<[]> + /** + * Disallow using an async function as a Promise executor + * @see https://eslint.org/docs/latest/rules/no-async-promise-executor + */ + 'no-async-promise-executor'?: Linter.RuleEntry<[]> + /** + * Disallow `await` inside of loops + * @see https://eslint.org/docs/latest/rules/no-await-in-loop + */ + 'no-await-in-loop'?: Linter.RuleEntry<[]> + /** + * Disallow bitwise operators + * @see https://eslint.org/docs/latest/rules/no-bitwise + */ + 'no-bitwise'?: Linter.RuleEntry + /** + * Disallow use of the `Buffer()` constructor + * @see https://eslint.org/docs/latest/rules/no-buffer-constructor + * @deprecated + */ + 'no-buffer-constructor'?: Linter.RuleEntry<[]> + /** + * Disallow the use of `arguments.caller` or `arguments.callee` + * @see https://eslint.org/docs/latest/rules/no-caller + */ + 'no-caller'?: Linter.RuleEntry<[]> + /** + * Disallow lexical declarations in case clauses + * @see https://eslint.org/docs/latest/rules/no-case-declarations + */ + 'no-case-declarations'?: Linter.RuleEntry<[]> + /** + * Disallow `catch` clause parameters from shadowing variables in the outer scope + * @see https://eslint.org/docs/latest/rules/no-catch-shadow + * @deprecated + */ + 'no-catch-shadow'?: Linter.RuleEntry<[]> + /** + * Disallow reassigning class members + * @see https://eslint.org/docs/latest/rules/no-class-assign + */ + 'no-class-assign'?: Linter.RuleEntry<[]> + /** + * Disallow comparing against `-0` + * @see https://eslint.org/docs/latest/rules/no-compare-neg-zero + */ + 'no-compare-neg-zero'?: Linter.RuleEntry<[]> + /** + * Disallow assignment operators in conditional expressions + * @see https://eslint.org/docs/latest/rules/no-cond-assign + */ + 'no-cond-assign'?: Linter.RuleEntry + /** + * Disallow arrow functions where they could be confused with comparisons + * @see https://eslint.org/docs/latest/rules/no-confusing-arrow + * @deprecated + */ + 'no-confusing-arrow'?: Linter.RuleEntry + /** + * Disallow the use of `console` + * @see https://eslint.org/docs/latest/rules/no-console + */ + 'no-console'?: Linter.RuleEntry + /** + * Disallow reassigning `const`, `using`, and `await using` variables + * @see https://eslint.org/docs/latest/rules/no-const-assign + */ + 'no-const-assign'?: Linter.RuleEntry<[]> + /** + * Disallow expressions where the operation doesn't affect the value + * @see https://eslint.org/docs/latest/rules/no-constant-binary-expression + */ + 'no-constant-binary-expression'?: Linter.RuleEntry<[]> + /** + * Disallow constant expressions in conditions + * @see https://eslint.org/docs/latest/rules/no-constant-condition + */ + 'no-constant-condition'?: Linter.RuleEntry + /** + * Disallow returning value from constructor + * @see https://eslint.org/docs/latest/rules/no-constructor-return + */ + 'no-constructor-return'?: Linter.RuleEntry<[]> + /** + * Disallow `continue` statements + * @see https://eslint.org/docs/latest/rules/no-continue + */ + 'no-continue'?: Linter.RuleEntry<[]> + /** + * Disallow control characters in regular expressions + * @see https://eslint.org/docs/latest/rules/no-control-regex + */ + 'no-control-regex'?: Linter.RuleEntry<[]> + /** + * Disallow the use of `debugger` + * @see https://eslint.org/docs/latest/rules/no-debugger + */ + 'no-debugger'?: Linter.RuleEntry<[]> + /** + * Disallow deleting variables + * @see https://eslint.org/docs/latest/rules/no-delete-var + */ + 'no-delete-var'?: Linter.RuleEntry<[]> + /** + * Disallow equal signs explicitly at the beginning of regular expressions + * @see https://eslint.org/docs/latest/rules/no-div-regex + */ + 'no-div-regex'?: Linter.RuleEntry<[]> + /** + * Disallow duplicate arguments in `function` definitions + * @see https://eslint.org/docs/latest/rules/no-dupe-args + */ + 'no-dupe-args'?: Linter.RuleEntry<[]> + /** + * Disallow duplicate class members + * @see https://eslint.org/docs/latest/rules/no-dupe-class-members + */ + 'no-dupe-class-members'?: Linter.RuleEntry<[]> + /** + * Disallow duplicate conditions in if-else-if chains + * @see https://eslint.org/docs/latest/rules/no-dupe-else-if + */ + 'no-dupe-else-if'?: Linter.RuleEntry<[]> + /** + * Disallow duplicate keys in object literals + * @see https://eslint.org/docs/latest/rules/no-dupe-keys + */ + 'no-dupe-keys'?: Linter.RuleEntry<[]> + /** + * Disallow duplicate case labels + * @see https://eslint.org/docs/latest/rules/no-duplicate-case + */ + 'no-duplicate-case'?: Linter.RuleEntry<[]> + /** + * Disallow duplicate module imports + * @see https://eslint.org/docs/latest/rules/no-duplicate-imports + */ + 'no-duplicate-imports'?: Linter.RuleEntry + /** + * Disallow `else` blocks after `return` statements in `if` statements + * @see https://eslint.org/docs/latest/rules/no-else-return + */ + 'no-else-return'?: Linter.RuleEntry + /** + * Disallow empty block statements + * @see https://eslint.org/docs/latest/rules/no-empty + */ + 'no-empty'?: Linter.RuleEntry + /** + * Disallow empty character classes in regular expressions + * @see https://eslint.org/docs/latest/rules/no-empty-character-class + */ + 'no-empty-character-class'?: Linter.RuleEntry<[]> + /** + * Disallow empty functions + * @see https://eslint.org/docs/latest/rules/no-empty-function + */ + 'no-empty-function'?: Linter.RuleEntry + /** + * Disallow empty destructuring patterns + * @see https://eslint.org/docs/latest/rules/no-empty-pattern + */ + 'no-empty-pattern'?: Linter.RuleEntry + /** + * Disallow empty static blocks + * @see https://eslint.org/docs/latest/rules/no-empty-static-block + */ + 'no-empty-static-block'?: Linter.RuleEntry<[]> + /** + * Disallow `null` comparisons without type-checking operators + * @see https://eslint.org/docs/latest/rules/no-eq-null + */ + 'no-eq-null'?: Linter.RuleEntry<[]> + /** + * Disallow the use of `eval()` + * @see https://eslint.org/docs/latest/rules/no-eval + */ + 'no-eval'?: Linter.RuleEntry + /** + * Disallow reassigning exceptions in `catch` clauses + * @see https://eslint.org/docs/latest/rules/no-ex-assign + */ + 'no-ex-assign'?: Linter.RuleEntry<[]> + /** + * Disallow extending native types + * @see https://eslint.org/docs/latest/rules/no-extend-native + */ + 'no-extend-native'?: Linter.RuleEntry + /** + * Disallow unnecessary calls to `.bind()` + * @see https://eslint.org/docs/latest/rules/no-extra-bind + */ + 'no-extra-bind'?: Linter.RuleEntry<[]> + /** + * Disallow unnecessary boolean casts + * @see https://eslint.org/docs/latest/rules/no-extra-boolean-cast + */ + 'no-extra-boolean-cast'?: Linter.RuleEntry + /** + * Disallow unnecessary labels + * @see https://eslint.org/docs/latest/rules/no-extra-label + */ + 'no-extra-label'?: Linter.RuleEntry<[]> + /** + * Disallow unnecessary parentheses + * @see https://eslint.org/docs/latest/rules/no-extra-parens + * @deprecated + */ + 'no-extra-parens'?: Linter.RuleEntry + /** + * Disallow unnecessary semicolons + * @see https://eslint.org/docs/latest/rules/no-extra-semi + * @deprecated + */ + 'no-extra-semi'?: Linter.RuleEntry<[]> + /** + * Disallow fallthrough of `case` statements + * @see https://eslint.org/docs/latest/rules/no-fallthrough + */ + 'no-fallthrough'?: Linter.RuleEntry + /** + * Disallow leading or trailing decimal points in numeric literals + * @see https://eslint.org/docs/latest/rules/no-floating-decimal + * @deprecated + */ + 'no-floating-decimal'?: Linter.RuleEntry<[]> + /** + * Disallow reassigning `function` declarations + * @see https://eslint.org/docs/latest/rules/no-func-assign + */ + 'no-func-assign'?: Linter.RuleEntry<[]> + /** + * Disallow assignments to native objects or read-only global variables + * @see https://eslint.org/docs/latest/rules/no-global-assign + */ + 'no-global-assign'?: Linter.RuleEntry + /** + * Disallow shorthand type conversions + * @see https://eslint.org/docs/latest/rules/no-implicit-coercion + */ + 'no-implicit-coercion'?: Linter.RuleEntry + /** + * Disallow declarations in the global scope + * @see https://eslint.org/docs/latest/rules/no-implicit-globals + */ + 'no-implicit-globals'?: Linter.RuleEntry + /** + * Disallow the use of `eval()`-like methods + * @see https://eslint.org/docs/latest/rules/no-implied-eval + */ + 'no-implied-eval'?: Linter.RuleEntry<[]> + /** + * Disallow assigning to imported bindings + * @see https://eslint.org/docs/latest/rules/no-import-assign + */ + 'no-import-assign'?: Linter.RuleEntry<[]> + /** + * Disallow inline comments after code + * @see https://eslint.org/docs/latest/rules/no-inline-comments + */ + 'no-inline-comments'?: Linter.RuleEntry + /** + * Disallow variable or `function` declarations in nested blocks + * @see https://eslint.org/docs/latest/rules/no-inner-declarations + */ + 'no-inner-declarations'?: Linter.RuleEntry + /** + * Disallow invalid regular expression strings in `RegExp` constructors + * @see https://eslint.org/docs/latest/rules/no-invalid-regexp + */ + 'no-invalid-regexp'?: Linter.RuleEntry + /** + * Disallow use of `this` in contexts where the value of `this` is `undefined` + * @see https://eslint.org/docs/latest/rules/no-invalid-this + */ + 'no-invalid-this'?: Linter.RuleEntry + /** + * Disallow irregular whitespace + * @see https://eslint.org/docs/latest/rules/no-irregular-whitespace + */ + 'no-irregular-whitespace'?: Linter.RuleEntry + /** + * Disallow the use of the `__iterator__` property + * @see https://eslint.org/docs/latest/rules/no-iterator + */ + 'no-iterator'?: Linter.RuleEntry<[]> + /** + * Disallow labels that share a name with a variable + * @see https://eslint.org/docs/latest/rules/no-label-var + */ + 'no-label-var'?: Linter.RuleEntry<[]> + /** + * Disallow labeled statements + * @see https://eslint.org/docs/latest/rules/no-labels + */ + 'no-labels'?: Linter.RuleEntry + /** + * Disallow unnecessary nested blocks + * @see https://eslint.org/docs/latest/rules/no-lone-blocks + */ + 'no-lone-blocks'?: Linter.RuleEntry<[]> + /** + * Disallow `if` statements as the only statement in `else` blocks + * @see https://eslint.org/docs/latest/rules/no-lonely-if + */ + 'no-lonely-if'?: Linter.RuleEntry<[]> + /** + * Disallow function declarations that contain unsafe references inside loop statements + * @see https://eslint.org/docs/latest/rules/no-loop-func + */ + 'no-loop-func'?: Linter.RuleEntry<[]> + /** + * Disallow literal numbers that lose precision + * @see https://eslint.org/docs/latest/rules/no-loss-of-precision + */ + 'no-loss-of-precision'?: Linter.RuleEntry<[]> + /** + * Disallow magic numbers + * @see https://eslint.org/docs/latest/rules/no-magic-numbers + */ + 'no-magic-numbers'?: Linter.RuleEntry + /** + * Disallow characters which are made with multiple code points in character class syntax + * @see https://eslint.org/docs/latest/rules/no-misleading-character-class + */ + 'no-misleading-character-class'?: Linter.RuleEntry + /** + * Disallow mixed binary operators + * @see https://eslint.org/docs/latest/rules/no-mixed-operators + * @deprecated + */ + 'no-mixed-operators'?: Linter.RuleEntry + /** + * Disallow `require` calls to be mixed with regular variable declarations + * @see https://eslint.org/docs/latest/rules/no-mixed-requires + * @deprecated + */ + 'no-mixed-requires'?: Linter.RuleEntry + /** + * Disallow mixed spaces and tabs for indentation + * @see https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs + * @deprecated + */ + 'no-mixed-spaces-and-tabs'?: Linter.RuleEntry + /** + * Disallow use of chained assignment expressions + * @see https://eslint.org/docs/latest/rules/no-multi-assign + */ + 'no-multi-assign'?: Linter.RuleEntry + /** + * Disallow multiple spaces + * @see https://eslint.org/docs/latest/rules/no-multi-spaces + * @deprecated + */ + 'no-multi-spaces'?: Linter.RuleEntry + /** + * Disallow multiline strings + * @see https://eslint.org/docs/latest/rules/no-multi-str + */ + 'no-multi-str'?: Linter.RuleEntry<[]> + /** + * Disallow multiple empty lines + * @see https://eslint.org/docs/latest/rules/no-multiple-empty-lines + * @deprecated + */ + 'no-multiple-empty-lines'?: Linter.RuleEntry + /** + * Disallow assignments to native objects or read-only global variables + * @see https://eslint.org/docs/latest/rules/no-native-reassign + * @deprecated + */ + 'no-native-reassign'?: Linter.RuleEntry + /** + * Disallow negated conditions + * @see https://eslint.org/docs/latest/rules/no-negated-condition + */ + 'no-negated-condition'?: Linter.RuleEntry<[]> + /** + * Disallow negating the left operand in `in` expressions + * @see https://eslint.org/docs/latest/rules/no-negated-in-lhs + * @deprecated + */ + 'no-negated-in-lhs'?: Linter.RuleEntry<[]> + /** + * Disallow nested ternary expressions + * @see https://eslint.org/docs/latest/rules/no-nested-ternary + */ + 'no-nested-ternary'?: Linter.RuleEntry<[]> + /** + * Disallow `new` operators outside of assignments or comparisons + * @see https://eslint.org/docs/latest/rules/no-new + */ + 'no-new'?: Linter.RuleEntry<[]> + /** + * Disallow `new` operators with the `Function` object + * @see https://eslint.org/docs/latest/rules/no-new-func + */ + 'no-new-func'?: Linter.RuleEntry<[]> + /** + * Disallow `new` operators with global non-constructor functions + * @see https://eslint.org/docs/latest/rules/no-new-native-nonconstructor + */ + 'no-new-native-nonconstructor'?: Linter.RuleEntry<[]> + /** + * Disallow `Object` constructors + * @see https://eslint.org/docs/latest/rules/no-new-object + * @deprecated + */ + 'no-new-object'?: Linter.RuleEntry<[]> + /** + * Disallow `new` operators with calls to `require` + * @see https://eslint.org/docs/latest/rules/no-new-require + * @deprecated + */ + 'no-new-require'?: Linter.RuleEntry<[]> + /** + * Disallow `new` operators with the `Symbol` object + * @see https://eslint.org/docs/latest/rules/no-new-symbol + * @deprecated + */ + '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<[]> + /** + * Disallow `\8` and `\9` escape sequences in string literals + * @see https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape + */ + 'no-nonoctal-decimal-escape'?: Linter.RuleEntry<[]> + /** + * Disallow calling global object properties as functions + * @see https://eslint.org/docs/latest/rules/no-obj-calls + */ + 'no-obj-calls'?: Linter.RuleEntry<[]> + /** + * Disallow calls to the `Object` constructor without an argument + * @see https://eslint.org/docs/latest/rules/no-object-constructor + */ + 'no-object-constructor'?: Linter.RuleEntry<[]> + /** + * Disallow octal literals + * @see https://eslint.org/docs/latest/rules/no-octal + */ + 'no-octal'?: Linter.RuleEntry<[]> + /** + * Disallow octal escape sequences in string literals + * @see https://eslint.org/docs/latest/rules/no-octal-escape + */ + 'no-octal-escape'?: Linter.RuleEntry<[]> + /** + * disallow .only blocks in tests + * @see https://github.com/levibuzolic/eslint-plugin-no-only-tests + */ + 'no-only-tests/no-only-tests'?: Linter.RuleEntry + /** + * Disallow reassigning function parameters + * @see https://eslint.org/docs/latest/rules/no-param-reassign + */ + 'no-param-reassign'?: Linter.RuleEntry + /** + * Disallow string concatenation with `__dirname` and `__filename` + * @see https://eslint.org/docs/latest/rules/no-path-concat + * @deprecated + */ + 'no-path-concat'?: Linter.RuleEntry<[]> + /** + * Disallow the unary operators `++` and `--` + * @see https://eslint.org/docs/latest/rules/no-plusplus + */ + 'no-plusplus'?: Linter.RuleEntry + /** + * Disallow the use of `process.env` + * @see https://eslint.org/docs/latest/rules/no-process-env + * @deprecated + */ + 'no-process-env'?: Linter.RuleEntry<[]> + /** + * Disallow the use of `process.exit()` + * @see https://eslint.org/docs/latest/rules/no-process-exit + * @deprecated + */ + 'no-process-exit'?: Linter.RuleEntry<[]> + /** + * Disallow returning values from Promise executor functions + * @see https://eslint.org/docs/latest/rules/no-promise-executor-return + */ + 'no-promise-executor-return'?: Linter.RuleEntry + /** + * Disallow the use of the `__proto__` property + * @see https://eslint.org/docs/latest/rules/no-proto + */ + 'no-proto'?: Linter.RuleEntry<[]> + /** + * Disallow calling some `Object.prototype` methods directly on objects + * @see https://eslint.org/docs/latest/rules/no-prototype-builtins + */ + 'no-prototype-builtins'?: Linter.RuleEntry<[]> + /** + * Disallow variable redeclaration + * @see https://eslint.org/docs/latest/rules/no-redeclare + */ + 'no-redeclare'?: Linter.RuleEntry + /** + * Disallow multiple spaces in regular expressions + * @see https://eslint.org/docs/latest/rules/no-regex-spaces + */ + 'no-regex-spaces'?: Linter.RuleEntry<[]> + /** + * Disallow specified names in exports + * @see https://eslint.org/docs/latest/rules/no-restricted-exports + */ + 'no-restricted-exports'?: Linter.RuleEntry + /** + * Disallow specified global variables + * @see https://eslint.org/docs/latest/rules/no-restricted-globals + */ + 'no-restricted-globals'?: Linter.RuleEntry + /** + * Disallow specified modules when loaded by `import` + * @see https://eslint.org/docs/latest/rules/no-restricted-imports + */ + 'no-restricted-imports'?: Linter.RuleEntry + /** + * Disallow specified modules when loaded by `require` + * @see https://eslint.org/docs/latest/rules/no-restricted-modules + * @deprecated + */ + 'no-restricted-modules'?: Linter.RuleEntry + /** + * Disallow certain properties on certain objects + * @see https://eslint.org/docs/latest/rules/no-restricted-properties + */ + 'no-restricted-properties'?: Linter.RuleEntry + /** + * Disallow specified syntax + * @see https://eslint.org/docs/latest/rules/no-restricted-syntax + */ + 'no-restricted-syntax'?: Linter.RuleEntry + /** + * Disallow assignment operators in `return` statements + * @see https://eslint.org/docs/latest/rules/no-return-assign + */ + 'no-return-assign'?: Linter.RuleEntry + /** + * Disallow unnecessary `return await` + * @see https://eslint.org/docs/latest/rules/no-return-await + * @deprecated + */ + 'no-return-await'?: Linter.RuleEntry<[]> + /** + * Disallow `javascript:` URLs + * @see https://eslint.org/docs/latest/rules/no-script-url + */ + 'no-script-url'?: Linter.RuleEntry<[]> + /** + * Disallow assignments where both sides are exactly the same + * @see https://eslint.org/docs/latest/rules/no-self-assign + */ + 'no-self-assign'?: Linter.RuleEntry + /** + * Disallow comparisons where both sides are exactly the same + * @see https://eslint.org/docs/latest/rules/no-self-compare + */ + 'no-self-compare'?: Linter.RuleEntry<[]> + /** + * Disallow comma operators + * @see https://eslint.org/docs/latest/rules/no-sequences + */ + 'no-sequences'?: Linter.RuleEntry + /** + * Disallow returning values from setters + * @see https://eslint.org/docs/latest/rules/no-setter-return + */ + 'no-setter-return'?: Linter.RuleEntry<[]> + /** + * Disallow variable declarations from shadowing variables declared in the outer scope + * @see https://eslint.org/docs/latest/rules/no-shadow + */ + 'no-shadow'?: Linter.RuleEntry + /** + * Disallow identifiers from shadowing restricted names + * @see https://eslint.org/docs/latest/rules/no-shadow-restricted-names + */ + 'no-shadow-restricted-names'?: Linter.RuleEntry + /** + * Disallow spacing between function identifiers and their applications (deprecated) + * @see https://eslint.org/docs/latest/rules/no-spaced-func + * @deprecated + */ + 'no-spaced-func'?: Linter.RuleEntry<[]> + /** + * Disallow sparse arrays + * @see https://eslint.org/docs/latest/rules/no-sparse-arrays + */ + 'no-sparse-arrays'?: Linter.RuleEntry<[]> + /** + * Disallow synchronous methods + * @see https://eslint.org/docs/latest/rules/no-sync + * @deprecated + */ + 'no-sync'?: Linter.RuleEntry + /** + * Disallow all tabs + * @see https://eslint.org/docs/latest/rules/no-tabs + * @deprecated + */ + 'no-tabs'?: Linter.RuleEntry + /** + * Disallow template literal placeholder syntax in regular strings + * @see https://eslint.org/docs/latest/rules/no-template-curly-in-string + */ + 'no-template-curly-in-string'?: Linter.RuleEntry<[]> + /** + * Disallow ternary operators + * @see https://eslint.org/docs/latest/rules/no-ternary + */ + 'no-ternary'?: Linter.RuleEntry<[]> + /** + * Disallow `this`/`super` before calling `super()` in constructors + * @see https://eslint.org/docs/latest/rules/no-this-before-super + */ + 'no-this-before-super'?: Linter.RuleEntry<[]> + /** + * Disallow throwing literals as exceptions + * @see https://eslint.org/docs/latest/rules/no-throw-literal + */ + 'no-throw-literal'?: Linter.RuleEntry<[]> + /** + * Disallow trailing whitespace at the end of lines + * @see https://eslint.org/docs/latest/rules/no-trailing-spaces + * @deprecated + */ + 'no-trailing-spaces'?: Linter.RuleEntry + /** + * 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 + */ + 'no-undef'?: Linter.RuleEntry + /** + * Disallow initializing variables to `undefined` + * @see https://eslint.org/docs/latest/rules/no-undef-init + */ + 'no-undef-init'?: Linter.RuleEntry<[]> + /** + * Disallow the use of `undefined` as an identifier + * @see https://eslint.org/docs/latest/rules/no-undefined + */ + 'no-undefined'?: Linter.RuleEntry<[]> + /** + * Disallow dangling underscores in identifiers + * @see https://eslint.org/docs/latest/rules/no-underscore-dangle + */ + 'no-underscore-dangle'?: Linter.RuleEntry + /** + * Disallow confusing multiline expressions + * @see https://eslint.org/docs/latest/rules/no-unexpected-multiline + */ + 'no-unexpected-multiline'?: Linter.RuleEntry<[]> + /** + * Disallow unmodified loop conditions + * @see https://eslint.org/docs/latest/rules/no-unmodified-loop-condition + */ + 'no-unmodified-loop-condition'?: Linter.RuleEntry<[]> + /** + * Disallow ternary operators when simpler alternatives exist + * @see https://eslint.org/docs/latest/rules/no-unneeded-ternary + */ + 'no-unneeded-ternary'?: Linter.RuleEntry + /** + * Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements + * @see https://eslint.org/docs/latest/rules/no-unreachable + */ + 'no-unreachable'?: Linter.RuleEntry<[]> + /** + * Disallow loops with a body that allows only one iteration + * @see https://eslint.org/docs/latest/rules/no-unreachable-loop + */ + 'no-unreachable-loop'?: Linter.RuleEntry + /** + * Disallow control flow statements in `finally` blocks + * @see https://eslint.org/docs/latest/rules/no-unsafe-finally + */ + 'no-unsafe-finally'?: Linter.RuleEntry<[]> + /** + * Disallow negating the left operand of relational operators + * @see https://eslint.org/docs/latest/rules/no-unsafe-negation + */ + 'no-unsafe-negation'?: 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 + */ + 'no-unsafe-optional-chaining'?: Linter.RuleEntry + /** + * Disallow unused expressions + * @see https://eslint.org/docs/latest/rules/no-unused-expressions + */ + 'no-unused-expressions'?: Linter.RuleEntry + /** + * Disallow unused labels + * @see https://eslint.org/docs/latest/rules/no-unused-labels + */ + 'no-unused-labels'?: Linter.RuleEntry<[]> + /** + * Disallow unused private class members + * @see https://eslint.org/docs/latest/rules/no-unused-private-class-members + */ + 'no-unused-private-class-members'?: Linter.RuleEntry<[]> + /** + * Disallow unused variables + * @see https://eslint.org/docs/latest/rules/no-unused-vars + */ + 'no-unused-vars'?: Linter.RuleEntry + /** + * Disallow the use of variables before they are defined + * @see https://eslint.org/docs/latest/rules/no-use-before-define + */ + 'no-use-before-define'?: Linter.RuleEntry + /** + * Disallow variable assignments when the value is not used + * @see https://eslint.org/docs/latest/rules/no-useless-assignment + */ + 'no-useless-assignment'?: Linter.RuleEntry<[]> + /** + * Disallow useless backreferences in regular expressions + * @see https://eslint.org/docs/latest/rules/no-useless-backreference + */ + 'no-useless-backreference'?: Linter.RuleEntry<[]> + /** + * Disallow unnecessary calls to `.call()` and `.apply()` + * @see https://eslint.org/docs/latest/rules/no-useless-call + */ + 'no-useless-call'?: Linter.RuleEntry<[]> + /** + * Disallow unnecessary `catch` clauses + * @see https://eslint.org/docs/latest/rules/no-useless-catch + */ + 'no-useless-catch'?: Linter.RuleEntry<[]> + /** + * Disallow unnecessary computed property keys in objects and classes + * @see https://eslint.org/docs/latest/rules/no-useless-computed-key + */ + 'no-useless-computed-key'?: Linter.RuleEntry + /** + * Disallow unnecessary concatenation of literals or template literals + * @see https://eslint.org/docs/latest/rules/no-useless-concat + */ + 'no-useless-concat'?: Linter.RuleEntry<[]> + /** + * Disallow unnecessary constructors + * @see https://eslint.org/docs/latest/rules/no-useless-constructor + */ + 'no-useless-constructor'?: Linter.RuleEntry<[]> + /** + * Disallow unnecessary escape characters + * @see https://eslint.org/docs/latest/rules/no-useless-escape + */ + 'no-useless-escape'?: Linter.RuleEntry + /** + * Disallow renaming import, export, and destructured assignments to the same name + * @see https://eslint.org/docs/latest/rules/no-useless-rename + */ + 'no-useless-rename'?: Linter.RuleEntry + /** + * Disallow redundant return statements + * @see https://eslint.org/docs/latest/rules/no-useless-return + */ + 'no-useless-return'?: Linter.RuleEntry<[]> + /** + * Require `let` or `const` instead of `var` + * @see https://eslint.org/docs/latest/rules/no-var + */ + 'no-var'?: Linter.RuleEntry<[]> + /** + * Disallow `void` operators + * @see https://eslint.org/docs/latest/rules/no-void + */ + 'no-void'?: Linter.RuleEntry + /** + * Disallow specified warning terms in comments + * @see https://eslint.org/docs/latest/rules/no-warning-comments + */ + 'no-warning-comments'?: Linter.RuleEntry + /** + * Disallow whitespace before properties + * @see https://eslint.org/docs/latest/rules/no-whitespace-before-property + * @deprecated + */ + 'no-whitespace-before-property'?: Linter.RuleEntry<[]> + /** + * Disallow `with` statements + * @see https://eslint.org/docs/latest/rules/no-with + */ + 'no-with'?: Linter.RuleEntry<[]> + /** + * Enforce the location of single-line statements + * @see https://eslint.org/docs/latest/rules/nonblock-statement-body-position + * @deprecated + */ + 'nonblock-statement-body-position'?: Linter.RuleEntry + /** + * Disallow setting `test` key in Nuxt config + * @see https://eslint.nuxt.com/packages/plugin#nuxtno-nuxt-config-test-key + */ + 'nuxt/no-nuxt-config-test-key'?: Linter.RuleEntry<[]> + /** + * Disallow runtime context values inside `definePageMeta` at the eager level, which is extracted into a separate chunk at build time and runs before component setup + * @see https://eslint.nuxt.com/packages/plugin#nuxtno-page-meta-runtime-values + */ + 'nuxt/no-page-meta-runtime-values'?: Linter.RuleEntry<[]> + /** + * Prefer recommended order of Nuxt config properties + * @see https://eslint.nuxt.com/packages/plugin#nuxtnuxt-config-keys-order + */ + 'nuxt/nuxt-config-keys-order'?: Linter.RuleEntry<[]> + /** + * Prefer using `import.meta.*` over `process.*` + * @see https://eslint.nuxt.com/packages/plugin#nuxtprefer-import-meta + */ + 'nuxt/prefer-import-meta'?: Linter.RuleEntry<[]> + /** + * Enforce consistent line breaks after opening and before closing braces + * @see https://eslint.org/docs/latest/rules/object-curly-newline + * @deprecated + */ + 'object-curly-newline'?: Linter.RuleEntry + /** + * Enforce consistent spacing inside braces + * @see https://eslint.org/docs/latest/rules/object-curly-spacing + * @deprecated + */ + 'object-curly-spacing'?: Linter.RuleEntry + /** + * Enforce placing object properties on separate lines + * @see https://eslint.org/docs/latest/rules/object-property-newline + * @deprecated + */ + 'object-property-newline'?: Linter.RuleEntry + /** + * Require or disallow method and property shorthand syntax for object literals + * @see https://eslint.org/docs/latest/rules/object-shorthand + */ + 'object-shorthand'?: Linter.RuleEntry + /** + * Enforce variables to be declared either together or separately in functions + * @see https://eslint.org/docs/latest/rules/one-var + */ + 'one-var'?: Linter.RuleEntry + /** + * Require or disallow newlines around variable declarations + * @see https://eslint.org/docs/latest/rules/one-var-declaration-per-line + * @deprecated + */ + 'one-var-declaration-per-line'?: Linter.RuleEntry + /** + * Require or disallow assignment operator shorthand where possible + * @see https://eslint.org/docs/latest/rules/operator-assignment + */ + 'operator-assignment'?: Linter.RuleEntry + /** + * Enforce consistent linebreak style for operators + * @see https://eslint.org/docs/latest/rules/operator-linebreak + * @deprecated + */ + 'operator-linebreak'?: Linter.RuleEntry + /** + * Require or disallow padding within blocks + * @see https://eslint.org/docs/latest/rules/padded-blocks + * @deprecated + */ + 'padded-blocks'?: Linter.RuleEntry + /** + * Require or disallow padding lines between statements + * @see https://eslint.org/docs/latest/rules/padding-line-between-statements + * @deprecated + */ + 'padding-line-between-statements'?: Linter.RuleEntry + /** + * Enforce sorted arrays before include method. + * @see https://perfectionist.dev/rules/sort-array-includes + */ + 'perfectionist/sort-array-includes'?: Linter.RuleEntry + /** + * Enforce sorted classes. + * @see https://perfectionist.dev/rules/sort-classes + */ + 'perfectionist/sort-classes'?: Linter.RuleEntry + /** + * Enforce sorted decorators. + * @see https://perfectionist.dev/rules/sort-decorators + */ + 'perfectionist/sort-decorators'?: Linter.RuleEntry + /** + * Enforce sorted TypeScript enums. + * @see https://perfectionist.dev/rules/sort-enums + */ + 'perfectionist/sort-enums'?: Linter.RuleEntry + /** + * Enforce sorted export attributes. + * @see https://perfectionist.dev/rules/sort-export-attributes + */ + 'perfectionist/sort-export-attributes'?: Linter.RuleEntry + /** + * Enforce sorted exports. + * @see https://perfectionist.dev/rules/sort-exports + */ + 'perfectionist/sort-exports'?: Linter.RuleEntry + /** + * Enforce sorted heritage clauses. + * @see https://perfectionist.dev/rules/sort-heritage-clauses + */ + 'perfectionist/sort-heritage-clauses'?: Linter.RuleEntry + /** + * Enforce sorted import attributes. + * @see https://perfectionist.dev/rules/sort-import-attributes + */ + 'perfectionist/sort-import-attributes'?: Linter.RuleEntry + /** + * Enforce sorted imports. + * @see https://perfectionist.dev/rules/sort-imports + */ + 'perfectionist/sort-imports'?: Linter.RuleEntry + /** + * Enforce sorted interface properties. + * @see https://perfectionist.dev/rules/sort-interfaces + */ + 'perfectionist/sort-interfaces'?: Linter.RuleEntry + /** + * Enforce sorted intersection types. + * @see https://perfectionist.dev/rules/sort-intersection-types + */ + 'perfectionist/sort-intersection-types'?: Linter.RuleEntry + /** + * Enforce sorted JSX props. + * @see https://perfectionist.dev/rules/sort-jsx-props + */ + 'perfectionist/sort-jsx-props'?: Linter.RuleEntry + /** + * Enforce sorted Map elements. + * @see https://perfectionist.dev/rules/sort-maps + */ + 'perfectionist/sort-maps'?: Linter.RuleEntry + /** + * Enforce sorted modules. + * @see https://perfectionist.dev/rules/sort-modules + */ + 'perfectionist/sort-modules'?: Linter.RuleEntry + /** + * Enforce sorted named exports. + * @see https://perfectionist.dev/rules/sort-named-exports + */ + 'perfectionist/sort-named-exports'?: Linter.RuleEntry + /** + * Enforce sorted named imports. + * @see https://perfectionist.dev/rules/sort-named-imports + */ + 'perfectionist/sort-named-imports'?: Linter.RuleEntry + /** + * Enforce sorted object types. + * @see https://perfectionist.dev/rules/sort-object-types + */ + 'perfectionist/sort-object-types'?: Linter.RuleEntry + /** + * Enforce sorted objects. + * @see https://perfectionist.dev/rules/sort-objects + */ + 'perfectionist/sort-objects'?: Linter.RuleEntry + /** + * Enforce sorted sets. + * @see https://perfectionist.dev/rules/sort-sets + */ + 'perfectionist/sort-sets'?: Linter.RuleEntry + /** + * Enforce sorted switch cases. + * @see https://perfectionist.dev/rules/sort-switch-case + */ + 'perfectionist/sort-switch-case'?: Linter.RuleEntry + /** + * Enforce sorted union types. + * @see https://perfectionist.dev/rules/sort-union-types + */ + 'perfectionist/sort-union-types'?: Linter.RuleEntry + /** + * Enforce sorted variable declarations. + * @see https://perfectionist.dev/rules/sort-variable-declarations + */ + 'perfectionist/sort-variable-declarations'?: Linter.RuleEntry + /** + * Require using arrow functions for callbacks + * @see https://eslint.org/docs/latest/rules/prefer-arrow-callback + */ + 'prefer-arrow-callback'?: Linter.RuleEntry + /** + * Require `const` declarations for variables that are never reassigned after declared + * @see https://eslint.org/docs/latest/rules/prefer-const + */ + 'prefer-const'?: Linter.RuleEntry + /** + * Require destructuring from arrays and/or objects + * @see https://eslint.org/docs/latest/rules/prefer-destructuring + */ + 'prefer-destructuring'?: Linter.RuleEntry + /** + * Disallow the use of `Math.pow` in favor of the `**` operator + * @see https://eslint.org/docs/latest/rules/prefer-exponentiation-operator + */ + 'prefer-exponentiation-operator'?: Linter.RuleEntry<[]> + /** + * Enforce using named capture group in regular expression + * @see https://eslint.org/docs/latest/rules/prefer-named-capture-group + */ + 'prefer-named-capture-group'?: 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 + */ + 'prefer-numeric-literals'?: Linter.RuleEntry<[]> + /** + * Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()` + * @see https://eslint.org/docs/latest/rules/prefer-object-has-own + */ + 'prefer-object-has-own'?: 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 + */ + 'prefer-object-spread'?: Linter.RuleEntry<[]> + /** + * Require using Error objects as Promise rejection reasons + * @see https://eslint.org/docs/latest/rules/prefer-promise-reject-errors + */ + 'prefer-promise-reject-errors'?: Linter.RuleEntry + /** + * Require `Reflect` methods where applicable + * @see https://eslint.org/docs/latest/rules/prefer-reflect + * @deprecated + */ + 'prefer-reflect'?: Linter.RuleEntry + /** + * Disallow use of the `RegExp` constructor in favor of regular expression literals + * @see https://eslint.org/docs/latest/rules/prefer-regex-literals + */ + 'prefer-regex-literals'?: Linter.RuleEntry + /** + * Require rest parameters instead of `arguments` + * @see https://eslint.org/docs/latest/rules/prefer-rest-params + */ + 'prefer-rest-params'?: Linter.RuleEntry<[]> + /** + * Require spread operators instead of `.apply()` + * @see https://eslint.org/docs/latest/rules/prefer-spread + */ + 'prefer-spread'?: Linter.RuleEntry<[]> + /** + * Require template literals instead of string concatenation + * @see https://eslint.org/docs/latest/rules/prefer-template + */ + 'prefer-template'?: Linter.RuleEntry<[]> + /** + * Disallow losing originally caught error when re-throwing custom errors + * @see https://eslint.org/docs/latest/rules/preserve-caught-error + */ + 'preserve-caught-error'?: Linter.RuleEntry + /** + * Require quotes around object literal property names + * @see https://eslint.org/docs/latest/rules/quote-props + * @deprecated + */ + 'quote-props'?: Linter.RuleEntry + /** + * Enforce the consistent use of either backticks, double, or single quotes + * @see https://eslint.org/docs/latest/rules/quotes + * @deprecated + */ + 'quotes'?: Linter.RuleEntry + /** + * Enforce the consistent use of the radix argument when using `parseInt()` + * @see https://eslint.org/docs/latest/rules/radix + */ + 'radix'?: Linter.RuleEntry + /** + * disallow confusing quantifiers + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/confusing-quantifier.html + */ + 'regexp/confusing-quantifier'?: Linter.RuleEntry<[]> + /** + * enforce consistent escaping of control characters + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/control-character-escape.html + */ + 'regexp/control-character-escape'?: Linter.RuleEntry<[]> + /** + * enforce single grapheme in string literal + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/grapheme-string-literal.html + */ + 'regexp/grapheme-string-literal'?: Linter.RuleEntry<[]> + /** + * enforce consistent usage of hexadecimal escape + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/hexadecimal-escape.html + */ + 'regexp/hexadecimal-escape'?: Linter.RuleEntry + /** + * enforce into your favorite case + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/letter-case.html + */ + 'regexp/letter-case'?: Linter.RuleEntry + /** + * enforce match any character style + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/match-any.html + */ + 'regexp/match-any'?: Linter.RuleEntry + /** + * enforce use of escapes on negation + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/negation.html + */ + 'regexp/negation'?: Linter.RuleEntry<[]> + /** + * disallow elements that contradict assertions + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-contradiction-with-assertion.html + */ + 'regexp/no-contradiction-with-assertion'?: Linter.RuleEntry<[]> + /** + * disallow control characters + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-control-character.html + */ + 'regexp/no-control-character'?: Linter.RuleEntry<[]> + /** + * disallow duplicate characters in the RegExp character class + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-dupe-characters-character-class.html + */ + 'regexp/no-dupe-characters-character-class'?: Linter.RuleEntry<[]> + /** + * disallow duplicate disjunctions + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-dupe-disjunctions.html + */ + 'regexp/no-dupe-disjunctions'?: Linter.RuleEntry + /** + * disallow alternatives without elements + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-alternative.html + */ + 'regexp/no-empty-alternative'?: Linter.RuleEntry<[]> + /** + * disallow capturing group that captures empty. + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-capturing-group.html + */ + 'regexp/no-empty-capturing-group'?: Linter.RuleEntry<[]> + /** + * disallow character classes that match no characters + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-character-class.html + */ + 'regexp/no-empty-character-class'?: Linter.RuleEntry<[]> + /** + * disallow empty group + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-group.html + */ + 'regexp/no-empty-group'?: Linter.RuleEntry<[]> + /** + * disallow empty lookahead assertion or empty lookbehind assertion + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-lookarounds-assertion.html + */ + 'regexp/no-empty-lookarounds-assertion'?: Linter.RuleEntry<[]> + /** + * disallow empty string literals in character classes + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-string-literal.html + */ + 'regexp/no-empty-string-literal'?: Linter.RuleEntry<[]> + /** + * disallow escape backspace (`[\b]`) + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-escape-backspace.html + */ + 'regexp/no-escape-backspace'?: Linter.RuleEntry<[]> + /** + * disallow unnecessary nested lookaround assertions + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-extra-lookaround-assertions.html + */ + 'regexp/no-extra-lookaround-assertions'?: Linter.RuleEntry<[]> + /** + * disallow invalid regular expression strings in `RegExp` constructors + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-invalid-regexp.html + */ + 'regexp/no-invalid-regexp'?: Linter.RuleEntry<[]> + /** + * disallow invisible raw character + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-invisible-character.html + */ + 'regexp/no-invisible-character'?: Linter.RuleEntry<[]> + /** + * disallow lazy quantifiers at the end of an expression + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-lazy-ends.html + */ + 'regexp/no-lazy-ends'?: Linter.RuleEntry + /** + * disallow legacy RegExp features + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-legacy-features.html + */ + 'regexp/no-legacy-features'?: Linter.RuleEntry + /** + * disallow capturing groups that do not behave as one would expect + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-misleading-capturing-group.html + */ + 'regexp/no-misleading-capturing-group'?: Linter.RuleEntry + /** + * disallow multi-code-point characters in character classes and quantifiers + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-misleading-unicode-character.html + */ + 'regexp/no-misleading-unicode-character'?: Linter.RuleEntry + /** + * disallow missing `g` flag in patterns used in `String#matchAll` and `String#replaceAll` + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-missing-g-flag.html + */ + 'regexp/no-missing-g-flag'?: Linter.RuleEntry + /** + * disallow non-standard flags + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-non-standard-flag.html + */ + 'regexp/no-non-standard-flag'?: Linter.RuleEntry<[]> + /** + * disallow obscure character ranges + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-obscure-range.html + */ + 'regexp/no-obscure-range'?: Linter.RuleEntry + /** + * disallow octal escape sequence + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-octal.html + */ + 'regexp/no-octal'?: Linter.RuleEntry<[]> + /** + * disallow optional assertions + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-optional-assertion.html + */ + 'regexp/no-optional-assertion'?: Linter.RuleEntry<[]> + /** + * disallow backreferences that reference a group that might not be matched + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-potentially-useless-backreference.html + */ + 'regexp/no-potentially-useless-backreference'?: Linter.RuleEntry<[]> + /** + * disallow standalone backslashes (`\`) + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-standalone-backslash.html + */ + 'regexp/no-standalone-backslash'?: Linter.RuleEntry<[]> + /** + * disallow exponential and polynomial backtracking + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-super-linear-backtracking.html + */ + 'regexp/no-super-linear-backtracking'?: Linter.RuleEntry + /** + * disallow quantifiers that cause quadratic moves + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-super-linear-move.html + */ + 'regexp/no-super-linear-move'?: Linter.RuleEntry + /** + * disallow trivially nested assertions + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-trivially-nested-assertion.html + */ + 'regexp/no-trivially-nested-assertion'?: Linter.RuleEntry<[]> + /** + * disallow nested quantifiers that can be rewritten as one quantifier + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-trivially-nested-quantifier.html + */ + 'regexp/no-trivially-nested-quantifier'?: Linter.RuleEntry<[]> + /** + * disallow unused capturing group + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-unused-capturing-group.html + */ + 'regexp/no-unused-capturing-group'?: Linter.RuleEntry + /** + * disallow assertions that are known to always accept (or reject) + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-assertions.html + */ + 'regexp/no-useless-assertions'?: Linter.RuleEntry<[]> + /** + * disallow useless backreferences in regular expressions + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-backreference.html + */ + 'regexp/no-useless-backreference'?: Linter.RuleEntry<[]> + /** + * disallow character class with one character + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-character-class.html + */ + 'regexp/no-useless-character-class'?: Linter.RuleEntry + /** + * disallow useless `$` replacements in replacement string + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-dollar-replacements.html + */ + 'regexp/no-useless-dollar-replacements'?: Linter.RuleEntry<[]> + /** + * disallow unnecessary escape characters in RegExp + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-escape.html + */ + 'regexp/no-useless-escape'?: Linter.RuleEntry<[]> + /** + * disallow unnecessary regex flags + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-flag.html + */ + 'regexp/no-useless-flag'?: Linter.RuleEntry + /** + * disallow unnecessarily non-greedy quantifiers + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-lazy.html + */ + 'regexp/no-useless-lazy'?: Linter.RuleEntry<[]> + /** + * disallow unnecessary non-capturing group + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-non-capturing-group.html + */ + 'regexp/no-useless-non-capturing-group'?: Linter.RuleEntry + /** + * disallow quantifiers that can be removed + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-quantifier.html + */ + 'regexp/no-useless-quantifier'?: Linter.RuleEntry<[]> + /** + * disallow unnecessary character ranges + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-range.html + */ + 'regexp/no-useless-range'?: Linter.RuleEntry<[]> + /** + * disallow unnecessary elements in expression character classes + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-set-operand.html + */ + 'regexp/no-useless-set-operand'?: Linter.RuleEntry<[]> + /** + * disallow string disjunction of single characters in `\q{...}` + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-string-literal.html + */ + 'regexp/no-useless-string-literal'?: Linter.RuleEntry<[]> + /** + * disallow unnecessary `{n,m}` quantifier + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-two-nums-quantifier.html + */ + 'regexp/no-useless-two-nums-quantifier'?: Linter.RuleEntry<[]> + /** + * disallow quantifiers with a maximum of zero + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-zero-quantifier.html + */ + 'regexp/no-zero-quantifier'?: Linter.RuleEntry<[]> + /** + * disallow the alternatives of lookarounds that end with a non-constant quantifier + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/optimal-lookaround-quantifier.html + */ + 'regexp/optimal-lookaround-quantifier'?: Linter.RuleEntry<[]> + /** + * require optimal quantifiers for concatenated quantifiers + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/optimal-quantifier-concatenation.html + */ + 'regexp/optimal-quantifier-concatenation'?: Linter.RuleEntry + /** + * enforce using character class + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-character-class.html + */ + 'regexp/prefer-character-class'?: Linter.RuleEntry + /** + * enforce using `\d` + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-d.html + */ + 'regexp/prefer-d'?: Linter.RuleEntry + /** + * enforces escape of replacement `$` character (`$$`). + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-escape-replacement-dollar-char.html + */ + 'regexp/prefer-escape-replacement-dollar-char'?: Linter.RuleEntry<[]> + /** + * prefer lookarounds over capturing group that do not replace + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-lookaround.html + */ + 'regexp/prefer-lookaround'?: Linter.RuleEntry + /** + * enforce using named backreferences + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-named-backreference.html + */ + 'regexp/prefer-named-backreference'?: Linter.RuleEntry<[]> + /** + * enforce using named capture groups + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-named-capture-group.html + */ + 'regexp/prefer-named-capture-group'?: Linter.RuleEntry<[]> + /** + * enforce using named replacement + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-named-replacement.html + */ + 'regexp/prefer-named-replacement'?: Linter.RuleEntry + /** + * enforce using `+` quantifier + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-plus-quantifier.html + */ + 'regexp/prefer-plus-quantifier'?: Linter.RuleEntry<[]> + /** + * prefer predefined assertion over equivalent lookarounds + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-predefined-assertion.html + */ + 'regexp/prefer-predefined-assertion'?: Linter.RuleEntry<[]> + /** + * enforce using quantifier + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-quantifier.html + */ + 'regexp/prefer-quantifier'?: Linter.RuleEntry + /** + * enforce using `?` quantifier + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-question-quantifier.html + */ + 'regexp/prefer-question-quantifier'?: Linter.RuleEntry<[]> + /** + * enforce using character class range + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-range.html + */ + 'regexp/prefer-range'?: Linter.RuleEntry + /** + * enforce that `RegExp#exec` is used instead of `String#match` if no global flag is provided + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-regexp-exec.html + */ + 'regexp/prefer-regexp-exec'?: Linter.RuleEntry<[]> + /** + * enforce that `RegExp#test` is used instead of `String#match` and `RegExp#exec` + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-regexp-test.html + */ + 'regexp/prefer-regexp-test'?: Linter.RuleEntry<[]> + /** + * enforce using result array `groups` + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-result-array-groups.html + */ + 'regexp/prefer-result-array-groups'?: Linter.RuleEntry + /** + * prefer character class set operations instead of lookarounds + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-set-operation.html + */ + 'regexp/prefer-set-operation'?: Linter.RuleEntry<[]> + /** + * enforce using `*` quantifier + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-star-quantifier.html + */ + 'regexp/prefer-star-quantifier'?: Linter.RuleEntry<[]> + /** + * enforce use of unicode codepoint escapes + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-unicode-codepoint-escapes.html + */ + 'regexp/prefer-unicode-codepoint-escapes'?: Linter.RuleEntry<[]> + /** + * enforce using `\w` + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-w.html + */ + 'regexp/prefer-w'?: Linter.RuleEntry<[]> + /** + * enforce the use of the `u` flag + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/require-unicode-regexp.html + */ + 'regexp/require-unicode-regexp'?: Linter.RuleEntry<[]> + /** + * enforce the use of the `v` flag + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/require-unicode-sets-regexp.html + */ + 'regexp/require-unicode-sets-regexp'?: Linter.RuleEntry<[]> + /** + * require simplify set operations + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/simplify-set-operations.html + */ + 'regexp/simplify-set-operations'?: Linter.RuleEntry<[]> + /** + * sort alternatives if order doesn't matter + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/sort-alternatives.html + */ + 'regexp/sort-alternatives'?: Linter.RuleEntry<[]> + /** + * enforces elements order in character class + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/sort-character-class-elements.html + */ + 'regexp/sort-character-class-elements'?: Linter.RuleEntry + /** + * require regex flags to be sorted + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/sort-flags.html + */ + 'regexp/sort-flags'?: Linter.RuleEntry<[]> + /** + * disallow not strictly valid regular expressions + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/strict.html + */ + 'regexp/strict'?: Linter.RuleEntry<[]> + /** + * enforce consistent usage of unicode escape or unicode codepoint escape + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/unicode-escape.html + */ + 'regexp/unicode-escape'?: Linter.RuleEntry + /** + * enforce consistent naming of unicode properties + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/unicode-property.html + */ + 'regexp/unicode-property'?: Linter.RuleEntry + /** + * use the `i` flag if it simplifies the pattern + * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/use-ignore-case.html + */ + 'regexp/use-ignore-case'?: Linter.RuleEntry<[]> + /** + * Disallow assignments that can lead to race conditions due to usage of `await` or `yield` + * @see https://eslint.org/docs/latest/rules/require-atomic-updates + */ + 'require-atomic-updates'?: Linter.RuleEntry + /** + * Disallow async functions which have no `await` expression + * @see https://eslint.org/docs/latest/rules/require-await + */ + 'require-await'?: Linter.RuleEntry<[]> + /** + * Enforce the use of `u` or `v` flag on regular expressions + * @see https://eslint.org/docs/latest/rules/require-unicode-regexp + */ + 'require-unicode-regexp'?: Linter.RuleEntry + /** + * Require generator functions to contain `yield` + * @see https://eslint.org/docs/latest/rules/require-yield + */ + 'require-yield'?: Linter.RuleEntry<[]> + /** + * Enforce spacing between rest and spread operators and their expressions + * @see https://eslint.org/docs/latest/rules/rest-spread-spacing + * @deprecated + */ + 'rest-spread-spacing'?: Linter.RuleEntry + /** + * Require or disallow semicolons instead of ASI + * @see https://eslint.org/docs/latest/rules/semi + * @deprecated + */ + 'semi'?: Linter.RuleEntry + /** + * Enforce consistent spacing before and after semicolons + * @see https://eslint.org/docs/latest/rules/semi-spacing + * @deprecated + */ + 'semi-spacing'?: Linter.RuleEntry + /** + * Enforce location of semicolons + * @see https://eslint.org/docs/latest/rules/semi-style + * @deprecated + */ + 'semi-style'?: Linter.RuleEntry + /** + * Enforce sorted `import` declarations within modules + * @see https://eslint.org/docs/latest/rules/sort-imports + */ + 'sort-imports'?: Linter.RuleEntry + /** + * Require object keys to be sorted + * @see https://eslint.org/docs/latest/rules/sort-keys + */ + 'sort-keys'?: Linter.RuleEntry + /** + * Require variables within the same declaration block to be sorted + * @see https://eslint.org/docs/latest/rules/sort-vars + */ + 'sort-vars'?: Linter.RuleEntry + /** + * Enforce consistent spacing before blocks + * @see https://eslint.org/docs/latest/rules/space-before-blocks + * @deprecated + */ + 'space-before-blocks'?: Linter.RuleEntry + /** + * Enforce consistent spacing before `function` definition opening parenthesis + * @see https://eslint.org/docs/latest/rules/space-before-function-paren + * @deprecated + */ + 'space-before-function-paren'?: Linter.RuleEntry + /** + * Enforce consistent spacing inside parentheses + * @see https://eslint.org/docs/latest/rules/space-in-parens + * @deprecated + */ + 'space-in-parens'?: Linter.RuleEntry + /** + * Require spacing around infix operators + * @see https://eslint.org/docs/latest/rules/space-infix-ops + * @deprecated + */ + 'space-infix-ops'?: Linter.RuleEntry + /** + * Enforce consistent spacing before or after unary operators + * @see https://eslint.org/docs/latest/rules/space-unary-ops + * @deprecated + */ + 'space-unary-ops'?: Linter.RuleEntry + /** + * Enforce consistent spacing after the `//` or `/*` in a comment + * @see https://eslint.org/docs/latest/rules/spaced-comment + * @deprecated + */ + 'spaced-comment'?: Linter.RuleEntry + /** + * Require or disallow strict mode directives + * @see https://eslint.org/docs/latest/rules/strict + */ + 'strict'?: Linter.RuleEntry + /** + * Enforce spacing around colons of switch statements + * @see https://eslint.org/docs/latest/rules/switch-colon-spacing + * @deprecated + */ + 'switch-colon-spacing'?: Linter.RuleEntry + /** + * Require symbol descriptions + * @see https://eslint.org/docs/latest/rules/symbol-description + */ + 'symbol-description'?: Linter.RuleEntry<[]> + /** + * Require or disallow spacing around embedded expressions of template strings + * @see https://eslint.org/docs/latest/rules/template-curly-spacing + * @deprecated + */ + 'template-curly-spacing'?: Linter.RuleEntry + /** + * Require or disallow spacing between template tags and their literals + * @see https://eslint.org/docs/latest/rules/template-tag-spacing + * @deprecated + */ + 'template-tag-spacing'?: Linter.RuleEntry + /** + * Require or disallow Unicode byte order mark (BOM) + * @see https://eslint.org/docs/latest/rules/unicode-bom + */ + 'unicode-bom'?: Linter.RuleEntry + /** + * Improve regexes by making them shorter, consistent, and safer. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/better-regex.md + */ + 'unicorn/better-regex'?: Linter.RuleEntry + /** + * Enforce a specific parameter name in catch clauses. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/catch-error-name.md + */ + 'unicorn/catch-error-name'?: Linter.RuleEntry + /** + * Enforce consistent assertion style with `node:assert`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-assert.md + */ + 'unicorn/consistent-assert'?: Linter.RuleEntry<[]> + /** + * Prefer passing `Date` directly to the constructor when cloning. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-date-clone.md + */ + 'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]> + /** + * Use destructured variables over properties. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-destructuring.md + */ + 'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]> + /** + * Prefer consistent types when spreading a ternary in an array literal. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-empty-array-spread.md + */ + 'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]> + /** + * Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-existence-index-check.md + */ + 'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]> + /** + * Move function definitions to the highest possible scope. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-function-scoping.md + */ + 'unicorn/consistent-function-scoping'?: Linter.RuleEntry + /** + * Enforce correct `Error` subclassing. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/custom-error-definition.md + */ + 'unicorn/custom-error-definition'?: Linter.RuleEntry<[]> + /** + * Enforce no spaces between braces. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/empty-brace-spaces.md + */ + 'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]> + /** + * Enforce passing a `message` value when creating a built-in error. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/error-message.md + */ + 'unicorn/error-message'?: Linter.RuleEntry<[]> + /** + * Require escape sequences to use uppercase or lowercase values. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/escape-case.md + */ + 'unicorn/escape-case'?: Linter.RuleEntry + /** + * Add expiration conditions to TODO comments. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/expiring-todo-comments.md + */ + 'unicorn/expiring-todo-comments'?: Linter.RuleEntry + /** + * Enforce explicitly comparing the `length` or `size` property of a value. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/explicit-length-check.md + */ + 'unicorn/explicit-length-check'?: Linter.RuleEntry + /** + * Enforce a case style for filenames. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/filename-case.md + */ + 'unicorn/filename-case'?: Linter.RuleEntry + /** + * Enforce specific import styles per module. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/import-style.md + */ + 'unicorn/import-style'?: Linter.RuleEntry + /** + * Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/new-for-builtins.md + */ + 'unicorn/new-for-builtins'?: Linter.RuleEntry<[]> + /** + * Enforce specifying rules to disable in `eslint-disable` comments. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-abusive-eslint-disable.md + */ + 'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]> + /** + * Disallow recursive access to `this` within getters and setters. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-accessor-recursion.md + */ + 'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]> + /** + * Disallow anonymous functions and classes as the default export. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-anonymous-default-export.md + */ + 'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]> + /** + * Prevent passing a function reference directly to iterator methods. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-callback-reference.md + */ + 'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]> + /** + * Prefer `for…of` over the `forEach` method. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-for-each.md + */ + 'unicorn/no-array-for-each'?: Linter.RuleEntry<[]> + /** + * Disallow using the `this` argument in array methods. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-method-this-argument.md + */ + 'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]> + /** + * Replaced by `unicorn/prefer-single-call` which covers more cases. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-array-push-push + * @deprecated + */ + 'unicorn/no-array-push-push'?: Linter.RuleEntry<[]> + /** + * Disallow `Array#reduce()` and `Array#reduceRight()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reduce.md + */ + 'unicorn/no-array-reduce'?: Linter.RuleEntry + /** + * Prefer `Array#toReversed()` over `Array#reverse()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reverse.md + */ + 'unicorn/no-array-reverse'?: Linter.RuleEntry + /** + * Prefer `Array#toSorted()` over `Array#sort()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-sort.md + */ + 'unicorn/no-array-sort'?: Linter.RuleEntry + /** + * Disallow member access from await expression. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-expression-member.md + */ + 'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]> + /** + * Disallow using `await` in `Promise` method parameters. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-in-promise-methods.md + */ + 'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]> + /** + * Do not use leading/trailing space between `console.log` parameters. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-console-spaces.md + */ + 'unicorn/no-console-spaces'?: Linter.RuleEntry<[]> + /** + * Do not use `document.cookie` directly. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-document-cookie.md + */ + 'unicorn/no-document-cookie'?: Linter.RuleEntry<[]> + /** + * Disallow empty files. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-empty-file.md + */ + 'unicorn/no-empty-file'?: Linter.RuleEntry<[]> + /** + * Do not use a `for` loop that can be replaced with a `for-of` loop. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-for-loop.md + */ + 'unicorn/no-for-loop'?: Linter.RuleEntry<[]> + /** + * Enforce the use of Unicode escapes instead of hexadecimal escapes. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-hex-escape.md + */ + 'unicorn/no-hex-escape'?: Linter.RuleEntry<[]> + /** + * Disallow immediate mutation after variable assignment. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-immediate-mutation.md + */ + 'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]> + /** + * Replaced by `unicorn/no-instanceof-builtins` which covers more cases. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-instanceof-array + * @deprecated + */ + 'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]> + /** + * Disallow `instanceof` with built-in objects + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-instanceof-builtins.md + */ + 'unicorn/no-instanceof-builtins'?: Linter.RuleEntry + /** + * Disallow invalid options in `fetch()` and `new Request()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-fetch-options.md + */ + 'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]> + /** + * Prevent calling `EventTarget#removeEventListener()` with the result of an expression. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-remove-event-listener.md + */ + 'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]> + /** + * Disallow identifiers starting with `new` or `class`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-keyword-prefix.md + */ + 'unicorn/no-keyword-prefix'?: Linter.RuleEntry + /** + * Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-length-as-slice-end + * @deprecated + */ + 'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]> + /** + * Disallow `if` statements as the only statement in `if` blocks without `else`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-lonely-if.md + */ + 'unicorn/no-lonely-if'?: Linter.RuleEntry<[]> + /** + * Disallow a magic number as the `depth` argument in `Array#flat(…).` + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-magic-array-flat-depth.md + */ + 'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]> + /** + * Disallow named usage of default import and export. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-named-default.md + */ + 'unicorn/no-named-default'?: Linter.RuleEntry<[]> + /** + * Disallow negated conditions. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negated-condition.md + */ + 'unicorn/no-negated-condition'?: Linter.RuleEntry<[]> + /** + * Disallow negated expression in equality check. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negation-in-equality-check.md + */ + 'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]> + /** + * Disallow nested ternary expressions. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-nested-ternary.md + */ + 'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]> + /** + * Disallow `new Array()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-array.md + */ + 'unicorn/no-new-array'?: Linter.RuleEntry<[]> + /** + * Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-buffer.md + */ + 'unicorn/no-new-buffer'?: Linter.RuleEntry<[]> + /** + * Disallow the use of the `null` literal. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-null.md + */ + 'unicorn/no-null'?: Linter.RuleEntry + /** + * Disallow the use of objects as default parameters. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-object-as-default-parameter.md + */ + 'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]> + /** + * Disallow `process.exit()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-process-exit.md + */ + 'unicorn/no-process-exit'?: Linter.RuleEntry<[]> + /** + * Disallow passing single-element arrays to `Promise` methods. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-single-promise-in-promise-methods.md + */ + 'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]> + /** + * Disallow classes that only have static members. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-static-only-class.md + */ + 'unicorn/no-static-only-class'?: Linter.RuleEntry<[]> + /** + * Disallow `then` property. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-thenable.md + */ + 'unicorn/no-thenable'?: Linter.RuleEntry<[]> + /** + * Disallow assigning `this` to a variable. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-this-assignment.md + */ + 'unicorn/no-this-assignment'?: Linter.RuleEntry<[]> + /** + * Disallow comparing `undefined` using `typeof`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-typeof-undefined.md + */ + 'unicorn/no-typeof-undefined'?: Linter.RuleEntry + /** + * Disallow using `1` as the `depth` argument of `Array#flat()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-flat-depth.md + */ + 'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]> + /** + * Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-splice-count.md + */ + 'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]> + /** + * Disallow awaiting non-promise values. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-await.md + */ + 'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]> + /** + * Enforce the use of built-in methods instead of unnecessary polyfills. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-polyfills.md + */ + 'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry + /** + * Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-slice-end.md + */ + 'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]> + /** + * Disallow unreadable array destructuring. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-array-destructuring.md + */ + 'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]> + /** + * Disallow unreadable IIFEs. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-iife.md + */ + 'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]> + /** + * Disallow unused object properties. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unused-properties.md + */ + 'unicorn/no-unused-properties'?: Linter.RuleEntry<[]> + /** + * Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-collection-argument.md + */ + 'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]> + /** + * Disallow unnecessary `Error.captureStackTrace(…)`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-error-capture-stack-trace.md + */ + 'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]> + /** + * Disallow useless fallback when spreading in object literals. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-fallback-in-spread.md + */ + 'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]> + /** + * Disallow useless array length check. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-length-check.md + */ + 'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]> + /** + * Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-promise-resolve-reject.md + */ + 'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]> + /** + * Disallow unnecessary spread. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-spread.md + */ + 'unicorn/no-useless-spread'?: Linter.RuleEntry<[]> + /** + * Disallow useless case in switch statements. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-switch-case.md + */ + 'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]> + /** + * Disallow useless `undefined`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-undefined.md + */ + 'unicorn/no-useless-undefined'?: Linter.RuleEntry + /** + * Disallow number literals with zero fractions or dangling dots. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-zero-fractions.md + */ + 'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]> + /** + * Enforce proper case for numeric literals. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/number-literal-case.md + */ + 'unicorn/number-literal-case'?: Linter.RuleEntry + /** + * Enforce the style of numeric separators by correctly grouping digits. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/numeric-separators-style.md + */ + 'unicorn/numeric-separators-style'?: Linter.RuleEntry + /** + * Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-add-event-listener.md + */ + 'unicorn/prefer-add-event-listener'?: Linter.RuleEntry + /** + * Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-find.md + */ + 'unicorn/prefer-array-find'?: Linter.RuleEntry + /** + * Prefer `Array#flat()` over legacy techniques to flatten arrays. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat.md + */ + 'unicorn/prefer-array-flat'?: Linter.RuleEntry + /** + * Prefer `.flatMap(…)` over `.map(…).flat()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat-map.md + */ + 'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]> + /** + * Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-index-of.md + */ + 'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]> + /** + * Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-some.md + */ + 'unicorn/prefer-array-some'?: Linter.RuleEntry<[]> + /** + * Prefer `.at()` method for index access and `String#charAt()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-at.md + */ + 'unicorn/prefer-at'?: Linter.RuleEntry + /** + * Prefer `BigInt` literals over the constructor. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-bigint-literals.md + */ + 'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]> + /** + * Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-blob-reading-methods.md + */ + 'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]> + /** + * Prefer class field declarations over `this` assignments in constructors. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-class-fields.md + */ + 'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]> + /** + * Prefer using `Element#classList.toggle()` to toggle class names. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-classlist-toggle.md + */ + 'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]> + /** + * Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-code-point.md + */ + 'unicorn/prefer-code-point'?: Linter.RuleEntry<[]> + /** + * Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-date-now.md + */ + 'unicorn/prefer-date-now'?: Linter.RuleEntry<[]> + /** + * Prefer default parameters over reassignment. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-default-parameters.md + */ + 'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]> + /** + * Prefer `Node#append()` over `Node#appendChild()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-append.md + */ + 'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]> + /** + * Prefer using `.dataset` on DOM elements over calling attribute methods. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-dataset.md + */ + 'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]> + /** + * Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-remove.md + */ + 'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]> + /** + * Prefer `.textContent` over `.innerText`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-text-content.md + */ + 'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]> + /** + * Prefer `EventTarget` over `EventEmitter`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-event-target.md + */ + 'unicorn/prefer-event-target'?: Linter.RuleEntry<[]> + /** + * Prefer `export…from` when re-exporting. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-export-from.md + */ + 'unicorn/prefer-export-from'?: Linter.RuleEntry + /** + * Prefer `globalThis` over `window`, `self`, and `global`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-global-this.md + */ + 'unicorn/prefer-global-this'?: Linter.RuleEntry<[]> + /** + * Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-import-meta-properties.md + */ + 'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]> + /** + * Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-includes.md + */ + 'unicorn/prefer-includes'?: Linter.RuleEntry<[]> + /** + * Prefer reading a JSON file as a buffer. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-json-parse-buffer.md + */ + 'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]> + /** + * Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-keyboard-event-key.md + */ + 'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]> + /** + * Prefer using a logical operator over a ternary. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-logical-operator-over-ternary.md + */ + 'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]> + /** + * Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-min-max.md + */ + 'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]> + /** + * Enforce the use of `Math.trunc` instead of bitwise operators. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-trunc.md + */ + 'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]> + /** + * Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-dom-apis.md + */ + 'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]> + /** + * Prefer modern `Math` APIs over legacy patterns. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-math-apis.md + */ + 'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]> + /** + * Prefer JavaScript modules (ESM) over CommonJS. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-module.md + */ + 'unicorn/prefer-module'?: Linter.RuleEntry<[]> + /** + * Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-native-coercion-functions.md + */ + 'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]> + /** + * Prefer negative index over `.length - index` when possible. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-negative-index.md + */ + 'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]> + /** + * Prefer using the `node:` protocol when importing Node.js builtin modules. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-node-protocol.md + */ + 'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]> + /** + * Prefer `Number` static properties over global ones. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-number-properties.md + */ + 'unicorn/prefer-number-properties'?: Linter.RuleEntry + /** + * Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-object-from-entries.md + */ + 'unicorn/prefer-object-from-entries'?: Linter.RuleEntry + /** + * Prefer omitting the `catch` binding parameter. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-optional-catch-binding.md + */ + 'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]> + /** + * Prefer borrowing methods from the prototype instead of the instance. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-prototype-methods.md + */ + 'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]> + /** + * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-query-selector.md + */ + 'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]> + /** + * Prefer `Reflect.apply()` over `Function#apply()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-reflect-apply.md + */ + 'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]> + /** + * Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-regexp-test.md + */ + 'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]> + /** + * Prefer `Response.json()` over `new Response(JSON.stringify())`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-response-static-json.md + */ + 'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]> + /** + * Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-has.md + */ + 'unicorn/prefer-set-has'?: Linter.RuleEntry<[]> + /** + * Prefer using `Set#size` instead of `Array#length`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-size.md + */ + 'unicorn/prefer-set-size'?: Linter.RuleEntry<[]> + /** + * Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-single-call.md + */ + 'unicorn/prefer-single-call'?: Linter.RuleEntry + /** + * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-spread.md + */ + 'unicorn/prefer-spread'?: Linter.RuleEntry<[]> + /** + * Prefer using the `String.raw` tag to avoid escaping `\`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-raw.md + */ + 'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]> + /** + * Prefer `String#replaceAll()` over regex searches with the global flag. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-replace-all.md + */ + 'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]> + /** + * Prefer `String#slice()` over `String#substr()` and `String#substring()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-slice.md + */ + 'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]> + /** + * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-starts-ends-with.md + */ + 'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]> + /** + * Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-trim-start-end.md + */ + 'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]> + /** + * Prefer using `structuredClone` to create a deep clone. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-structured-clone.md + */ + 'unicorn/prefer-structured-clone'?: Linter.RuleEntry + /** + * Prefer `switch` over multiple `else-if`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-switch.md + */ + 'unicorn/prefer-switch'?: Linter.RuleEntry + /** + * Prefer ternary expressions over simple `if-else` statements. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-ternary.md + */ + 'unicorn/prefer-ternary'?: Linter.RuleEntry + /** + * Prefer top-level await over top-level promises and async function calls. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-top-level-await.md + */ + 'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]> + /** + * Enforce throwing `TypeError` in type checking conditions. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-type-error.md + */ + 'unicorn/prefer-type-error'?: Linter.RuleEntry<[]> + /** + * Prevent abbreviations. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prevent-abbreviations.md + */ + 'unicorn/prevent-abbreviations'?: Linter.RuleEntry + /** + * Enforce consistent relative URL style. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/relative-url-style.md + */ + 'unicorn/relative-url-style'?: Linter.RuleEntry + /** + * Enforce using the separator argument with `Array#join()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-array-join-separator.md + */ + 'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]> + /** + * Require non-empty module attributes for imports and exports + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-attributes.md + */ + 'unicorn/require-module-attributes'?: Linter.RuleEntry<[]> + /** + * Require non-empty specifier list in import and export statements. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-specifiers.md + */ + 'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]> + /** + * Enforce using the digits argument with `Number#toFixed()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-number-to-fixed-digits-argument.md + */ + 'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]> + /** + * Enforce using the `targetOrigin` argument with `window.postMessage()`. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-post-message-target-origin.md + */ + 'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]> + /** + * Enforce better string content. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/string-content.md + */ + 'unicorn/string-content'?: Linter.RuleEntry + /** + * Enforce consistent brace style for `case` clauses. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/switch-case-braces.md + */ + 'unicorn/switch-case-braces'?: Linter.RuleEntry + /** + * Fix whitespace-insensitive template indentation. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/template-indent.md + */ + 'unicorn/template-indent'?: Linter.RuleEntry + /** + * Enforce consistent case for text encoding identifiers. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/text-encoding-identifier-case.md + */ + 'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry + /** + * Require `new` when creating an error. + * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/throw-new-error.md + */ + 'unicorn/throw-new-error'?: Linter.RuleEntry<[]> + /** + * Require calls to `isNaN()` when checking for `NaN` + * @see https://eslint.org/docs/latest/rules/use-isnan + */ + 'use-isnan'?: Linter.RuleEntry + /** + * Enforce comparing `typeof` expressions against valid strings + * @see https://eslint.org/docs/latest/rules/valid-typeof + */ + 'valid-typeof'?: Linter.RuleEntry + /** + * Require `var` declarations be placed at the top of their containing scope + * @see https://eslint.org/docs/latest/rules/vars-on-top + */ + 'vars-on-top'?: Linter.RuleEntry<[]> + /** + * Enforce linebreaks after opening and before closing array brackets in `