From f166a11c635748de738d19fa1065307b43f1a370 Mon Sep 17 00:00:00 2001 From: prisis Date: Thu, 9 Jan 2025 15:42:12 +0100 Subject: [PATCH] feat: more work on the configs Signed-off-by: prisis --- package.json | 4 +- packages/eslint-config/README.md | 6 +- .../__tests__/old-config-loading.test.ts | 9 +- .../eslint-config/debug-eslint.config.mjs | 2 +- packages/eslint-config/eslint.config.js | 13 + packages/eslint-config/package.json | 42 +- packages/eslint-config/packem.config.ts | 3 +- .../src/config/best-practices.ts | 1 + .../src/config/plugins/formatters.ts | 61 +- .../src/config/plugins/imports.ts | 5 +- .../eslint-config/src/config/plugins/jsdoc.ts | 19 +- .../eslint-config/src/config/plugins/jsonc.ts | 136 +- .../src/config/plugins/no-secrets.ts | 4 +- .../src/config/plugins/perfectionist.ts | 1 + .../eslint-config/src/config/plugins/react.ts | 34 +- .../src/config/plugins/tanstack-query.ts | 20 +- .../src/config/plugins/tanstack-router.ts | 20 +- .../src/config/plugins/typescript.ts | 12 +- .../src/config/plugins/unicorn.ts | 8 +- .../src/config/plugins/vitest.ts | 2 +- packages/eslint-config/src/config/style.ts | 2 +- packages/eslint-config/src/index.ts | 9 +- packages/eslint-config/src/typegen.d.ts | 39355 ++++++++++------ packages/eslint-config/src/types.ts | 9 +- .../eslint-config/src/utils/create-config.ts | 25 +- .../eslint-config/src/utils/parser-plain.ts | 2 +- pnpm-lock.yaml | 1531 +- 27 files changed, 25180 insertions(+), 16155 deletions(-) create mode 100644 packages/eslint-config/eslint.config.js diff --git a/package.json b/package.json index 84e7f3ff..1aa3d186 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "lint": "pnpm run lint:prettier && pnpm run lint:eslint", "lint:eslint": "nx run-many --target=lint:eslint --all --parallel", "lint:eslint:fix": "nx run-many --target=lint:eslint:fix --all --parallel", - "lint:fix": "pnpm run lint:prettier:fix && pnpm run lint:eslint:fix && pnpm run sort-package-json", + "lint:fix": "pnpm run lint:prettier:fix && pnpm run lint:eslint:fix", "lint:prettier": "nx run-many --target=lint:prettier --all --parallel", "lint:prettier:fix": "nx run-many --target=lint:prettier:fix --all --parallel", "lint:secrets": "secretlint **/*", @@ -71,7 +71,6 @@ "lint:styles": "stylelint", "lint:text": "textlint ./.github/ ./packages/** ./README.md ./UPGRADE.md --parallel --experimental --cache --dry-run", "lint:text:fix": "textlint ./.github/ ./packages/** ./README.md ./UPGRADE.md --parallel --experimental --fix", - "sort-package-json": "sort-package-json ./packages/**/package.json ./package.json", "test:all": "nx run-many --target=test:coverage --projects=browserslist-config-anolilab,stylelint-config,eslint-config && pnpm test:stylelint", "test:browserslist-config-anolilab": "pnpm --filter \"browserslist-config-anolilab\" run test", "test:coverage:browserslist-config-anolilab": "pnpm --filter \"browserslist-config-anolilab\" run test:coverage", @@ -111,7 +110,6 @@ "rimraf": "^6.0.1", "secretlint": "9.0.0", "semantic-release": "^24.2.0", - "sort-package-json": "^2.12.0", "stylelint": "^16.12.0", "taze": "^0.18.0", "textlint": "^14.4.2", diff --git a/packages/eslint-config/README.md b/packages/eslint-config/README.md index c106a5fe..f0a2909f 100644 --- a/packages/eslint-config/README.md +++ b/packages/eslint-config/README.md @@ -242,11 +242,11 @@ Add this property to your package.json: ```json5 { - anolilab: { + "anolilab": { "eslint-config": { // options - }, - }, + } + } } ``` diff --git a/packages/eslint-config/__tests__/old-config-loading.test.ts b/packages/eslint-config/__tests__/old-config-loading.test.ts index 5c94e765..4c93dfbf 100644 --- a/packages/eslint-config/__tests__/old-config-loading.test.ts +++ b/packages/eslint-config/__tests__/old-config-loading.test.ts @@ -3,7 +3,13 @@ import { rm } from "node:fs/promises"; import { join } from "node:path"; import { promisify } from "node:util"; -import { afterEach, beforeEach, describe, expect, it } from "vitest"; +import { + afterEach, + beforeEach, + describe, + expect, + it, +} from "vitest"; const ONE_SECOND_IN_MS = 1000; @@ -25,6 +31,7 @@ describe("integration - old config", () => { "installs & works", async () => { expect.assertions(2); + await execAsync("pnpm --ignore-workspace i", { cwd: TEST_DIR }); const { stderr, stdout } = await execAsync("pnpm exec eslint -c ./.eslintrc.js . || true", { diff --git a/packages/eslint-config/debug-eslint.config.mjs b/packages/eslint-config/debug-eslint.config.mjs index 55ddc21f..c67275e1 100644 --- a/packages/eslint-config/debug-eslint.config.mjs +++ b/packages/eslint-config/debug-eslint.config.mjs @@ -1,3 +1,3 @@ -import { createConfig } from "./dist/index.mjs" +import { createConfig } from "./dist"; export default createConfig({}); diff --git a/packages/eslint-config/eslint.config.js b/packages/eslint-config/eslint.config.js new file mode 100644 index 00000000..bac8a418 --- /dev/null +++ b/packages/eslint-config/eslint.config.js @@ -0,0 +1,13 @@ +import { createConfig } from "./dist/index.mjs"; + +export default createConfig( + { + ignores: ["eslint.config.js", "typegen.d.ts"], + }, + { + files: ["**/*.ts"], + rules: { + "no-secrets/no-secrets": "off", + }, + }, +); diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index ec81c546..8b7af636 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -76,13 +76,13 @@ "type": "module", "exports": { ".": { - "require": { - "types": "./dist/index.d.cts", - "default": "./dist/index.cjs" - }, "import": { "types": "./dist/index.d.tjs", "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" } }, "./package.json": "./package.json" @@ -98,10 +98,10 @@ } }, "files": [ - "dist", - "README.md", "CHANGELOG.md", - "LICENSE.md" + "LICENSE.md", + "README.md", + "dist" ], "scripts": { "build": "packem build --development", @@ -110,6 +110,8 @@ "clean": "rimraf node_modules dist", "debug:rules": "pnpm exec eslint-config-inspector --config ./debug-eslint.config.mjs", "lint:attw": "attw --pack", + "lint:eslint": "eslint .", + "lint:eslint:fix": "eslint . --fix", "lint:prettier": "prettier --config=.prettierrc.cjs --check .", "lint:prettier:fix": "prettier --config=.prettierrc.cjs --write .", "test": "vitest run", @@ -129,10 +131,10 @@ "@html-eslint/parser": "^0.32.0", "@stylistic/eslint-plugin": "^2.12.1", "@stylistic/eslint-plugin-ts": "^2.12.1", - "@typescript-eslint/eslint-plugin": "^8.19.0", - "@typescript-eslint/parser": "^8.19.0", - "@visulima/package": "^3.4.0", - "@visulima/tsconfig": "^1.1.4", + "@typescript-eslint/eslint-plugin": "^8.19.1", + "@typescript-eslint/parser": "^8.19.1", + "@visulima/package": "^3.4.2", + "@visulima/tsconfig": "^1.1.6", "@vitest/eslint-plugin": "^1.1.24", "confusing-browser-globals": "^1.0.11", "eslint-config-flat-gitignore": "^0.3.0", @@ -168,16 +170,16 @@ "parse-gitignore": "^2.0.0", "semver": "^7.6.3", "toml-eslint-parser": "^0.10.0", - "typescript-eslint": "^8.19.0", + "typescript-eslint": "^8.19.1", "yaml-eslint-parser": "^1.2.3" }, "devDependencies": { "@anolilab/prettier-config": "^5.0.14", "@anolilab/semantic-release-preset": "9.0.3", - "@eslint-react/eslint-plugin": "^1.23.1", - "@eslint/config-inspector": "^0.7.0", + "@eslint-react/eslint-plugin": "^1.23.2", + "@eslint/config-inspector": "^0.7.1", "@stylistic/eslint-plugin-migrate": "^2.12.1", - "@tanstack/eslint-plugin-query": "^5.0.0", + "@tanstack/eslint-plugin-query": "^5.62.16", "@tanstack/eslint-plugin-router": "^1.92.7", "@testing-library/dom": "^10.4.0", "@total-typescript/ts-reset": "^0.6.1", @@ -185,20 +187,20 @@ "@types/eslint": "^9.6.1", "@types/eslint-plugin-tailwindcss": "^3.17.0", "@types/semver": "^7.5.8", - "@unocss/eslint-plugin": "^0.65.3", - "@visulima/packem": "^1.10.2", + "@unocss/eslint-plugin": "^0.65.4", + "@visulima/packem": "^1.10.7", "astro-eslint-parser": "^1.1.0", "esbuild": "^0.24.2", "eslint": "^9.17.0", "eslint-plugin-astro": "^1.3.1", - "eslint-plugin-format": "^0.1.3", + "eslint-plugin-format": "^1.0.1", "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-react-hooks": "^5.1.0", "eslint-plugin-react-refresh": "^0.4.16", "eslint-plugin-storybook": "^0.11.2", "eslint-plugin-tailwindcss": "^3.17.5", "eslint-plugin-testing-library": "^7.1.1", - "eslint-plugin-tsdoc": "^0.2.17", + "eslint-plugin-tsdoc": "^0.4.0", "eslint-plugin-validate-jsx-nesting": "^0.1.1", "eslint-plugin-vitest": "^0.5.4", "eslint-plugin-you-dont-need-lodash-underscore": "^6.14.0", @@ -210,7 +212,7 @@ "semantic-release": "^24.2.1", "tsx": "^4.19.2", "type-fest": "^4.31.0", - "typescript": "^5.7.2", + "typescript": "^5.7.3", "vitest": "^2.1.8" }, "peerDependencies": { diff --git a/packages/eslint-config/packem.config.ts b/packages/eslint-config/packem.config.ts index 16f72976..04577878 100644 --- a/packages/eslint-config/packem.config.ts +++ b/packages/eslint-config/packem.config.ts @@ -1,7 +1,6 @@ import { defineConfig } from "@visulima/packem/config"; import transformer from "@visulima/packem/transformer/esbuild"; -// eslint-disable-next-line import/no-unused-modules export default defineConfig({ declaration: false, rollup: { @@ -13,10 +12,10 @@ export default defineConfig({ writeToPackageJson: true, }, }, + transformer, validation: { packageJson: { exports: false, }, }, - transformer, }); diff --git a/packages/eslint-config/src/config/best-practices.ts b/packages/eslint-config/src/config/best-practices.ts index 40833c1a..6a49d444 100644 --- a/packages/eslint-config/src/config/best-practices.ts +++ b/packages/eslint-config/src/config/best-practices.ts @@ -451,6 +451,7 @@ export default createConfig("all", async (config, oFiles) => { // https://eslint.org/docs/rules/no-void "no-void": "error", + // eslint-disable-next-line sonarjs/todo-tag // disallow usage of configurable warning terms in comments: e.g. todo "no-warning-comments": [ "off", diff --git a/packages/eslint-config/src/config/plugins/formatters.ts b/packages/eslint-config/src/config/plugins/formatters.ts index d1654a2e..ba3e9095 100644 --- a/packages/eslint-config/src/config/plugins/formatters.ts +++ b/packages/eslint-config/src/config/plugins/formatters.ts @@ -1,8 +1,4 @@ -import type { - OptionsFormatters, - StylisticConfig, - TypedFlatConfigItem, -} from "../../types"; +import type { OptionsFormatters, StylisticConfig, TypedFlatConfigItem } from "../../types"; import { getFilesGlobs } from "../../utils/create-config"; import interopDefault from "../../utils/interop-default"; import parserPlain from "../../utils/parser-plain"; @@ -228,34 +224,37 @@ const formatters = async (options: OptionsFormatters, stylistic: StylisticConfig } if (options.astro) { - configs.push({ - files: getFilesGlobs("astro"), - languageOptions: { - parser: parserPlain, - }, - name: "anolilab/formatter/astro", - rules: { - "format/prettier": [ - "error", - mergePrettierOptions(prettierOptions, { - parser: "astro", - plugins: ["prettier-plugin-astro"], - }), - ], + configs.push( + { + files: getFilesGlobs("astro"), + languageOptions: { + parser: parserPlain, + }, + name: "anolilab/formatter/astro", + rules: { + "format/prettier": [ + "error", + mergePrettierOptions(prettierOptions, { + parser: "astro", + plugins: ["prettier-plugin-astro"], + }), + ], + }, }, - }, { - files: [...getFilesGlobs("astro"), ...getFilesGlobs("astro_ts")], - name: "anolilab/formatter/astro/disables", - rules: { - "@stylistic/arrow-parens": "off", - "@stylistic/block-spacing": "off", - "@stylistic/comma-dangle": "off", - "@stylistic/indent": "off", - "@stylistic/no-multi-spaces": "off", - "@stylistic/quotes": "off", - "@stylistic/semi": "off", + { + files: [...getFilesGlobs("astro"), ...getFilesGlobs("astro_ts")], + name: "anolilab/formatter/astro/disables", + rules: { + "@stylistic/arrow-parens": "off", + "@stylistic/block-spacing": "off", + "@stylistic/comma-dangle": "off", + "@stylistic/indent": "off", + "@stylistic/no-multi-spaces": "off", + "@stylistic/quotes": "off", + "@stylistic/semi": "off", + }, }, - }); + ); } if (options.graphql) { diff --git a/packages/eslint-config/src/config/plugins/imports.ts b/packages/eslint-config/src/config/plugins/imports.ts index bd93b1c2..e48e8414 100644 --- a/packages/eslint-config/src/config/plugins/imports.ts +++ b/packages/eslint-config/src/config/plugins/imports.ts @@ -133,7 +133,7 @@ export default createConfig("js", async (config, oFiles) => { - const { files = oFiles, packageJson, stylistic = true } = config; +export default createConfig("js", async (config, oFiles) => { + const { + files = oFiles, + packageJson, + silent, + stylistic = true, + } = config; const jsdocPlugin = await interopDefault(import("eslint-plugin-jsdoc")); const hasTypescript = hasPackageJsonAnyDependency(packageJson, ["typescript"]); const hasTsDocumentPlugin = hasPackageJsonAnyDependency(packageJson, ["eslint-plugin-tsdoc"]); - if (hasTsDocumentPlugin) { + if (hasTsDocumentPlugin && !silent) { + // eslint-disable-next-line no-console console.info("\nFound eslint-plugin-tsdoc as dependency, disabling the jsdoc rules for *.ts and *.tsx files."); } diff --git a/packages/eslint-config/src/config/plugins/jsonc.ts b/packages/eslint-config/src/config/plugins/jsonc.ts index 61f4c4e2..7ec3701c 100644 --- a/packages/eslint-config/src/config/plugins/jsonc.ts +++ b/packages/eslint-config/src/config/plugins/jsonc.ts @@ -4,16 +4,20 @@ import type { OptionsHasPrettier, OptionsOverrides, OptionsPackageJson, + OptionsSilentConsoleLogs, OptionsStylistic, TypedFlatConfigItem, } from "../../types"; import interopDefault from "../../utils/interop-default"; -export default async (config: OptionsHasPrettier & OptionsOverrides & OptionsPackageJson & OptionsStylistic): Promise => { +const jsonc = async ( + config: OptionsHasPrettier & OptionsOverrides & OptionsPackageJson & OptionsSilentConsoleLogs & OptionsStylistic, +): Promise => { const { overrides, packageJson, prettier, + silent, stylistic = true, } = config; const { indent = 4 } = typeof stylistic === "boolean" ? {} : stylistic; @@ -22,7 +26,7 @@ export default async (config: OptionsHasPrettier & OptionsOverrides & OptionsPac const hasSortPackageJson = hasPackageJsonAnyDependency(packageJson, ["sort-package-json"]); - if (hasSortPackageJson) { + if (hasSortPackageJson && !silent) { console.info(`\n@anolilab/eslint-config found "sort-package-json" package. \n Following rules are disabled: jsonc/sort-keys for all package.json files. \n`); } @@ -64,6 +68,7 @@ export default async (config: OptionsHasPrettier & OptionsOverrides & OptionsPac }, ], + // eslint-disable-next-line max-len // When the package "sort-package-json" is installed, we disable the rule "jsonc/sort-keys" because, the package "sort-package-json" is responsible for sorting the keys. "jsonc/sort-keys": hasSortPackageJson ? "off" @@ -71,50 +76,107 @@ export default async (config: OptionsHasPrettier & OptionsOverrides & OptionsPac "error", { order: [ - "publisher", + "$schema", "name", "displayName", - "type", "version", "private", - "packageManager", "description", - "author", - "contributors", - "license", - "funding", + "categories", + "keywords", "homepage", - "repository", "bugs", - "keywords", - "categories", + "repository", + "funding", + "license", + "qna", + "author", + "maintainers", + "contributors", + "publisher", "sideEffects", + "type", + "imports", "exports", "main", - "module", - "unpkg", + "svelte", + "umd:main", "jsdelivr", + "unpkg", + "module", + "source", + "jsnext:main", + "browser", + "react-native", "types", "typesVersions", + "typings", + "style", + "example", + "examplestyle", + "assets", "bin", - "icon", + "man", + "directories", "files", - "engines", - "activationEvents", - "contributes", + "workspaces", + "binary", "scripts", - "peerDependencies", - "peerDependenciesMeta", - "dependencies", - "optionalDependencies", - "devDependencies", - "pnpm", - "overrides", - "resolutions", + "betterScripts", + "contributes", + "activationEvents", "husky", "simple-git-hooks", + "pre-commit", + "commitlint", "lint-staged", + "nano-staged", + "config", + "nodemonConfig", + "browserify", + "babel", + "browserslist", + "xo", + "prettier", "eslintConfig", + "eslintIgnore", + "npmpackagejsonlint", + "release", + "remarkConfig", + "stylelint", + "ava", + "jest", + "mocha", + "nyc", + "tap", + "oclif", + "resolutions", + "dependencies", + "devDependencies", + "dependenciesMeta", + "peerDependencies", + "peerDependenciesMeta", + "optionalDependencies", + "bundledDependencies", + "bundleDependencies", + "extensionPack", + "extensionDependencies", + "flat", + "packageManager", + "engines", + "engineStrict", + "volta", + "languageName", + "os", + "cpu", + "preferGlobal", + "publishConfig", + "icon", + "badges", + "galleryBanner", + "preview", + "markdown", + "pnpm", ], pathPattern: "^$", }, @@ -132,20 +194,36 @@ export default async (config: OptionsHasPrettier & OptionsOverrides & OptionsPac }, { order: [ - // client hooks only + "applypatch-msg", + "pre-applypatch", + "post-applypatch", "pre-commit", + "pre-merge-commit", "prepare-commit-msg", "commit-msg", "post-commit", "pre-rebase", - "post-rewrite", "post-checkout", "post-merge", "pre-push", + "pre-receive", + "update", + "post-receive", + "post-update", + "push-to-checkout", "pre-auto-gc", + "post-rewrite", + "sendemail-validate", + "fsmonitor-watchman", + "p4-pre-submit", + "post-index-chang", ], pathPattern: "^(?:gitHooks|husky|simple-git-hooks)$", }, + { + order: ["build", "preinstall", "install", "postinstall", "lint", { order: { type: "asc" } }], + pathPattern: "^scripts$", + }, ], }, }, @@ -288,3 +366,5 @@ export default async (config: OptionsHasPrettier & OptionsOverrides & OptionsPac }, ]; }; + +export default jsonc; diff --git a/packages/eslint-config/src/config/plugins/no-secrets.ts b/packages/eslint-config/src/config/plugins/no-secrets.ts index 1d462eee..bf938951 100644 --- a/packages/eslint-config/src/config/plugins/no-secrets.ts +++ b/packages/eslint-config/src/config/plugins/no-secrets.ts @@ -2,7 +2,7 @@ import type { OptionsOverrides, TypedFlatConfigItem } from "../../types"; import interopDefault from "../../utils/interop-default"; // @see https://github.com/nickdeis/eslint-plugin-no-secrets -export default async (config: OptionsOverrides): Promise => { +const noSecrets = async (config: OptionsOverrides): Promise => { const noSecretsPlugin = await interopDefault(import("eslint-plugin-no-secrets")); return [ @@ -24,3 +24,5 @@ export default async (config: OptionsOverrides): Promise }, ]; }; + +export default noSecrets; diff --git a/packages/eslint-config/src/config/plugins/perfectionist.ts b/packages/eslint-config/src/config/plugins/perfectionist.ts index 5c7d8786..df740775 100644 --- a/packages/eslint-config/src/config/plugins/perfectionist.ts +++ b/packages/eslint-config/src/config/plugins/perfectionist.ts @@ -11,6 +11,7 @@ export default createConfig("jsx_and_tsx", async (config, oFiles) => { const { files = oFiles, @@ -32,6 +43,7 @@ export default createConfig< overrides, packageJson, prettier, + silent, stylistic = true, tsconfigPath, } = config; @@ -53,6 +65,7 @@ export default createConfig< const isAllowConstantExport = hasPackageJsonAnyDependency(packageJson, ReactRefreshAllowConstantExportPackages); const isUsingRemix = hasPackageJsonAnyDependency(packageJson, RemixPackages); const isUsingNext = hasPackageJsonAnyDependency(packageJson, NextJsPackages); + const isUsingReactRouter = hasPackageJsonAnyDependency(packageJson, ReactRouterPackages); const plugins = pluginReact.configs.all.plugins; @@ -64,10 +77,12 @@ export default createConfig< if (parsedVersion !== null) { reactVersion = `${parsedVersion.major}.${parsedVersion.minor}`; - // TODO: add log flag - console.info( - `\n@anolilab/eslint-config found the version ${reactVersion} of react in your dependencies, this version ${reactVersion} will be used to setup the "eslint-plugin-react"\n`, - ); + if (!silent) { + // eslint-disable-next-line no-console + console.info( + `\n@anolilab/eslint-config found the version ${reactVersion} of react in your dependencies, this version ${reactVersion} will be used to setup the "eslint-plugin-react"\n`, + ); + } } } @@ -78,10 +93,13 @@ export default createConfig< if (tsConfig?.compilerOptions !== undefined && (tsConfig?.compilerOptions.jsx === "react-jsx" || tsConfig?.compilerOptions.jsx === "react-jsxdev")) { hasJsxRuntime = true; - // TODO: add log flag - console.info(`\n@anolilab/eslint-config found react jsx-runtime. \n + + if (!silent) { + // eslint-disable-next-line no-console + console.info(`\n@anolilab/eslint-config found react jsx-runtime. \n Following rules are disabled: "react/jsx-uses-react" and "react/react-in-jsx-scope". If you dont use the new react jsx-runtime in you project, please enable it manually.\n`); + } } } @@ -175,7 +193,7 @@ export default createConfig< "generateViewport", ] : [], - ...isUsingRemix ? ["meta", "links", "headers", "loader", "action"] : [], + ...isUsingRemix || isUsingReactRouter ? ["meta", "links", "headers", "loader", "action"] : [], ], }, ], diff --git a/packages/eslint-config/src/config/plugins/tanstack-query.ts b/packages/eslint-config/src/config/plugins/tanstack-query.ts index 1626c23a..209c2408 100644 --- a/packages/eslint-config/src/config/plugins/tanstack-query.ts +++ b/packages/eslint-config/src/config/plugins/tanstack-query.ts @@ -8,14 +8,16 @@ export default createConfig("all", async (confi const pluginTanstackQuery = await interopDefault(import("@tanstack/eslint-plugin-query")); - return [{ - files, - plugins: { - "@tanstack/query": pluginTanstackQuery, + return [ + { + files, + plugins: { + "@tanstack/query": pluginTanstackQuery, + }, + rules: { + ...pluginTanstackQuery.configs["recommended"].rules, + ...overrides, + }, }, - rules: { - ...pluginTanstackQuery.configs["recommended"].rules, - ...overrides, - }, - }]; + ]; }); diff --git a/packages/eslint-config/src/config/plugins/tanstack-router.ts b/packages/eslint-config/src/config/plugins/tanstack-router.ts index d5174a30..0a9c6d20 100644 --- a/packages/eslint-config/src/config/plugins/tanstack-router.ts +++ b/packages/eslint-config/src/config/plugins/tanstack-router.ts @@ -7,14 +7,16 @@ export default createConfig("all", async (confi const pluginTanstackRouter = await interopDefault(import("@tanstack/eslint-plugin-router")); - return [{ - files, - plugins: { - "@tanstack/router": pluginTanstackRouter, + return [ + { + files, + plugins: { + "@tanstack/router": pluginTanstackRouter, + }, + rules: { + ...pluginTanstackRouter.configs["recommended"].rules, + ...overrides, + }, }, - rules: { - ...pluginTanstackRouter.configs["recommended"].rules, - ...overrides, - }, - }]; + ]; }); diff --git a/packages/eslint-config/src/config/plugins/typescript.ts b/packages/eslint-config/src/config/plugins/typescript.ts index a002c4f0..67411a6f 100644 --- a/packages/eslint-config/src/config/plugins/typescript.ts +++ b/packages/eslint-config/src/config/plugins/typescript.ts @@ -64,6 +64,7 @@ export default createConfig< tsconfigRootDir: process.cwd(), } : {}, + // eslint-disable-next-line @typescript-eslint/no-explicit-any ...(parserOptions as any), }, }, @@ -162,6 +163,10 @@ export default createConfig< }, ], + // Enforce specifying generic type arguments on constructor name of a constructor call. + // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md + "@typescript-eslint/consistent-generic-constructors": "error", + // @TODO: Fix this rule // Some built-in types have aliases, while some types are considered dangerous or harmful. // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/ban-types.md @@ -179,10 +184,6 @@ export default createConfig< // }, // ], - // Enforce specifying generic type arguments on constructor name of a constructor call. - // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md - "@typescript-eslint/consistent-generic-constructors": "error", - // Enforce consistent usage of type imports. // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/consistent-type-imports.md "@typescript-eslint/consistent-type-imports": "error", @@ -362,6 +363,9 @@ export default createConfig< // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-function-type.md "@typescript-eslint/prefer-function-type": "error", + // Disabled to use faster alternatives. + "@typescript-eslint/prefer-string-starts-ends-with": "off", + // Enforce using @ts-expect-error over @ts-ignore. // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md "@typescript-eslint/prefer-ts-expect-error": "error", diff --git a/packages/eslint-config/src/config/plugins/unicorn.ts b/packages/eslint-config/src/config/plugins/unicorn.ts index 0e549ca3..2900fe39 100644 --- a/packages/eslint-config/src/config/plugins/unicorn.ts +++ b/packages/eslint-config/src/config/plugins/unicorn.ts @@ -39,8 +39,6 @@ export default createConfig( @@ -22,7 +23,6 @@ export default createConfig = { // require multiline ternary // https://eslint.org/docs/rules/multiline-ternary - // TODO: enable? "multiline-ternary": ["off", "never"], // require a capital letter for constructors @@ -332,6 +331,7 @@ export const styleRules: Partial = { }, { message: "Do not use full-width tilde. Use wave dash instead.", + // eslint-disable-next-line no-restricted-syntax selector: ":matches(Literal[value=/~/],TemplateElement[value.raw=/~/])", }, { diff --git a/packages/eslint-config/src/index.ts b/packages/eslint-config/src/index.ts index 8dfc5269..5d067537 100644 --- a/packages/eslint-config/src/index.ts +++ b/packages/eslint-config/src/index.ts @@ -93,7 +93,6 @@ export const getFiles = (options: OptionsConfig, return undefined; }; -// eslint-disable-next-line no-secrets/no-secrets /** * Construct an array of ESLint flat config items. * @@ -442,6 +441,7 @@ export const createConfig = async ( "@eslint-react/eslint-plugin", ]), regexp: enableRegexp = true, + silent = false, storybook: enableStorybook = hasPackageJsonAnyDependency(packageJson, ["storybook", "eslint-plugin-storybook"]), tailwindcss: enableTailwindCss = false, tanstackQuery: enableTanstackQuery = hasPackageJsonAnyDependency(packageJson, ["@tanstack/react-query"]), @@ -526,14 +526,14 @@ export const createConfig = async ( await ensurePackages(packageJson, packages, "devDependencies", { confirm: { - message: (packages: string[]) => `@anolilab/eslint-config requires the following ${packages.length === 1 ? "package" : "packages"} to be installed: \n\n"${packages.join("\"\n\"")}"\n\nfor the ESLint configurations to work correctly. Do you want to install ${packages.length === 1 ? "it" : "them"} now?`, + message: (list: string[]) => `@anolilab/eslint-config requires the following ${list.length === 1 ? "package" : "packages"} to be installed: \n\n"${list.join("\"\n\"")}"\n\nfor the ESLint configurations to work correctly. Do you want to install ${packages.length === 1 ? "it" : "them"} now?`, }, }); } let isInEditor = options.isInEditor; - if (isInEditor == null) { + if (isInEditor === undefined || isInEditor === false) { isInEditor = isInEditorEnvironment(); if (isInEditor) { @@ -604,6 +604,7 @@ export const createConfig = async ( files: getFiles(options, "jsdoc"), // overrides: getFiles(options, "jsdoc"), packageJson, + silent, stylistic: stylisticOptions, }), imports({ @@ -825,6 +826,7 @@ export const createConfig = async ( ...typescriptOptions, overrides: getOverrides(options, "react"), packageJson, + silent, tsconfigPath, }), ); @@ -855,6 +857,7 @@ export const createConfig = async ( overrides: getOverrides(options, "jsonc"), packageJson, prettier: enablePrettier, + silent, stylistic: stylisticOptions, }), ); diff --git a/packages/eslint-config/src/typegen.d.ts b/packages/eslint-config/src/typegen.d.ts index fc48058f..316c6e11 100644 --- a/packages/eslint-config/src/typegen.d.ts +++ b/packages/eslint-config/src/typegen.d.ts @@ -1,15959 +1,24716 @@ -/* eslint-disable */ /* prettier-ignore */ -import type { Linter } from 'eslint' +import type { Linter } from "eslint"; + +// Names of all the configs +export type ConfigNames = + | "anolilab/antfu" + | "anolilab/astro/rules" + | "anolilab/astro/setup" + | "anolilab/best-practices/rules" + | "anolilab/best-practices/ts-rules" + | "anolilab/errors/rules" + | "anolilab/errors/ts-rules" + | "anolilab/eslint-comments/rules" + | "anolilab/formatter/setup" + | "anolilab/html/setup" + | "anolilab/imports/d.ts-rules" + | "anolilab/imports/rules" + | "anolilab/imports/setup" + | "anolilab/javascript/setup" + | "anolilab/jsdoc/js-rules" + | "anolilab/jsdoc/setup" + | "anolilab/jsonc/json-rules" + | "anolilab/jsonc/json5-rules" + | "anolilab/jsonc/jsonc-rules" + | "anolilab/jsonc/package.json-rules" + | "anolilab/jsonc/tsconfig-json" + | "anolilab/jsx-a11y/setup" + | "anolilab/markdown/disables" + | "anolilab/markdown/parser" + | "anolilab/markdown/processor" + | "anolilab/markdown/setup" + | "anolilab/no-secrets" + | "anolilab/no-unsanitized/setup" + | "anolilab/node" + | "anolilab/perfectionist/postcss" + | "anolilab/perfectionist/rules" + | "anolilab/perfectionist/setup" + | "anolilab/perfectionist/typescript" + | "anolilab/promise/rules" + | "anolilab/react/jsx" + | "anolilab/react/rules" + | "anolilab/react/setup" + | "anolilab/react/storybook" + | "anolilab/react/tsx" + | "anolilab/regexp/rules" + | "anolilab/simple-import-sort" + | "anolilab/sonarjs/js-and-ts-rules" + | "anolilab/sonarjs/js-rules" + | "anolilab/sonarjs/plugin" + | "anolilab/sonarjs/rules" + | "anolilab/style/rules" + | "anolilab/style/ts-rules" + | "anolilab/stylistic/rules" + | "anolilab/toml" + | "anolilab/typescript/parser" + | "anolilab/typescript/rules" + | "anolilab/typescript/setup" + | "anolilab/unicorn/plugin" + | "anolilab/unicorn/rules" + | "anolilab/unicorn/ts-overrides" + | "anolilab/unicorn/tsconfig-overrides" + | "anolilab/unocss" + | "anolilab/validate-jsx-nesting/setup" + | "anolilab/variables/rules" + | "anolilab/variables/ts-rules" + | "anolilab/vitest/rules" + | "anolilab/vitest/setup" + | "anolilab/yaml" + | "compat/flat/recommended" + | "storybook:recommended:main-rules" + | "storybook:recommended:setup" + | "storybook:recommended:stories-rules" + | "tailwindcss:base" + | "tailwindcss:rules" + | "typescript-eslint/base" + | "typescript-eslint/base" + | "typescript-eslint/eslint-recommended" + | "typescript-eslint/eslint-recommended" + | "typescript-eslint/strict" + | "typescript-eslint/stylistic"; export interface RuleOptions { - /** - * Enforce linebreaks after opening and before closing array brackets - * @see https://eslint.style/rules/js/array-bracket-newline - */ - '@stylistic/array-bracket-newline'?: Linter.RuleEntry - /** - * Enforce consistent spacing inside array brackets - * @see https://eslint.style/rules/js/array-bracket-spacing - */ - '@stylistic/array-bracket-spacing'?: Linter.RuleEntry - /** - * Enforce line breaks after each array element - * @see https://eslint.style/rules/js/array-element-newline - */ - '@stylistic/array-element-newline'?: Linter.RuleEntry - /** - * Require parentheses around arrow function arguments - * @see https://eslint.style/rules/js/arrow-parens - */ - '@stylistic/arrow-parens'?: Linter.RuleEntry - /** - * Enforce consistent spacing before and after the arrow in arrow functions - * @see https://eslint.style/rules/js/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/ts/block-spacing - */ - '@stylistic/block-spacing'?: Linter.RuleEntry - /** - * Enforce consistent brace style for blocks - * @see https://eslint.style/rules/ts/brace-style - */ - '@stylistic/brace-style'?: Linter.RuleEntry - /** - * Require or disallow trailing commas - * @see https://eslint.style/rules/ts/comma-dangle - */ - '@stylistic/comma-dangle'?: Linter.RuleEntry - /** - * Enforce consistent spacing before and after commas - * @see https://eslint.style/rules/ts/comma-spacing - */ - '@stylistic/comma-spacing'?: Linter.RuleEntry - /** - * Enforce consistent comma style - * @see https://eslint.style/rules/js/comma-style - */ - '@stylistic/comma-style'?: Linter.RuleEntry - /** - * Enforce consistent spacing inside computed property brackets - * @see https://eslint.style/rules/js/computed-property-spacing - */ - '@stylistic/computed-property-spacing'?: Linter.RuleEntry - /** - * Enforce consistent line breaks after opening and before closing braces - * @see https://eslint.style/rules/plus/curly-newline - */ - '@stylistic/curly-newline'?: Linter.RuleEntry - /** - * Enforce consistent newlines before and after dots - * @see https://eslint.style/rules/js/dot-location - */ - '@stylistic/dot-location'?: Linter.RuleEntry - /** - * Require or disallow newline at the end of files - * @see https://eslint.style/rules/js/eol-last - */ - '@stylistic/eol-last'?: Linter.RuleEntry - /** - * Require or disallow spacing between function identifiers and their invocations - * @see https://eslint.style/rules/ts/function-call-spacing - */ - '@stylistic/func-call-spacing'?: Linter.RuleEntry - /** - * Enforce line breaks between arguments of a function call - * @see https://eslint.style/rules/js/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/ts/function-call-spacing - */ - '@stylistic/function-call-spacing'?: Linter.RuleEntry - /** - * Enforce consistent line breaks inside function parentheses - * @see https://eslint.style/rules/js/function-paren-newline - */ - '@stylistic/function-paren-newline'?: Linter.RuleEntry - /** - * Enforce consistent spacing around `*` operators in generator functions - * @see https://eslint.style/rules/js/generator-star-spacing - */ - '@stylistic/generator-star-spacing'?: Linter.RuleEntry - /** - * Enforce the location of arrow function bodies - * @see https://eslint.style/rules/js/implicit-arrow-linebreak - */ - '@stylistic/implicit-arrow-linebreak'?: Linter.RuleEntry - /** - * Enforce consistent indentation - * @see https://eslint.style/rules/ts/indent - */ - '@stylistic/indent'?: Linter.RuleEntry - /** - * Indentation for binary operators - * @see https://eslint.style/rules/plus/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/jsx-child-element-spacing - */ - '@stylistic/jsx-child-element-spacing'?: Linter.RuleEntry<[]> - /** - * Enforce closing bracket location in JSX - * @see https://eslint.style/rules/jsx/jsx-closing-bracket-location - */ - '@stylistic/jsx-closing-bracket-location'?: Linter.RuleEntry - /** - * Enforce closing tag location for multiline JSX - * @see https://eslint.style/rules/jsx/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/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/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/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/jsx-equals-spacing - */ - '@stylistic/jsx-equals-spacing'?: Linter.RuleEntry - /** - * Enforce proper position of the first property in JSX - * @see https://eslint.style/rules/jsx/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/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/jsx-indent - * @deprecated - */ - '@stylistic/jsx-indent'?: Linter.RuleEntry - /** - * Enforce props indentation in JSX - * @see https://eslint.style/rules/jsx/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/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/jsx-newline - */ - '@stylistic/jsx-newline'?: Linter.RuleEntry - /** - * Require one JSX element per line - * @see https://eslint.style/rules/jsx/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/jsx-pascal-case - */ - '@stylistic/jsx-pascal-case'?: Linter.RuleEntry - /** - * Disallow multiple spaces between inline JSX props - * @see https://eslint.style/rules/jsx/jsx-props-no-multi-spaces - */ - '@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/js/jsx-quotes - */ - '@stylistic/jsx-quotes'?: Linter.RuleEntry - /** - * Disallow extra closing tags for components without children - * @see https://eslint.style/rules/jsx/jsx-self-closing-comp - */ - '@stylistic/jsx-self-closing-comp'?: Linter.RuleEntry - /** - * Enforce props alphabetical sorting - * @see https://eslint.style/rules/jsx/jsx-sort-props - */ - '@stylistic/jsx-sort-props'?: Linter.RuleEntry - /** - * Enforce whitespace in and around the JSX opening and closing brackets - * @see https://eslint.style/rules/jsx/jsx-tag-spacing - */ - '@stylistic/jsx-tag-spacing'?: Linter.RuleEntry - /** - * Disallow missing parentheses around multiline JSX - * @see https://eslint.style/rules/jsx/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/ts/key-spacing - */ - '@stylistic/key-spacing'?: Linter.RuleEntry - /** - * Enforce consistent spacing before and after keywords - * @see https://eslint.style/rules/ts/keyword-spacing - */ - '@stylistic/keyword-spacing'?: Linter.RuleEntry - /** - * Enforce position of line comments - * @see https://eslint.style/rules/js/line-comment-position - */ - '@stylistic/line-comment-position'?: Linter.RuleEntry - /** - * Enforce consistent linebreak style - * @see https://eslint.style/rules/js/linebreak-style - */ - '@stylistic/linebreak-style'?: Linter.RuleEntry - /** - * Require empty lines around comments - * @see https://eslint.style/rules/ts/lines-around-comment - */ - '@stylistic/lines-around-comment'?: Linter.RuleEntry - /** - * Require or disallow an empty line between class members - * @see https://eslint.style/rules/ts/lines-between-class-members - */ - '@stylistic/lines-between-class-members'?: Linter.RuleEntry - /** - * Enforce a maximum line length - * @see https://eslint.style/rules/js/max-len - */ - '@stylistic/max-len'?: Linter.RuleEntry - /** - * Enforce a maximum number of statements allowed per line - * @see https://eslint.style/rules/js/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/ts/member-delimiter-style - */ - '@stylistic/member-delimiter-style'?: Linter.RuleEntry - /** - * Enforce a particular style for multiline comments - * @see https://eslint.style/rules/js/multiline-comment-style - */ - '@stylistic/multiline-comment-style'?: Linter.RuleEntry - /** - * Enforce newlines between operands of ternary expressions - * @see https://eslint.style/rules/js/multiline-ternary - */ - '@stylistic/multiline-ternary'?: Linter.RuleEntry - /** - * Enforce or disallow parentheses when invoking a constructor with no arguments - * @see https://eslint.style/rules/js/new-parens - */ - '@stylistic/new-parens'?: Linter.RuleEntry - /** - * Require a newline after each call in a method chain - * @see https://eslint.style/rules/js/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/js/no-confusing-arrow - */ - '@stylistic/no-confusing-arrow'?: Linter.RuleEntry - /** - * Disallow unnecessary parentheses - * @see https://eslint.style/rules/ts/no-extra-parens - */ - '@stylistic/no-extra-parens'?: Linter.RuleEntry - /** - * Disallow unnecessary semicolons - * @see https://eslint.style/rules/ts/no-extra-semi - */ - '@stylistic/no-extra-semi'?: Linter.RuleEntry<[]> - /** - * Disallow leading or trailing decimal points in numeric literals - * @see https://eslint.style/rules/js/no-floating-decimal - */ - '@stylistic/no-floating-decimal'?: Linter.RuleEntry<[]> - /** - * Disallow mixed binary operators - * @see https://eslint.style/rules/js/no-mixed-operators - */ - '@stylistic/no-mixed-operators'?: Linter.RuleEntry - /** - * Disallow mixed spaces and tabs for indentation - * @see https://eslint.style/rules/js/no-mixed-spaces-and-tabs - */ - '@stylistic/no-mixed-spaces-and-tabs'?: Linter.RuleEntry - /** - * Disallow multiple spaces - * @see https://eslint.style/rules/js/no-multi-spaces - */ - '@stylistic/no-multi-spaces'?: Linter.RuleEntry - /** - * Disallow multiple empty lines - * @see https://eslint.style/rules/js/no-multiple-empty-lines - */ - '@stylistic/no-multiple-empty-lines'?: Linter.RuleEntry - /** - * Disallow all tabs - * @see https://eslint.style/rules/js/no-tabs - */ - '@stylistic/no-tabs'?: Linter.RuleEntry - /** - * Disallow trailing whitespace at the end of lines - * @see https://eslint.style/rules/js/no-trailing-spaces - */ - '@stylistic/no-trailing-spaces'?: Linter.RuleEntry - /** - * Disallow whitespace before properties - * @see https://eslint.style/rules/js/no-whitespace-before-property - */ - '@stylistic/no-whitespace-before-property'?: Linter.RuleEntry<[]> - /** - * Enforce the location of single-line statements - * @see https://eslint.style/rules/js/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/ts/object-curly-newline - */ - '@stylistic/object-curly-newline'?: Linter.RuleEntry - /** - * Enforce consistent spacing inside braces - * @see https://eslint.style/rules/ts/object-curly-spacing - */ - '@stylistic/object-curly-spacing'?: Linter.RuleEntry - /** - * Enforce placing object properties on separate lines - * @see https://eslint.style/rules/ts/object-property-newline - */ - '@stylistic/object-property-newline'?: Linter.RuleEntry - /** - * Require or disallow newlines around variable declarations - * @see https://eslint.style/rules/js/one-var-declaration-per-line - */ - '@stylistic/one-var-declaration-per-line'?: Linter.RuleEntry - /** - * Enforce consistent linebreak style for operators - * @see https://eslint.style/rules/js/operator-linebreak - */ - '@stylistic/operator-linebreak'?: Linter.RuleEntry - /** - * Require or disallow padding within blocks - * @see https://eslint.style/rules/js/padded-blocks - */ - '@stylistic/padded-blocks'?: Linter.RuleEntry - /** - * Require or disallow padding lines between statements - * @see https://eslint.style/rules/ts/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/ts/quote-props - */ - '@stylistic/quote-props'?: Linter.RuleEntry - /** - * Enforce the consistent use of either backticks, double, or single quotes - * @see https://eslint.style/rules/ts/quotes - */ - '@stylistic/quotes'?: Linter.RuleEntry - /** - * Enforce spacing between rest and spread operators and their expressions - * @see https://eslint.style/rules/js/rest-spread-spacing - */ - '@stylistic/rest-spread-spacing'?: Linter.RuleEntry - /** - * Require or disallow semicolons instead of ASI - * @see https://eslint.style/rules/ts/semi - */ - '@stylistic/semi'?: Linter.RuleEntry - /** - * Enforce consistent spacing before and after semicolons - * @see https://eslint.style/rules/js/semi-spacing - */ - '@stylistic/semi-spacing'?: Linter.RuleEntry - /** - * Enforce location of semicolons - * @see https://eslint.style/rules/js/semi-style - */ - '@stylistic/semi-style'?: Linter.RuleEntry - /** - * Enforce consistent spacing before blocks - * @see https://eslint.style/rules/ts/space-before-blocks - */ - '@stylistic/space-before-blocks'?: Linter.RuleEntry - /** - * Enforce consistent spacing before function parenthesis - * @see https://eslint.style/rules/ts/space-before-function-paren - */ - '@stylistic/space-before-function-paren'?: Linter.RuleEntry - /** - * Enforce consistent spacing inside parentheses - * @see https://eslint.style/rules/js/space-in-parens - */ - '@stylistic/space-in-parens'?: Linter.RuleEntry - /** - * Require spacing around infix operators - * @see https://eslint.style/rules/ts/space-infix-ops - */ - '@stylistic/space-infix-ops'?: Linter.RuleEntry - /** - * Enforce consistent spacing before or after unary operators - * @see https://eslint.style/rules/js/space-unary-ops - */ - '@stylistic/space-unary-ops'?: Linter.RuleEntry - /** - * Enforce consistent spacing after the `//` or `/*` in a comment - * @see https://eslint.style/rules/js/spaced-comment - */ - '@stylistic/spaced-comment'?: Linter.RuleEntry - /** - * Enforce spacing around colons of switch statements - * @see https://eslint.style/rules/js/switch-colon-spacing - */ - '@stylistic/switch-colon-spacing'?: Linter.RuleEntry - /** - * Require or disallow spacing around embedded expressions of template strings - * @see https://eslint.style/rules/js/template-curly-spacing - */ - '@stylistic/template-curly-spacing'?: Linter.RuleEntry - /** - * Require or disallow spacing between template tags and their literals - * @see https://eslint.style/rules/js/template-tag-spacing - */ - '@stylistic/template-tag-spacing'?: Linter.RuleEntry - /** - * Require consistent spacing around type annotations - * @see https://eslint.style/rules/ts/type-annotation-spacing - */ - '@stylistic/type-annotation-spacing'?: Linter.RuleEntry - /** - * Enforces consistent spacing inside TypeScript type generics - * @see https://eslint.style/rules/plus/type-generic-spacing - */ - '@stylistic/type-generic-spacing'?: Linter.RuleEntry<[]> - /** - * Expect space before the type declaration in the named tuple - * @see https://eslint.style/rules/plus/type-named-tuple-spacing - */ - '@stylistic/type-named-tuple-spacing'?: Linter.RuleEntry<[]> - /** - * Require parentheses around immediate `function` invocations - * @see https://eslint.style/rules/js/wrap-iife - */ - '@stylistic/wrap-iife'?: Linter.RuleEntry - /** - * Require parenthesis around regex literals - * @see https://eslint.style/rules/js/wrap-regex - */ - '@stylistic/wrap-regex'?: Linter.RuleEntry<[]> - /** - * Require or disallow spacing around the `*` in `yield*` expressions - * @see https://eslint.style/rules/js/yield-star-spacing - */ - '@stylistic/yield-star-spacing'?: Linter.RuleEntry - /** - * Exhaustive deps rule for useQuery - * @see https://tanstack.com/query/v4/docs/eslint/exhaustive-deps - */ - '@tanstack/query/exhaustive-deps'?: Linter.RuleEntry<[]> - /** - * Disallows rest destructuring in queries - * @see https://tanstack.com/query/v4/docs/eslint/no-rest-destructuring - */ - '@tanstack/query/no-rest-destructuring'?: Linter.RuleEntry<[]> - /** - * Makes sure that QueryClient is stable - * @see https://tanstack.com/query/v4/docs/eslint/stable-query-client - */ - '@tanstack/query/stable-query-client'?: Linter.RuleEntry<[]> - /** - * Ensure correct order of inference sensitive properties for createRoute functions - * @see https://tanstack.com/router/latest/docs/eslint/create-route-property-order - */ - '@tanstack/router/create-route-property-order'?: 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 methods - * @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 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 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 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 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 - /** - * 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 - */ - '@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 - /** - * Having line breaks styles to object, array and named imports - * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/consistent-chaining.md - */ - 'antfu/consistent-chaining'?: Linter.RuleEntry - /** - * Having line breaks styles to object, array and named imports - * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/consistent-list-newline.md - */ - 'antfu/consistent-list-newline'?: Linter.RuleEntry - /** - * Enforce Anthony's style of curly bracket - * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/curly.md - */ - 'antfu/curly'?: Linter.RuleEntry<[]> - /** - * Newline after if - * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/if-newline.md - */ - 'antfu/if-newline'?: Linter.RuleEntry<[]> - /** - * Fix duplication in imports - * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/import-dedupe.md - */ - 'antfu/import-dedupe'?: Linter.RuleEntry<[]> - /** - * Enforce consistent indentation in `unindent` template tag - * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/indent-unindent.md - */ - 'antfu/indent-unindent'?: Linter.RuleEntry - /** - * Prevent importing modules in `dist` folder - * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-import-dist.test.ts - */ - 'antfu/no-import-dist'?: Linter.RuleEntry<[]> - /** - * Prevent importing modules in `node_modules` folder by relative or absolute path - * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-import-node-modules-by-path.test.ts - */ - 'antfu/no-import-node-modules-by-path'?: Linter.RuleEntry<[]> - /** - * Prevent using top-level await - * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-top-level-await.test.ts - */ - 'antfu/no-top-level-await'?: Linter.RuleEntry<[]> - /** - * Do not use `exports =` - * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/no-ts-export-equal.test.ts - */ - 'antfu/no-ts-export-equal'?: Linter.RuleEntry<[]> - /** - * Enforce top-level functions to be declared with function keyword - * @see https://github.com/antfu/eslint-plugin-antfu/blob/main/src/rules/top-level-function.md - */ - 'antfu/top-level-function'?: 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 - /** - * apply `jsx-a11y/alt-text` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/alt-text/ - */ - 'astro/jsx-a11y/alt-text'?: Linter.RuleEntry - /** - * apply `jsx-a11y/anchor-ambiguous-text` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/anchor-ambiguous-text/ - */ - 'astro/jsx-a11y/anchor-ambiguous-text'?: Linter.RuleEntry - /** - * apply `jsx-a11y/anchor-has-content` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/anchor-has-content/ - */ - 'astro/jsx-a11y/anchor-has-content'?: Linter.RuleEntry - /** - * apply `jsx-a11y/anchor-is-valid` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/anchor-is-valid/ - */ - 'astro/jsx-a11y/anchor-is-valid'?: Linter.RuleEntry - /** - * apply `jsx-a11y/aria-activedescendant-has-tabindex` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-activedescendant-has-tabindex/ - */ - 'astro/jsx-a11y/aria-activedescendant-has-tabindex'?: Linter.RuleEntry - /** - * apply `jsx-a11y/aria-props` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-props/ - */ - 'astro/jsx-a11y/aria-props'?: Linter.RuleEntry - /** - * apply `jsx-a11y/aria-proptypes` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-proptypes/ - */ - 'astro/jsx-a11y/aria-proptypes'?: Linter.RuleEntry - /** - * apply `jsx-a11y/aria-role` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-role/ - */ - 'astro/jsx-a11y/aria-role'?: Linter.RuleEntry - /** - * apply `jsx-a11y/aria-unsupported-elements` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/aria-unsupported-elements/ - */ - 'astro/jsx-a11y/aria-unsupported-elements'?: Linter.RuleEntry - /** - * apply `jsx-a11y/autocomplete-valid` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/autocomplete-valid/ - */ - 'astro/jsx-a11y/autocomplete-valid'?: Linter.RuleEntry - /** - * apply `jsx-a11y/click-events-have-key-events` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/click-events-have-key-events/ - */ - 'astro/jsx-a11y/click-events-have-key-events'?: Linter.RuleEntry - /** - * apply `jsx-a11y/control-has-associated-label` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/control-has-associated-label/ - */ - 'astro/jsx-a11y/control-has-associated-label'?: Linter.RuleEntry - /** - * apply `jsx-a11y/heading-has-content` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/heading-has-content/ - */ - 'astro/jsx-a11y/heading-has-content'?: Linter.RuleEntry - /** - * apply `jsx-a11y/html-has-lang` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/html-has-lang/ - */ - 'astro/jsx-a11y/html-has-lang'?: Linter.RuleEntry - /** - * apply `jsx-a11y/iframe-has-title` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/iframe-has-title/ - */ - 'astro/jsx-a11y/iframe-has-title'?: Linter.RuleEntry - /** - * apply `jsx-a11y/img-redundant-alt` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/img-redundant-alt/ - */ - 'astro/jsx-a11y/img-redundant-alt'?: Linter.RuleEntry - /** - * apply `jsx-a11y/interactive-supports-focus` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/interactive-supports-focus/ - */ - 'astro/jsx-a11y/interactive-supports-focus'?: Linter.RuleEntry - /** - * apply `jsx-a11y/label-has-associated-control` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/label-has-associated-control/ - */ - 'astro/jsx-a11y/label-has-associated-control'?: Linter.RuleEntry - /** - * apply `jsx-a11y/lang` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/lang/ - */ - 'astro/jsx-a11y/lang'?: Linter.RuleEntry - /** - * apply `jsx-a11y/media-has-caption` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/media-has-caption/ - */ - 'astro/jsx-a11y/media-has-caption'?: Linter.RuleEntry - /** - * apply `jsx-a11y/mouse-events-have-key-events` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/mouse-events-have-key-events/ - */ - 'astro/jsx-a11y/mouse-events-have-key-events'?: Linter.RuleEntry - /** - * apply `jsx-a11y/no-access-key` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-access-key/ - */ - 'astro/jsx-a11y/no-access-key'?: Linter.RuleEntry - /** - * apply `jsx-a11y/no-aria-hidden-on-focusable` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-aria-hidden-on-focusable/ - */ - 'astro/jsx-a11y/no-aria-hidden-on-focusable'?: Linter.RuleEntry - /** - * apply `jsx-a11y/no-autofocus` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-autofocus/ - */ - 'astro/jsx-a11y/no-autofocus'?: Linter.RuleEntry - /** - * apply `jsx-a11y/no-distracting-elements` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-distracting-elements/ - */ - 'astro/jsx-a11y/no-distracting-elements'?: Linter.RuleEntry - /** - * apply `jsx-a11y/no-interactive-element-to-noninteractive-role` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-interactive-element-to-noninteractive-role/ - */ - 'astro/jsx-a11y/no-interactive-element-to-noninteractive-role'?: Linter.RuleEntry - /** - * apply `jsx-a11y/no-noninteractive-element-interactions` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-noninteractive-element-interactions/ - */ - 'astro/jsx-a11y/no-noninteractive-element-interactions'?: Linter.RuleEntry - /** - * apply `jsx-a11y/no-noninteractive-element-to-interactive-role` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-noninteractive-element-to-interactive-role/ - */ - 'astro/jsx-a11y/no-noninteractive-element-to-interactive-role'?: Linter.RuleEntry - /** - * apply `jsx-a11y/no-noninteractive-tabindex` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-noninteractive-tabindex/ - */ - 'astro/jsx-a11y/no-noninteractive-tabindex'?: Linter.RuleEntry - /** - * apply `jsx-a11y/no-redundant-roles` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-redundant-roles/ - */ - 'astro/jsx-a11y/no-redundant-roles'?: Linter.RuleEntry - /** - * apply `jsx-a11y/no-static-element-interactions` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/no-static-element-interactions/ - */ - 'astro/jsx-a11y/no-static-element-interactions'?: Linter.RuleEntry - /** - * apply `jsx-a11y/prefer-tag-over-role` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/prefer-tag-over-role/ - */ - 'astro/jsx-a11y/prefer-tag-over-role'?: Linter.RuleEntry - /** - * apply `jsx-a11y/role-has-required-aria-props` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/role-has-required-aria-props/ - */ - 'astro/jsx-a11y/role-has-required-aria-props'?: Linter.RuleEntry - /** - * apply `jsx-a11y/role-supports-aria-props` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/role-supports-aria-props/ - */ - 'astro/jsx-a11y/role-supports-aria-props'?: Linter.RuleEntry - /** - * apply `jsx-a11y/scope` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/scope/ - */ - 'astro/jsx-a11y/scope'?: Linter.RuleEntry - /** - * apply `jsx-a11y/tabindex-no-positive` rule to Astro components - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/tabindex-no-positive/ - */ - 'astro/jsx-a11y/tabindex-no-positive'?: Linter.RuleEntry - /** - * the client:only directive is missing the correct component's framework value - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/missing-client-only-directive-value/ - */ - 'astro/missing-client-only-directive-value'?: Linter.RuleEntry<[]> - /** - * disallow conflicting set directives and child contents - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-conflict-set-directives/ - */ - 'astro/no-conflict-set-directives'?: Linter.RuleEntry<[]> - /** - * disallow using deprecated `Astro.canonicalURL` - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-canonicalurl/ - */ - 'astro/no-deprecated-astro-canonicalurl'?: Linter.RuleEntry<[]> - /** - * disallow using deprecated `Astro.fetchContent()` - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-fetchcontent/ - */ - 'astro/no-deprecated-astro-fetchcontent'?: Linter.RuleEntry<[]> - /** - * disallow using deprecated `Astro.resolve()` - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-astro-resolve/ - */ - 'astro/no-deprecated-astro-resolve'?: Linter.RuleEntry<[]> - /** - * disallow using deprecated `getEntryBySlug()` - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-deprecated-getentrybyslug/ - */ - 'astro/no-deprecated-getentrybyslug'?: Linter.RuleEntry<[]> - /** - * disallow value export - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-exports-from-components/ - */ - 'astro/no-exports-from-components'?: Linter.RuleEntry<[]> - /** - * disallow use of `set:html` to prevent XSS attack - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-html-directive/ - */ - 'astro/no-set-html-directive'?: Linter.RuleEntry<[]> - /** - * disallow use of `set:text` - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-text-directive/ - */ - 'astro/no-set-text-directive'?: Linter.RuleEntry<[]> - /** - * disallow selectors defined in `style` tag that don't use in HTML - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unused-css-selector/ - */ - 'astro/no-unused-css-selector'?: Linter.RuleEntry<[]> - /** - * disallow unused `define:vars={...}` in `style` tag - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unused-define-vars-in-style/ - */ - 'astro/no-unused-define-vars-in-style'?: Linter.RuleEntry<[]> - /** - * require `class:list` directives instead of `class` with expressions - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/prefer-class-list-directive/ - */ - 'astro/prefer-class-list-directive'?: Linter.RuleEntry<[]> - /** - * require use object instead of ternary expression in `class:list` - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/prefer-object-class-list/ - */ - 'astro/prefer-object-class-list'?: Linter.RuleEntry<[]> - /** - * require use split array elements in `class:list` - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/prefer-split-class-list/ - */ - 'astro/prefer-split-class-list'?: Linter.RuleEntry - /** - * Require or disallow semicolons instead of ASI - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/semi/ - */ - 'astro/semi'?: Linter.RuleEntry - /** - * enforce sorting of attributes - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/sort-attributes/ - */ - 'astro/sort-attributes'?: Linter.RuleEntry - /** - * disallow warnings when compiling. - * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/valid-compile/ - */ - 'astro/valid-compile'?: 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 - /** - * Ensure cross-browser API compatibility - * @see https://github.com/amilajack/eslint-plugin-compat/blob/master/docs/rules/compat.md - */ - 'compat/compat'?: 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 - /** - * require a `eslint-enable` comment for every `eslint-disable` comment - * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/disable-enable-pair.html - */ - 'eslint-comments/disable-enable-pair'?: Linter.RuleEntry - /** - * disallow a `eslint-enable` comment for multiple `eslint-disable` comments - * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-aggregating-enable.html - */ - 'eslint-comments/no-aggregating-enable'?: Linter.RuleEntry<[]> - /** - * disallow duplicate `eslint-disable` comments - * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-duplicate-disable.html - */ - 'eslint-comments/no-duplicate-disable'?: Linter.RuleEntry<[]> - /** - * disallow `eslint-disable` comments about specific rules - * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-restricted-disable.html - */ - 'eslint-comments/no-restricted-disable'?: Linter.RuleEntry - /** - * disallow `eslint-disable` comments without rule names - * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unlimited-disable.html - */ - 'eslint-comments/no-unlimited-disable'?: Linter.RuleEntry<[]> - /** - * disallow unused `eslint-disable` comments - * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unused-disable.html - */ - 'eslint-comments/no-unused-disable'?: Linter.RuleEntry<[]> - /** - * disallow unused `eslint-enable` comments - * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unused-enable.html - */ - 'eslint-comments/no-unused-enable'?: Linter.RuleEntry<[]> - /** - * disallow ESLint directive-comments - * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-use.html - */ - 'eslint-comments/no-use'?: Linter.RuleEntry - /** - * require include descriptions in ESLint directive-comments - * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/require-description.html - */ - 'eslint-comments/require-description'?: 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<[]> - /** - * Use dprint to format code - */ - 'format/dprint'?: Linter.RuleEntry - /** - * Use Prettier to format code - */ - 'format/prettier'?: 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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.1/docs/rules/prefer-default-export.md - */ - 'import/prefer-default-export'?: Linter.RuleEntry - /** - * Forbid potentially ambiguous parse goal (`script` vs. `module`). - * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.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<[]> - /** - * Ensures that (JavaScript) examples within JSDoc 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 - /** - * Ensures that parameter names in JSDoc match those in the function declaration. - * @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 invalid types. - * @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 - /** - * Expects specific tags to be empty of any 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 an issue with any non-constructor function using `@implements`. - * @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 - /** - * Detects and removes extra lines of a blank 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`. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-types.md#repos-sticky-header - */ - 'jsdoc/no-types'?: Linter.RuleEntry - /** - * Checks that types in jsdoc comments are defined. - * @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 - /** - * 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 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 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. - * @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 - /** - * Require JSDoc comments - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-jsdoc.md#repos-sticky-header - */ - 'jsdoc/require-jsdoc'?: Linter.RuleEntry - /** - * Requires that all function parameters are documented. - * @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 function parameters 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. - * @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 function `@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. - * @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 returns are documented. - * @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. - * @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. - * @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. - * @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 template tags for each generic type parameter - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template.md#repos-sticky-header - */ - 'jsdoc/require-template'?: Linter.RuleEntry - /** - * Requires that throw statements are documented. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws.md#repos-sticky-header - */ - 'jsdoc/require-throws'?: Linter.RuleEntry - /** - * Requires yields are documented. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields.md#repos-sticky-header - */ - 'jsdoc/require-yields'?: Linter.RuleEntry - /** - * Requires a yield statement in function body if a `@yields` tag is specified in jsdoc comment. - * @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 - /** - * Sorts tags by a specified sequence according to tag name. - * @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) 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 - /** - * Requires all types to be valid JSDoc or Closure compiler types without syntax errors. - * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/valid-types.md#repos-sticky-header - */ - 'jsdoc/valid-types'?: Linter.RuleEntry - /** - * enforce line breaks after opening and before closing array brackets - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-newline.html - */ - 'jsonc/array-bracket-newline'?: Linter.RuleEntry - /** - * disallow or enforce spaces inside of brackets - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-spacing.html - */ - 'jsonc/array-bracket-spacing'?: Linter.RuleEntry - /** - * enforce line breaks between array elements - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-element-newline.html - */ - 'jsonc/array-element-newline'?: Linter.RuleEntry - /** - * apply jsonc rules similar to your configured ESLint core rules - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/auto.html - */ - 'jsonc/auto'?: Linter.RuleEntry<[]> - /** - * require or disallow trailing commas - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-dangle.html - */ - 'jsonc/comma-dangle'?: Linter.RuleEntry - /** - * enforce consistent comma style - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-style.html - */ - 'jsonc/comma-style'?: Linter.RuleEntry - /** - * enforce consistent indentation - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/indent.html - */ - 'jsonc/indent'?: Linter.RuleEntry - /** - * enforce naming convention to property key names - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-name-casing.html - */ - 'jsonc/key-name-casing'?: Linter.RuleEntry - /** - * enforce consistent spacing between keys and values in object literal properties - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-spacing.html - */ - 'jsonc/key-spacing'?: Linter.RuleEntry - /** - * disallow BigInt literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-bigint-literals.html - */ - 'jsonc/no-bigint-literals'?: Linter.RuleEntry<[]> - /** - * disallow binary expression - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-expression.html - */ - 'jsonc/no-binary-expression'?: Linter.RuleEntry<[]> - /** - * disallow binary numeric literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-numeric-literals.html - */ - 'jsonc/no-binary-numeric-literals'?: Linter.RuleEntry<[]> - /** - * disallow comments - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-comments.html - */ - 'jsonc/no-comments'?: Linter.RuleEntry<[]> - /** - * disallow duplicate keys in object literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-dupe-keys.html - */ - 'jsonc/no-dupe-keys'?: Linter.RuleEntry<[]> - /** - * disallow escape sequences in identifiers. - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-escape-sequence-in-identifier.html - */ - 'jsonc/no-escape-sequence-in-identifier'?: Linter.RuleEntry<[]> - /** - * disallow leading or trailing decimal points in numeric literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-floating-decimal.html - */ - 'jsonc/no-floating-decimal'?: Linter.RuleEntry<[]> - /** - * disallow hexadecimal numeric literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-hexadecimal-numeric-literals.html - */ - 'jsonc/no-hexadecimal-numeric-literals'?: Linter.RuleEntry<[]> - /** - * disallow Infinity - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-infinity.html - */ - 'jsonc/no-infinity'?: Linter.RuleEntry<[]> - /** - * disallow irregular whitespace - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-irregular-whitespace.html - */ - 'jsonc/no-irregular-whitespace'?: Linter.RuleEntry - /** - * disallow multiline strings - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-multi-str.html - */ - 'jsonc/no-multi-str'?: Linter.RuleEntry<[]> - /** - * disallow NaN - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-nan.html - */ - 'jsonc/no-nan'?: Linter.RuleEntry<[]> - /** - * disallow number property keys - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-number-props.html - */ - 'jsonc/no-number-props'?: Linter.RuleEntry<[]> - /** - * disallow numeric separators - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-numeric-separators.html - */ - 'jsonc/no-numeric-separators'?: Linter.RuleEntry<[]> - /** - * disallow legacy octal literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal.html - */ - 'jsonc/no-octal'?: Linter.RuleEntry<[]> - /** - * disallow octal escape sequences in string literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-escape.html - */ - 'jsonc/no-octal-escape'?: Linter.RuleEntry<[]> - /** - * disallow octal numeric literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-numeric-literals.html - */ - 'jsonc/no-octal-numeric-literals'?: Linter.RuleEntry<[]> - /** - * disallow parentheses around the expression - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-parenthesized.html - */ - 'jsonc/no-parenthesized'?: Linter.RuleEntry<[]> - /** - * disallow plus sign - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-plus-sign.html - */ - 'jsonc/no-plus-sign'?: Linter.RuleEntry<[]> - /** - * disallow RegExp literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-regexp-literals.html - */ - 'jsonc/no-regexp-literals'?: Linter.RuleEntry<[]> - /** - * disallow sparse arrays - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-sparse-arrays.html - */ - 'jsonc/no-sparse-arrays'?: Linter.RuleEntry<[]> - /** - * disallow template literals - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-template-literals.html - */ - 'jsonc/no-template-literals'?: Linter.RuleEntry<[]> - /** - * disallow `undefined` - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-undefined-value.html - */ - 'jsonc/no-undefined-value'?: Linter.RuleEntry<[]> - /** - * disallow Unicode code point escape sequences. - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-unicode-codepoint-escapes.html - */ - 'jsonc/no-unicode-codepoint-escapes'?: Linter.RuleEntry<[]> - /** - * disallow unnecessary escape usage - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-useless-escape.html - */ - 'jsonc/no-useless-escape'?: Linter.RuleEntry<[]> - /** - * enforce consistent line breaks inside braces - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-newline.html - */ - 'jsonc/object-curly-newline'?: Linter.RuleEntry - /** - * enforce consistent spacing inside braces - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-spacing.html - */ - 'jsonc/object-curly-spacing'?: Linter.RuleEntry - /** - * enforce placing object properties on separate lines - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-property-newline.html - */ - 'jsonc/object-property-newline'?: Linter.RuleEntry - /** - * require quotes around object literal property names - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quote-props.html - */ - 'jsonc/quote-props'?: Linter.RuleEntry - /** - * enforce use of double or single quotes - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quotes.html - */ - 'jsonc/quotes'?: Linter.RuleEntry - /** - * require array values to be sorted - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-array-values.html - */ - 'jsonc/sort-array-values'?: Linter.RuleEntry - /** - * require object keys to be sorted - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-keys.html - */ - 'jsonc/sort-keys'?: Linter.RuleEntry - /** - * disallow spaces after unary operators - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/space-unary-ops.html - */ - 'jsonc/space-unary-ops'?: Linter.RuleEntry - /** - * disallow invalid number for JSON - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/valid-json-number.html - */ - 'jsonc/valid-json-number'?: Linter.RuleEntry<[]> - /** - * disallow parsing errors in Vue custom blocks - * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/vue-custom-block/no-parsing-error.html - */ - 'jsonc/vue-custom-block/no-parsing-error'?: Linter.RuleEntry<[]> - /** - * Enforce emojis are wrapped in `` and provide screen reader access. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md - * @deprecated - */ - 'jsx-a11y/accessible-emoji'?: Linter.RuleEntry - /** - * Enforce all elements that require alternative text have meaningful information to relay back to end user. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/alt-text.md - */ - 'jsx-a11y/alt-text'?: Linter.RuleEntry - /** - * Enforce `` text to not exactly match "click here", "here", "link", or "a link". - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-ambiguous-text.md - */ - 'jsx-a11y/anchor-ambiguous-text'?: Linter.RuleEntry - /** - * Enforce all anchors to contain accessible content. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-has-content.md - */ - 'jsx-a11y/anchor-has-content'?: Linter.RuleEntry - /** - * Enforce all anchors are valid, navigable elements. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-is-valid.md - */ - 'jsx-a11y/anchor-is-valid'?: Linter.RuleEntry - /** - * Enforce elements with aria-activedescendant are tabbable. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-activedescendant-has-tabindex.md - */ - 'jsx-a11y/aria-activedescendant-has-tabindex'?: Linter.RuleEntry - /** - * Enforce all `aria-*` props are valid. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-props.md - */ - 'jsx-a11y/aria-props'?: Linter.RuleEntry - /** - * Enforce ARIA state and property values are valid. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-proptypes.md - */ - 'jsx-a11y/aria-proptypes'?: Linter.RuleEntry - /** - * Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-role.md - */ - 'jsx-a11y/aria-role'?: Linter.RuleEntry - /** - * Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md - */ - 'jsx-a11y/aria-unsupported-elements'?: Linter.RuleEntry - /** - * Enforce that autocomplete attributes are used correctly. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md - */ - 'jsx-a11y/autocomplete-valid'?: Linter.RuleEntry - /** - * Enforce a clickable non-interactive element has at least one keyboard event listener. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/click-events-have-key-events.md - */ - 'jsx-a11y/click-events-have-key-events'?: Linter.RuleEntry - /** - * Enforce that a control (an interactive element) has a text label. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md - */ - 'jsx-a11y/control-has-associated-label'?: Linter.RuleEntry - /** - * Enforce heading (`h1`, `h2`, etc) elements contain accessible content. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md - */ - 'jsx-a11y/heading-has-content'?: Linter.RuleEntry - /** - * Enforce `` element has `lang` prop. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md - */ - 'jsx-a11y/html-has-lang'?: Linter.RuleEntry - /** - * Enforce iframe elements have a title attribute. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md - */ - 'jsx-a11y/iframe-has-title'?: Linter.RuleEntry - /** - * Enforce `` alt prop does not contain the word "image", "picture", or "photo". - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/img-redundant-alt.md - */ - 'jsx-a11y/img-redundant-alt'?: Linter.RuleEntry - /** - * Enforce that elements with interactive handlers like `onClick` must be focusable. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/interactive-supports-focus.md - */ - 'jsx-a11y/interactive-supports-focus'?: Linter.RuleEntry - /** - * Enforce that a `label` tag has a text label and an associated control. - * @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md - */ - 'jsx-a11y/label-has-associated-control'?: Linter.RuleEntry - /** - * Enforce that `