From 8c9930433b97bdc8544b506329218a9d4ccdcbbe Mon Sep 17 00:00:00 2001 From: jimmy-guzman Date: Sat, 13 Apr 2024 08:08:41 -0500 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20=E2=9C=A8=20add=20type=20definition?= =?UTF-8?q?s=20for=20rules=20available?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cspell.json | 4 +- package.json | 5 +- pnpm-lock.yaml | 289 +- scripts/typegen.ts | 25 + src/configs/commonjs.ts | 3 +- src/configs/imports.ts | 6 +- src/configs/react.ts | 6 +- src/configs/testing-library.ts | 3 +- src/configs/testing.ts | 6 +- src/rules.gen.d.ts | 12406 +++++++++++++++++++++++++++++++ src/rules/base.ts | 5 +- src/rules/jest.ts | 5 +- src/rules/react.ts | 5 +- src/rules/testing-library.ts | 5 +- src/types.ts | 6 +- vitest.config.ts | 6 +- 16 files changed, 12761 insertions(+), 24 deletions(-) create mode 100644 scripts/typegen.ts create mode 100644 src/rules.gen.d.ts diff --git a/cspell.json b/cspell.json index 0ffa752..ca80b7a 100644 --- a/cspell.json +++ b/cspell.json @@ -33,6 +33,7 @@ "textnodes", "tiged", "typecheck", + "typegen", "vitepress", "vitest", "wagoid" @@ -50,6 +51,7 @@ "yarn.lock", "pnpm-lock.yaml", "**/__snapshots__", - "**/__snapshots__/**" + "**/__snapshots__/**", + "src/rules.gen.d.ts" ] } diff --git a/package.json b/package.json index 751cee1..8ecd55a 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,8 @@ "dist" ], "scripts": { - "build": "pkgroll --minify", + "typegen": "tsx scripts/typegen.ts", + "build": "pnpm typegen && pkgroll --minify", "coverage": "vitest run --coverage", "dev": "pkgroll --watch", "docs:build": "npx @eslint/config-inspector build", @@ -85,6 +86,7 @@ "clean-pkg-json": "1.2.0", "commitlint": "19.2.1", "eslint": "8.57.0", + "eslint-typegen": "0.2.2", "gitzy": "5.3.0", "is-ci": "3.0.1", "jiti": "1.21.0", @@ -94,6 +96,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "semantic-release": "23.0.8", + "tsx": "4.7.2", "typescript": "5.4.5", "vitest": "1.5.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9926624..6c5b74b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -115,6 +115,9 @@ devDependencies: eslint: specifier: 8.57.0 version: 8.57.0 + eslint-typegen: + specifier: 0.2.2 + version: 0.2.2(eslint@8.57.0) gitzy: specifier: 5.3.0 version: 5.3.0 @@ -142,6 +145,9 @@ devDependencies: semantic-release: specifier: 23.0.8 version: 23.0.8(typescript@5.4.5) + tsx: + specifier: 4.7.2 + version: 4.7.2 typescript: specifier: 5.4.5 version: 5.4.5 @@ -163,6 +169,15 @@ packages: '@jridgewell/trace-mapping': 0.3.25 dev: true + /@apidevtools/json-schema-ref-parser@11.5.4: + resolution: {integrity: sha512-o2fsypTGU0WxRxbax8zQoHiIB4dyrkwYfcm8TxZ+bx9pCzcWZbQtiMqpgBvWA/nJ2TrGjK5adCLfTH8wUeU/Wg==} + engines: {node: '>= 16'} + dependencies: + '@jsdevtools/ono': 7.1.3 + '@types/json-schema': 7.0.15 + js-yaml: 4.1.0 + dev: true + /@babel/code-frame@7.24.2: resolution: {integrity: sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==} engines: {node: '>=6.9.0'} @@ -388,6 +403,15 @@ packages: chalk: 5.3.0 dev: true + /@esbuild/aix-ppc64@0.19.12: + resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + requiresBuild: true + dev: true + optional: true + /@esbuild/aix-ppc64@0.20.2: resolution: {integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==} engines: {node: '>=12'} @@ -397,6 +421,15 @@ packages: dev: true optional: true + /@esbuild/android-arm64@0.19.12: + resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm64@0.20.2: resolution: {integrity: sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==} engines: {node: '>=12'} @@ -406,6 +439,15 @@ packages: dev: true optional: true + /@esbuild/android-arm@0.19.12: + resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm@0.20.2: resolution: {integrity: sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==} engines: {node: '>=12'} @@ -415,6 +457,15 @@ packages: dev: true optional: true + /@esbuild/android-x64@0.19.12: + resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-x64@0.20.2: resolution: {integrity: sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==} engines: {node: '>=12'} @@ -424,6 +475,15 @@ packages: dev: true optional: true + /@esbuild/darwin-arm64@0.19.12: + resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-arm64@0.20.2: resolution: {integrity: sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==} engines: {node: '>=12'} @@ -433,6 +493,15 @@ packages: dev: true optional: true + /@esbuild/darwin-x64@0.19.12: + resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-x64@0.20.2: resolution: {integrity: sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==} engines: {node: '>=12'} @@ -442,6 +511,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-arm64@0.19.12: + resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-arm64@0.20.2: resolution: {integrity: sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==} engines: {node: '>=12'} @@ -451,6 +529,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-x64@0.19.12: + resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-x64@0.20.2: resolution: {integrity: sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==} engines: {node: '>=12'} @@ -460,6 +547,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm64@0.19.12: + resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm64@0.20.2: resolution: {integrity: sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==} engines: {node: '>=12'} @@ -469,6 +565,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm@0.19.12: + resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm@0.20.2: resolution: {integrity: sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==} engines: {node: '>=12'} @@ -478,6 +583,15 @@ packages: dev: true optional: true + /@esbuild/linux-ia32@0.19.12: + resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ia32@0.20.2: resolution: {integrity: sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==} engines: {node: '>=12'} @@ -487,6 +601,15 @@ packages: dev: true optional: true + /@esbuild/linux-loong64@0.19.12: + resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-loong64@0.20.2: resolution: {integrity: sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==} engines: {node: '>=12'} @@ -496,6 +619,15 @@ packages: dev: true optional: true + /@esbuild/linux-mips64el@0.19.12: + resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-mips64el@0.20.2: resolution: {integrity: sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==} engines: {node: '>=12'} @@ -505,6 +637,15 @@ packages: dev: true optional: true + /@esbuild/linux-ppc64@0.19.12: + resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ppc64@0.20.2: resolution: {integrity: sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==} engines: {node: '>=12'} @@ -514,6 +655,15 @@ packages: dev: true optional: true + /@esbuild/linux-riscv64@0.19.12: + resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-riscv64@0.20.2: resolution: {integrity: sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==} engines: {node: '>=12'} @@ -523,6 +673,15 @@ packages: dev: true optional: true + /@esbuild/linux-s390x@0.19.12: + resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-s390x@0.20.2: resolution: {integrity: sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==} engines: {node: '>=12'} @@ -532,6 +691,15 @@ packages: dev: true optional: true + /@esbuild/linux-x64@0.19.12: + resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-x64@0.20.2: resolution: {integrity: sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==} engines: {node: '>=12'} @@ -541,6 +709,15 @@ packages: dev: true optional: true + /@esbuild/netbsd-x64@0.19.12: + resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/netbsd-x64@0.20.2: resolution: {integrity: sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==} engines: {node: '>=12'} @@ -550,6 +727,15 @@ packages: dev: true optional: true + /@esbuild/openbsd-x64@0.19.12: + resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/openbsd-x64@0.20.2: resolution: {integrity: sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==} engines: {node: '>=12'} @@ -559,6 +745,15 @@ packages: dev: true optional: true + /@esbuild/sunos-x64@0.19.12: + resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + /@esbuild/sunos-x64@0.20.2: resolution: {integrity: sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==} engines: {node: '>=12'} @@ -568,6 +763,15 @@ packages: dev: true optional: true + /@esbuild/win32-arm64@0.19.12: + resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-arm64@0.20.2: resolution: {integrity: sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==} engines: {node: '>=12'} @@ -577,6 +781,15 @@ packages: dev: true optional: true + /@esbuild/win32-ia32@0.19.12: + resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-ia32@0.20.2: resolution: {integrity: sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==} engines: {node: '>=12'} @@ -586,6 +799,15 @@ packages: dev: true optional: true + /@esbuild/win32-x64@0.19.12: + resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-x64@0.20.2: resolution: {integrity: sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==} engines: {node: '>=12'} @@ -739,6 +961,10 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true + /@jsdevtools/ono@7.1.3: + resolution: {integrity: sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==} + dev: true + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -2611,6 +2837,37 @@ packages: is-date-object: 1.0.5 is-symbol: 1.0.4 + /esbuild@0.19.12: + resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/aix-ppc64': 0.19.12 + '@esbuild/android-arm': 0.19.12 + '@esbuild/android-arm64': 0.19.12 + '@esbuild/android-x64': 0.19.12 + '@esbuild/darwin-arm64': 0.19.12 + '@esbuild/darwin-x64': 0.19.12 + '@esbuild/freebsd-arm64': 0.19.12 + '@esbuild/freebsd-x64': 0.19.12 + '@esbuild/linux-arm': 0.19.12 + '@esbuild/linux-arm64': 0.19.12 + '@esbuild/linux-ia32': 0.19.12 + '@esbuild/linux-loong64': 0.19.12 + '@esbuild/linux-mips64el': 0.19.12 + '@esbuild/linux-ppc64': 0.19.12 + '@esbuild/linux-riscv64': 0.19.12 + '@esbuild/linux-s390x': 0.19.12 + '@esbuild/linux-x64': 0.19.12 + '@esbuild/netbsd-x64': 0.19.12 + '@esbuild/openbsd-x64': 0.19.12 + '@esbuild/sunos-x64': 0.19.12 + '@esbuild/win32-arm64': 0.19.12 + '@esbuild/win32-ia32': 0.19.12 + '@esbuild/win32-x64': 0.19.12 + dev: true + /esbuild@0.20.2: resolution: {integrity: sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==} engines: {node: '>=12'} @@ -2902,6 +3159,17 @@ packages: esrecurse: 4.3.0 estraverse: 5.3.0 + /eslint-typegen@0.2.2(eslint@8.57.0): + resolution: {integrity: sha512-hgKW5octZPdbnOvzWYjzdk3fD8P8n2c7RvmYlVF3zLFjkf2wyvAf9QRt/r8a7jYzqh6lZrVgr81XOe5jwz3z9g==} + peerDependencies: + eslint: ^8.45.0 || ^9.0.0 + dependencies: + '@types/eslint': 8.56.9 + eslint: 8.57.0 + json-schema-to-typescript-lite: 14.0.0 + ohash: 1.1.3 + dev: true + /eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3224,7 +3492,6 @@ packages: resolution: {integrity: sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==} dependencies: resolve-pkg-maps: 1.0.0 - dev: false /git-log-parser@1.2.0: resolution: {integrity: sha512-rnCVNfkTL8tdNryFuaY0fYiBWEBcgF748O6ZI61rslBvr2o7U65c2/6npCRqH40vuAhtgtDiqLTJjBVdrejCzA==} @@ -3886,6 +4153,14 @@ packages: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} dev: true + /json-schema-to-typescript-lite@14.0.0: + resolution: {integrity: sha512-On0b6UdEgdotLzWk37yNId2wK77P7UfxuCWDEgduoz1VLR4rPbDcQGW6zlHVgL62Bq7gERq0JMmUyAjJigxYHg==} + engines: {node: '>=20.0.0'} + dependencies: + '@apidevtools/json-schema-ref-parser': 11.5.4 + '@types/json-schema': 7.0.15 + dev: true + /json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} @@ -5045,7 +5320,6 @@ packages: /resolve-pkg-maps@1.0.0: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} - dev: false /resolve@1.22.8: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} @@ -5595,6 +5869,17 @@ packages: typescript: 5.4.5 dev: false + /tsx@4.7.2: + resolution: {integrity: sha512-BCNd4kz6fz12fyrgCTEdZHGJ9fWTGeUzXmQysh0RVocDY3h4frk05ZNCXSy4kIenF7y/QnrdiVpTsyNRn6vlAw==} + engines: {node: '>=18.0.0'} + hasBin: true + dependencies: + esbuild: 0.19.12 + get-tsconfig: 4.7.3 + optionalDependencies: + fsevents: 2.3.3 + dev: true + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} diff --git a/scripts/typegen.ts b/scripts/typegen.ts new file mode 100644 index 0000000..ce09087 --- /dev/null +++ b/scripts/typegen.ts @@ -0,0 +1,25 @@ +import fs from "node:fs/promises"; + +import { builtinRules } from "eslint/use-at-your-own-risk"; +import { flatConfigsToRulesDTS } from "eslint-typegen/core"; + +import config from "../src"; + +const ruleDts = await flatConfigsToRulesDTS( + [ + { + plugins: { + "": { + rules: Object.fromEntries(builtinRules.entries()), + }, + }, + }, + // @ts-expect-error TODO: config types don't seem to match + ...config({ autoDetect: true }), + ], + { + includeAugmentation: false, + }, +); + +await fs.writeFile("src/rules.gen.d.ts", ruleDts); diff --git a/src/configs/commonjs.ts b/src/configs/commonjs.ts index 1fdc16a..3f5c3fe 100644 --- a/src/configs/commonjs.ts +++ b/src/configs/commonjs.ts @@ -1,6 +1,7 @@ import globals from "globals"; import { GLOB_CJS } from "../constants"; +import { type FlatConfigItem } from "../types"; export const commonjsConfig = () => { return [ @@ -11,5 +12,5 @@ export const commonjsConfig = () => { globals: globals.commonjs, }, }, - ]; + ] satisfies FlatConfigItem[]; }; diff --git a/src/configs/imports.ts b/src/configs/imports.ts index 76a9f5b..f4647d8 100644 --- a/src/configs/imports.ts +++ b/src/configs/imports.ts @@ -1,3 +1,4 @@ +import { type ESLint, type Linter } from "eslint"; import importX from "eslint-plugin-import-x"; import nodeImport from "eslint-plugin-node-import"; import simpleImportSort from "eslint-plugin-simple-import-sort"; @@ -26,7 +27,8 @@ const importsConfig = ({ typescript = false }: ImportsConfigOptions = {}) => { { name: "jimmy.codes/imports", plugins: { - "import-x": importX, + // TODO: remove unknown conversion + "import-x": importX as unknown as ESLint.Plugin, "simple-import-sort": simpleImportSort, "node-import": nodeImport, }, @@ -45,7 +47,7 @@ const importsConfig = ({ typescript = false }: ImportsConfigOptions = {}) => { rules: importsRules, }, ...(typescript ? [typescriptImports] : []), - ]; + ] satisfies Linter.FlatConfig[]; }; export default importsConfig; diff --git a/src/configs/react.ts b/src/configs/react.ts index 789652f..e8451e3 100644 --- a/src/configs/react.ts +++ b/src/configs/react.ts @@ -8,7 +8,7 @@ import globals from "globals"; import { GLOB_JSX, GLOB_TSX } from "../constants"; import { hasReactQuery } from "../has-dep"; import { reactRules } from "../rules/react"; -import { type ReactOptions } from "../types"; +import { type FlatConfigItem, type ReactOptions, type Rules } from "../types"; const reactConfig = ( { utilities = [] }: ReactOptions = {}, @@ -59,11 +59,11 @@ const reactConfig = ( "@tanstack/query/exhaustive-deps": "error", "@tanstack/query/no-rest-destructuring": "warn", "@tanstack/query/stable-query-client": "error", - }, + } satisfies Rules, }, ] : []), - ]; + ] satisfies FlatConfigItem[]; }; export default reactConfig; diff --git a/src/configs/testing-library.ts b/src/configs/testing-library.ts index 3bdcd03..5152a5f 100644 --- a/src/configs/testing-library.ts +++ b/src/configs/testing-library.ts @@ -2,6 +2,7 @@ import * as jestDom from "eslint-plugin-jest-dom"; import testingLibrary from "eslint-plugin-testing-library"; import { GLOB_E2E, GLOB_TESTS } from "../constants"; +import { type FlatConfigItem } from "../types"; const testingLibraryConfig = () => { return [ @@ -24,7 +25,7 @@ const testingLibraryConfig = () => { "testing-library/prefer-screen-queries": "off", }, }, - ]; + ] satisfies FlatConfigItem[]; }; export default testingLibraryConfig; diff --git a/src/configs/testing.ts b/src/configs/testing.ts index a17be38..b10c23e 100644 --- a/src/configs/testing.ts +++ b/src/configs/testing.ts @@ -3,7 +3,7 @@ import jest from "eslint-plugin-jest"; import { ALLOWED_VITEST_FUNCS, GLOB_E2E, GLOB_TESTS } from "../constants"; import { hasJest, hasTestingLibrary, hasVitest } from "../has-dep"; import { jestRules } from "../rules/jest"; -import { type TestingOptions } from "../types"; +import { type Rules, type TestingOptions } from "../types"; import testingLibraryConfig from "./testing-library"; const testingConfig = ( @@ -37,7 +37,7 @@ const testingConfig = ( allowedFunctionCalls: ALLOWED_VITEST_FUNCS, }, ], - }, + } satisfies Rules, }, ] : []), @@ -58,7 +58,7 @@ const testingConfig = ( "jest/expect-expect": "off", "jest/no-deprecated-functions": "off", "jest/require-hook": "off", - }, + } satisfies Rules, }, ...(includeTestingLibrary ? testingLibraryConfig() : []), ]; diff --git a/src/rules.gen.d.ts b/src/rules.gen.d.ts new file mode 100644 index 0000000..0afa26a --- /dev/null +++ b/src/rules.gen.d.ts @@ -0,0 +1,12406 @@ +/* eslint-disable */ +/* prettier-ignore */ +import type { Linter } from 'eslint' + +export interface RuleOptions { + /** + * Exhaustive deps rule for useQuery + * @see https://tanstack.com/query/latest/docs/eslint/exhaustive-deps + */ + "@tanstack/query/exhaustive-deps"?: Linter.RuleEntry<[]>; + /** + * Disallows rest destructuring in queries + * @see https://tanstack.com/query/latest/docs/eslint/no-rest-destructuring + */ + "@tanstack/query/no-rest-destructuring"?: Linter.RuleEntry<[]>; + /** + * Makes sure that QueryClient is stable + * @see https://tanstack.com/query/latest/docs/eslint/stable-query-client + */ + "@tanstack/query/stable-query-client"?: 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<[]>; + /** + * Disallow certain types + * @see https://typescript-eslint.io/rules/ban-types + */ + "@typescript-eslint/ban-types"?: Linter.RuleEntry; + /** + * Disallow or enforce spaces inside of blocks after opening block and before closing block + * @see https://typescript-eslint.io/rules/block-spacing + * @deprecated + */ + "@typescript-eslint/block-spacing"?: Linter.RuleEntry; + /** + * Enforce consistent brace style for blocks + * @see https://typescript-eslint.io/rules/brace-style + * @deprecated + */ + "@typescript-eslint/brace-style"?: 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; + /** + * Require or disallow trailing commas + * @see https://typescript-eslint.io/rules/comma-dangle + * @deprecated + */ + "@typescript-eslint/comma-dangle"?: Linter.RuleEntry; + /** + * Enforce consistent spacing before and after commas + * @see https://typescript-eslint.io/rules/comma-spacing + * @deprecated + */ + "@typescript-eslint/comma-spacing"?: 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 spacing between function identifiers and their invocations + * @see https://typescript-eslint.io/rules/func-call-spacing + * @deprecated + */ + "@typescript-eslint/func-call-spacing"?: Linter.RuleEntry; + /** + * Enforce consistent indentation + * @see https://typescript-eslint.io/rules/indent + * @deprecated + */ + "@typescript-eslint/indent"?: Linter.RuleEntry; + /** + * Require or disallow initialization in variable declarations + * @see https://typescript-eslint.io/rules/init-declarations + */ + "@typescript-eslint/init-declarations"?: Linter.RuleEntry; + /** + * Enforce consistent spacing between property names and type annotations in types and interfaces + * @see https://typescript-eslint.io/rules/key-spacing + * @deprecated + */ + "@typescript-eslint/key-spacing"?: Linter.RuleEntry; + /** + * Enforce consistent spacing before and after keywords + * @see https://typescript-eslint.io/rules/keyword-spacing + * @deprecated + */ + "@typescript-eslint/keyword-spacing"?: Linter.RuleEntry; + /** + * Require empty lines around comments + * @see https://typescript-eslint.io/rules/lines-around-comment + * @deprecated + */ + "@typescript-eslint/lines-around-comment"?: Linter.RuleEntry; + /** + * Require or disallow an empty line between class members + * @see https://typescript-eslint.io/rules/lines-between-class-members + * @deprecated + */ + "@typescript-eslint/lines-between-class-members"?: 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 specific member delimiter style for interfaces and type literals + * @see https://typescript-eslint.io/rules/member-delimiter-style + * @deprecated + */ + "@typescript-eslint/member-delimiter-style"?: 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()` 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 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 + */ + "@typescript-eslint/no-empty-interface"?: 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 unnecessary parentheses + * @see https://typescript-eslint.io/rules/no-extra-parens + * @deprecated + */ + "@typescript-eslint/no-extra-parens"?: Linter.RuleEntry; + /** + * Disallow unnecessary semicolons + * @see https://typescript-eslint.io/rules/no-extra-semi + * @deprecated + */ + "@typescript-eslint/no-extra-semi"?: 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 + */ + "@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 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 throwing literals as exceptions + * @see https://typescript-eslint.io/rules/no-throw-literal + * @deprecated + */ + "@typescript-eslint/no-throw-literal"?: 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 namespace qualifiers + * @see https://typescript-eslint.io/rules/no-unnecessary-qualifier + */ + "@typescript-eslint/no-unnecessary-qualifier"?: 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 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 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<[]>; + /** + * 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 unnecessary template literals + * @see https://typescript-eslint.io/rules/no-useless-template-literals + */ + "@typescript-eslint/no-useless-template-literals"?: Linter.RuleEntry<[]>; + /** + * Disallow `require` statements except in import statements + * @see https://typescript-eslint.io/rules/no-var-requires + */ + "@typescript-eslint/no-var-requires"?: Linter.RuleEntry; + /** + * Enforce non-null assertions over explicit type casts + * @see https://typescript-eslint.io/rules/non-nullable-type-assertion-style + */ + "@typescript-eslint/non-nullable-type-assertion-style"?: Linter.RuleEntry<[]>; + /** + * Enforce consistent spacing inside braces + * @see https://typescript-eslint.io/rules/object-curly-spacing + * @deprecated + */ + "@typescript-eslint/object-curly-spacing"?: 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 padding lines between statements + * @see https://typescript-eslint.io/rules/padding-line-between-statements + * @deprecated + */ + "@typescript-eslint/padding-line-between-statements"?: 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 casting + * @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 + */ + "@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 the consistent use of either backticks, double, or single quotes + * @see https://typescript-eslint.io/rules/quotes + * @deprecated + */ + "@typescript-eslint/quotes"?: 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 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 returning of awaited values + * @see https://typescript-eslint.io/rules/return-await + */ + "@typescript-eslint/return-await"?: Linter.RuleEntry; + /** + * Require or disallow semicolons instead of ASI + * @see https://typescript-eslint.io/rules/semi + * @deprecated + */ + "@typescript-eslint/semi"?: Linter.RuleEntry; + /** + * Enforce constituents of a type union/intersection to be sorted alphabetically + * @see https://typescript-eslint.io/rules/sort-type-constituents + */ + "@typescript-eslint/sort-type-constituents"?: Linter.RuleEntry; + /** + * Enforce consistent spacing before blocks + * @see https://typescript-eslint.io/rules/space-before-blocks + * @deprecated + */ + "@typescript-eslint/space-before-blocks"?: Linter.RuleEntry; + /** + * Enforce consistent spacing before function parenthesis + * @see https://typescript-eslint.io/rules/space-before-function-paren + * @deprecated + */ + "@typescript-eslint/space-before-function-paren"?: Linter.RuleEntry; + /** + * Require spacing around infix operators + * @see https://typescript-eslint.io/rules/space-infix-ops + * @deprecated + */ + "@typescript-eslint/space-infix-ops"?: 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 consistent spacing around type annotations + * @see https://typescript-eslint.io/rules/type-annotation-spacing + * @deprecated + */ + "@typescript-eslint/type-annotation-spacing"?: 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 `.catch()` callbacks as `unknown` + * @see https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable + */ + "@typescript-eslint/use-unknown-in-catch-callback-variable"?: Linter.RuleEntry< + [] + >; + /** + * Enforce getter and setter pairs in objects and classes + * @see https://eslint.org/docs/latest/rules/accessor-pairs + */ + "accessor-pairs"?: Linter.RuleEntry; + /** + * Enforce linebreaks after opening and before closing array brackets + * @see https://eslint.org/docs/latest/rules/array-bracket-newline + * @deprecated + */ + "array-bracket-newline"?: Linter.RuleEntry; + /** + * Enforce consistent spacing inside array brackets + * @see https://eslint.org/docs/latest/rules/array-bracket-spacing + * @deprecated + */ + "array-bracket-spacing"?: Linter.RuleEntry; + /** + * Enforce `return` statements in callbacks of array methods + * @see https://eslint.org/docs/latest/rules/array-callback-return + */ + "array-callback-return"?: Linter.RuleEntry; + /** + * Enforce line breaks after each array element + * @see https://eslint.org/docs/latest/rules/array-element-newline + * @deprecated + */ + "array-element-newline"?: Linter.RuleEntry; + /** + * Require braces around arrow function bodies + * @see https://eslint.org/docs/latest/rules/arrow-body-style + */ + "arrow-body-style"?: Linter.RuleEntry; + /** + * Require parentheses around arrow function arguments + * @see https://eslint.org/docs/latest/rules/arrow-parens + * @deprecated + */ + "arrow-parens"?: Linter.RuleEntry; + /** + * Enforce consistent spacing before and after the arrow in arrow functions + * @see https://eslint.org/docs/latest/rules/arrow-spacing + * @deprecated + */ + "arrow-spacing"?: Linter.RuleEntry; + /** + * Enforce the use of variables within the scope they are defined + * @see https://eslint.org/docs/latest/rules/block-scoped-var + */ + "block-scoped-var"?: Linter.RuleEntry<[]>; + /** + * Disallow or enforce spaces inside of blocks after opening block and before closing block + * @see https://eslint.org/docs/latest/rules/block-spacing + * @deprecated + */ + "block-spacing"?: Linter.RuleEntry; + /** + * Enforce consistent brace style for blocks + * @see https://eslint.org/docs/latest/rules/brace-style + * @deprecated + */ + "brace-style"?: Linter.RuleEntry; + /** + * Require `return` statements after callbacks + * @see https://eslint.org/docs/latest/rules/callback-return + * @deprecated + */ + "callback-return"?: Linter.RuleEntry; + /** + * Enforce camelcase naming convention + * @see https://eslint.org/docs/latest/rules/camelcase + */ + "camelcase"?: Linter.RuleEntry; + /** + * Enforce or disallow capitalization of the first letter of a comment + * @see https://eslint.org/docs/latest/rules/capitalized-comments + */ + "capitalized-comments"?: Linter.RuleEntry; + /** + * Enforce that class methods utilize `this` + * @see https://eslint.org/docs/latest/rules/class-methods-use-this + */ + "class-methods-use-this"?: Linter.RuleEntry; + /** + * Require or disallow trailing commas + * @see https://eslint.org/docs/latest/rules/comma-dangle + * @deprecated + */ + "comma-dangle"?: Linter.RuleEntry; + /** + * Enforce consistent spacing before and after commas + * @see https://eslint.org/docs/latest/rules/comma-spacing + * @deprecated + */ + "comma-spacing"?: Linter.RuleEntry; + /** + * Enforce consistent comma style + * @see https://eslint.org/docs/latest/rules/comma-style + * @deprecated + */ + "comma-style"?: Linter.RuleEntry; + /** + * Enforce a maximum cyclomatic complexity allowed in a program + * @see https://eslint.org/docs/latest/rules/complexity + */ + "complexity"?: Linter.RuleEntry; + /** + * Enforce consistent spacing inside computed property brackets + * @see https://eslint.org/docs/latest/rules/computed-property-spacing + * @deprecated + */ + "computed-property-spacing"?: Linter.RuleEntry; + /** + * Require `return` statements to either always or never specify values + * @see https://eslint.org/docs/latest/rules/consistent-return + */ + "consistent-return"?: Linter.RuleEntry; + /** + * Enforce consistent naming when capturing the current execution context + * @see https://eslint.org/docs/latest/rules/consistent-this + */ + "consistent-this"?: Linter.RuleEntry; + /** + * Require `super()` calls in constructors + * @see https://eslint.org/docs/latest/rules/constructor-super + */ + "constructor-super"?: Linter.RuleEntry<[]>; + /** + * Enforce consistent brace style for all control statements + * @see https://eslint.org/docs/latest/rules/curly + */ + "curly"?: Linter.RuleEntry; + /** + * Require `default` cases in `switch` statements + * @see https://eslint.org/docs/latest/rules/default-case + */ + "default-case"?: Linter.RuleEntry; + /** + * Enforce default clauses in switch statements to be last + * @see https://eslint.org/docs/latest/rules/default-case-last + */ + "default-case-last"?: Linter.RuleEntry<[]>; + /** + * Enforce default parameters to be last + * @see https://eslint.org/docs/latest/rules/default-param-last + */ + "default-param-last"?: Linter.RuleEntry<[]>; + /** + * Enforce consistent newlines before and after dots + * @see https://eslint.org/docs/latest/rules/dot-location + * @deprecated + */ + "dot-location"?: Linter.RuleEntry; + /** + * Enforce dot notation whenever possible + * @see https://eslint.org/docs/latest/rules/dot-notation + */ + "dot-notation"?: Linter.RuleEntry; + /** + * Require or disallow newline at the end of files + * @see https://eslint.org/docs/latest/rules/eol-last + * @deprecated + */ + "eol-last"?: Linter.RuleEntry; + /** + * Require the use of `===` and `!==` + * @see https://eslint.org/docs/latest/rules/eqeqeq + */ + "eqeqeq"?: Linter.RuleEntry; + /** + * Enforce "for" loop update clause moving the counter in the right direction + * @see https://eslint.org/docs/latest/rules/for-direction + */ + "for-direction"?: Linter.RuleEntry<[]>; + /** + * Require or disallow spacing between function identifiers and their invocations + * @see https://eslint.org/docs/latest/rules/func-call-spacing + * @deprecated + */ + "func-call-spacing"?: Linter.RuleEntry; + /** + * Require function names to match the name of the variable or property to which they are assigned + * @see https://eslint.org/docs/latest/rules/func-name-matching + */ + "func-name-matching"?: Linter.RuleEntry; + /** + * Require or disallow named `function` expressions + * @see https://eslint.org/docs/latest/rules/func-names + */ + "func-names"?: Linter.RuleEntry; + /** + * Enforce the consistent use of either `function` declarations or expressions + * @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/v0.5.0/docs/rules/consistent-type-specifier-style.md + */ + "import-x/consistent-type-specifier-style"?: Linter.RuleEntry; + /** + * Ensure a default export is present, given a default import. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/default.md + */ + "import-x/default"?: Linter.RuleEntry<[]>; + /** + * Enforce a leading comment with the webpackChunkName for dynamic imports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/dynamic-import-chunkname.md + */ + "import-x/dynamic-import-chunkname"?: Linter.RuleEntry; + /** + * Forbid any invalid exports, i.e. re-export of the same name. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/export.md + */ + "import-x/export"?: Linter.RuleEntry<[]>; + /** + * Ensure all exports appear after other statements. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/exports-last.md + */ + "import-x/exports-last"?: Linter.RuleEntry<[]>; + /** + * Ensure consistent use of file extension within the import path. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/extensions.md + */ + "import-x/extensions"?: Linter.RuleEntry; + /** + * Ensure all imports appear before other statements. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/first.md + */ + "import-x/first"?: Linter.RuleEntry; + /** + * Prefer named exports to be grouped together in a single export declaration. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/group-exports.md + */ + "import-x/group-exports"?: Linter.RuleEntry<[]>; + /** + * Replaced by `import-x/first`. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/7b25c1cb95ee18acc1531002fd343e1e6031f9ed/docs/rules/imports-first.md + * @deprecated + */ + "import-x/imports-first"?: Linter.RuleEntry; + /** + * Enforce the maximum number of dependencies a module can have. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/max-dependencies.md + */ + "import-x/max-dependencies"?: Linter.RuleEntry; + /** + * Ensure named imports correspond to a named export in the remote file. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/named.md + */ + "import-x/named"?: Linter.RuleEntry; + /** + * Ensure imported namespaces contain dereferenced properties as they are dereferenced. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/namespace.md + */ + "import-x/namespace"?: Linter.RuleEntry; + /** + * Enforce a newline after import statements. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/newline-after-import.md + */ + "import-x/newline-after-import"?: Linter.RuleEntry; + /** + * Forbid import of modules using absolute paths. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-absolute-path.md + */ + "import-x/no-absolute-path"?: Linter.RuleEntry; + /** + * Forbid AMD `require` and `define` calls. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-amd.md + */ + "import-x/no-amd"?: Linter.RuleEntry<[]>; + /** + * Forbid anonymous values as default exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-anonymous-default-export.md + */ + "import-x/no-anonymous-default-export"?: Linter.RuleEntry; + /** + * Forbid CommonJS `require` calls and `module.exports` or `exports.*`. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-commonjs.md + */ + "import-x/no-commonjs"?: Linter.RuleEntry; + /** + * Forbid a module from importing a module with a dependency path back to itself. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-cycle.md + */ + "import-x/no-cycle"?: Linter.RuleEntry; + /** + * Forbid default exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-default-export.md + */ + "import-x/no-default-export"?: Linter.RuleEntry<[]>; + /** + * Forbid imported names marked with `@deprecated` documentation tag. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-deprecated.md + */ + "import-x/no-deprecated"?: Linter.RuleEntry<[]>; + /** + * Forbid repeated import of the same module in multiple places. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-duplicates.md + */ + "import-x/no-duplicates"?: Linter.RuleEntry; + /** + * Forbid `require()` calls with expressions. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-dynamic-require.md + */ + "import-x/no-dynamic-require"?: Linter.RuleEntry; + /** + * Forbid empty named import blocks. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-empty-named-blocks.md + */ + "import-x/no-empty-named-blocks"?: Linter.RuleEntry<[]>; + /** + * Forbid the use of extraneous packages. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-extraneous-dependencies.md + */ + "import-x/no-extraneous-dependencies"?: Linter.RuleEntry; + /** + * Forbid import statements with CommonJS module.exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-import-module-exports.md + */ + "import-x/no-import-module-exports"?: Linter.RuleEntry; + /** + * Forbid importing the submodules of other modules. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-internal-modules.md + */ + "import-x/no-internal-modules"?: Linter.RuleEntry; + /** + * Forbid the use of mutable exports with `var` or `let`. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-mutable-exports.md + */ + "import-x/no-mutable-exports"?: Linter.RuleEntry<[]>; + /** + * Forbid use of exported name as identifier of default export. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-as-default.md + */ + "import-x/no-named-as-default"?: Linter.RuleEntry<[]>; + /** + * Forbid use of exported name as property of default export. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-as-default-member.md + */ + "import-x/no-named-as-default-member"?: Linter.RuleEntry<[]>; + /** + * Forbid named default exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-default.md + */ + "import-x/no-named-default"?: Linter.RuleEntry<[]>; + /** + * Forbid named exports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-named-export.md + */ + "import-x/no-named-export"?: Linter.RuleEntry<[]>; + /** + * Forbid namespace (a.k.a. "wildcard" `*`) imports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-namespace.md + */ + "import-x/no-namespace"?: Linter.RuleEntry; + /** + * Forbid Node.js builtin modules. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-nodejs-modules.md + */ + "import-x/no-nodejs-modules"?: Linter.RuleEntry; + /** + * Forbid importing packages through relative paths. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-relative-packages.md + */ + "import-x/no-relative-packages"?: Linter.RuleEntry; + /** + * Forbid importing modules from parent directories. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-relative-parent-imports.md + */ + "import-x/no-relative-parent-imports"?: Linter.RuleEntry; + /** + * Enforce which files can be imported in a given folder. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-restricted-paths.md + */ + "import-x/no-restricted-paths"?: Linter.RuleEntry; + /** + * Forbid a module from importing itself. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-self-import.md + */ + "import-x/no-self-import"?: Linter.RuleEntry<[]>; + /** + * Forbid unassigned imports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-unassigned-import.md + */ + "import-x/no-unassigned-import"?: Linter.RuleEntry; + /** + * Ensure imports point to a file/module that can be resolved. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-unresolved.md + */ + "import-x/no-unresolved"?: Linter.RuleEntry; + /** + * Forbid modules without exports, or exports without matching import in another module. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-unused-modules.md + */ + "import-x/no-unused-modules"?: Linter.RuleEntry; + /** + * Forbid unnecessary path segments in import and require statements. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-useless-path-segments.md + */ + "import-x/no-useless-path-segments"?: Linter.RuleEntry; + /** + * Forbid webpack loader syntax in imports. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/no-webpack-loader-syntax.md + */ + "import-x/no-webpack-loader-syntax"?: Linter.RuleEntry<[]>; + /** + * Enforce a convention in module import order. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/order.md + */ + "import-x/order"?: Linter.RuleEntry; + /** + * Prefer a default export if module exports a single name or multiple names. + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/prefer-default-export.md + */ + "import-x/prefer-default-export"?: Linter.RuleEntry; + /** + * Forbid potentially ambiguous parse goal (`script` vs. `module`). + * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.0/docs/rules/unambiguous.md + */ + "import-x/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; + /** + * prefer toBeChecked over checking attributes + * @see prefer-checked + */ + "jest-dom/prefer-checked"?: Linter.RuleEntry<[]>; + /** + * Prefer toBeEmpty over checking innerHTML + * @see prefer-empty + */ + "jest-dom/prefer-empty"?: Linter.RuleEntry<[]>; + /** + * prefer toBeDisabled or toBeEnabled over checking attributes + * @see prefer-enabled-disabled + */ + "jest-dom/prefer-enabled-disabled"?: Linter.RuleEntry<[]>; + /** + * prefer toHaveFocus over checking document.activeElement + * @see prefer-focus + */ + "jest-dom/prefer-focus"?: Linter.RuleEntry<[]>; + /** + * Prefer .toBeInTheDocument() for asserting the existence of a DOM node + * @see prefer-in-document + */ + "jest-dom/prefer-in-document"?: Linter.RuleEntry<[]>; + /** + * prefer toBeRequired over checking properties + * @see prefer-required + */ + "jest-dom/prefer-required"?: Linter.RuleEntry<[]>; + /** + * prefer toHaveAttribute over checking getAttribute/hasAttribute + * @see prefer-to-have-attribute + */ + "jest-dom/prefer-to-have-attribute"?: Linter.RuleEntry<[]>; + /** + * prefer toHaveClass over checking element className + * @see prefer-to-have-class + */ + "jest-dom/prefer-to-have-class"?: Linter.RuleEntry<[]>; + /** + * prefer toHaveStyle over checking element style + * @see prefer-to-have-style + */ + "jest-dom/prefer-to-have-style"?: Linter.RuleEntry<[]>; + /** + * Prefer toHaveTextContent over checking element.textContent + * @see prefer-to-have-text-content + */ + "jest-dom/prefer-to-have-text-content"?: Linter.RuleEntry<[]>; + /** + * prefer toHaveValue over checking element.value + * @see prefer-to-have-value + */ + "jest-dom/prefer-to-have-value"?: Linter.RuleEntry<[]>; + /** + * Enforce `test` and `it` usage conventions + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/consistent-test-it.md + */ + "jest/consistent-test-it"?: Linter.RuleEntry; + /** + * Enforce assertion to be made in a test body + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/expect-expect.md + */ + "jest/expect-expect"?: Linter.RuleEntry; + /** + * Enforces a maximum number assertion calls in a test body + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/max-expects.md + */ + "jest/max-expects"?: Linter.RuleEntry; + /** + * Enforces a maximum depth to nested describe calls + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/max-nested-describe.md + */ + "jest/max-nested-describe"?: Linter.RuleEntry; + /** + * Disallow alias methods + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-alias-methods.md + */ + "jest/no-alias-methods"?: Linter.RuleEntry<[]>; + /** + * Disallow commented out tests + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-commented-out-tests.md + */ + "jest/no-commented-out-tests"?: Linter.RuleEntry<[]>; + /** + * Disallow calling `expect` conditionally + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-conditional-expect.md + */ + "jest/no-conditional-expect"?: Linter.RuleEntry<[]>; + /** + * Disallow conditional logic in tests + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-conditional-in-test.md + */ + "jest/no-conditional-in-test"?: Linter.RuleEntry<[]>; + /** + * Disallow confusing usages of jest.setTimeout + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-confusing-set-timeout.md + */ + "jest/no-confusing-set-timeout"?: Linter.RuleEntry<[]>; + /** + * Disallow use of deprecated functions + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-deprecated-functions.md + */ + "jest/no-deprecated-functions"?: Linter.RuleEntry<[]>; + /** + * Disallow disabled tests + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-disabled-tests.md + */ + "jest/no-disabled-tests"?: Linter.RuleEntry<[]>; + /** + * Disallow using a callback in asynchronous tests and hooks + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-done-callback.md + */ + "jest/no-done-callback"?: Linter.RuleEntry<[]>; + /** + * Disallow duplicate setup and teardown hooks + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-duplicate-hooks.md + */ + "jest/no-duplicate-hooks"?: Linter.RuleEntry<[]>; + /** + * Disallow using `exports` in files containing tests + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-export.md + */ + "jest/no-export"?: Linter.RuleEntry<[]>; + /** + * Disallow focused tests + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-focused-tests.md + */ + "jest/no-focused-tests"?: Linter.RuleEntry<[]>; + /** + * Disallow setup and teardown hooks + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-hooks.md + */ + "jest/no-hooks"?: Linter.RuleEntry; + /** + * Disallow identical titles + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-identical-title.md + */ + "jest/no-identical-title"?: Linter.RuleEntry<[]>; + /** + * Disallow string interpolation inside snapshots + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-interpolation-in-snapshots.md + */ + "jest/no-interpolation-in-snapshots"?: Linter.RuleEntry<[]>; + /** + * Disallow Jasmine globals + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-jasmine-globals.md + */ + "jest/no-jasmine-globals"?: Linter.RuleEntry<[]>; + /** + * Disallow large snapshots + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-large-snapshots.md + */ + "jest/no-large-snapshots"?: Linter.RuleEntry; + /** + * Disallow manually importing from `__mocks__` + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-mocks-import.md + */ + "jest/no-mocks-import"?: Linter.RuleEntry<[]>; + /** + * Disallow specific `jest.` methods + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-restricted-jest-methods.md + */ + "jest/no-restricted-jest-methods"?: Linter.RuleEntry; + /** + * Disallow specific matchers & modifiers + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-restricted-matchers.md + */ + "jest/no-restricted-matchers"?: Linter.RuleEntry; + /** + * Disallow using `expect` outside of `it` or `test` blocks + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-standalone-expect.md + */ + "jest/no-standalone-expect"?: Linter.RuleEntry; + /** + * Require using `.only` and `.skip` over `f` and `x` + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-test-prefixes.md + */ + "jest/no-test-prefixes"?: Linter.RuleEntry<[]>; + /** + * Disallow explicitly returning from tests + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-test-return-statement.md + */ + "jest/no-test-return-statement"?: Linter.RuleEntry<[]>; + /** + * Disallow using `jest.mock()` factories without an explicit type parameter + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/no-untyped-mock-factory.md + */ + "jest/no-untyped-mock-factory"?: Linter.RuleEntry<[]>; + /** + * Suggest using `toBeCalledWith()` or `toHaveBeenCalledWith()` + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/prefer-called-with.md + */ + "jest/prefer-called-with"?: Linter.RuleEntry<[]>; + /** + * Suggest using the built-in comparison matchers + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/prefer-comparison-matcher.md + */ + "jest/prefer-comparison-matcher"?: Linter.RuleEntry<[]>; + /** + * Prefer using `.each` rather than manual loops + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/prefer-each.md + */ + "jest/prefer-each"?: Linter.RuleEntry<[]>; + /** + * Suggest using the built-in equality matchers + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/prefer-equality-matcher.md + */ + "jest/prefer-equality-matcher"?: Linter.RuleEntry<[]>; + /** + * Suggest using `expect.assertions()` OR `expect.hasAssertions()` + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/prefer-expect-assertions.md + */ + "jest/prefer-expect-assertions"?: Linter.RuleEntry; + /** + * Prefer `await expect(...).resolves` over `expect(await ...)` syntax + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/prefer-expect-resolves.md + */ + "jest/prefer-expect-resolves"?: Linter.RuleEntry<[]>; + /** + * Prefer having hooks in a consistent order + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/prefer-hooks-in-order.md + */ + "jest/prefer-hooks-in-order"?: Linter.RuleEntry<[]>; + /** + * Suggest having hooks before any test cases + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/prefer-hooks-on-top.md + */ + "jest/prefer-hooks-on-top"?: Linter.RuleEntry<[]>; + /** + * Prefer importing Jest globals + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/prefer-importing-jest-globals.md + */ + "jest/prefer-importing-jest-globals"?: Linter.RuleEntry<[]>; + /** + * Enforce lowercase test names + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/prefer-lowercase-title.md + */ + "jest/prefer-lowercase-title"?: Linter.RuleEntry; + /** + * Prefer mock resolved/rejected shorthands for promises + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/prefer-mock-promise-shorthand.md + */ + "jest/prefer-mock-promise-shorthand"?: Linter.RuleEntry<[]>; + /** + * Prefer including a hint with external snapshots + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/prefer-snapshot-hint.md + */ + "jest/prefer-snapshot-hint"?: Linter.RuleEntry; + /** + * Suggest using `jest.spyOn()` + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/prefer-spy-on.md + */ + "jest/prefer-spy-on"?: Linter.RuleEntry<[]>; + /** + * Suggest using `toStrictEqual()` + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/prefer-strict-equal.md + */ + "jest/prefer-strict-equal"?: Linter.RuleEntry<[]>; + /** + * Suggest using `toBe()` for primitive literals + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/prefer-to-be.md + */ + "jest/prefer-to-be"?: Linter.RuleEntry<[]>; + /** + * Suggest using `toContain()` + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/prefer-to-contain.md + */ + "jest/prefer-to-contain"?: Linter.RuleEntry<[]>; + /** + * Suggest using `toHaveLength()` + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/prefer-to-have-length.md + */ + "jest/prefer-to-have-length"?: Linter.RuleEntry<[]>; + /** + * Suggest using `test.todo` + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/prefer-todo.md + */ + "jest/prefer-todo"?: Linter.RuleEntry<[]>; + /** + * Require setup and teardown code to be within a hook + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/require-hook.md + */ + "jest/require-hook"?: Linter.RuleEntry; + /** + * Require a message for `toThrow()` + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/require-to-throw-message.md + */ + "jest/require-to-throw-message"?: Linter.RuleEntry<[]>; + /** + * Require test cases and hooks to be inside a `describe` block + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/require-top-level-describe.md + */ + "jest/require-top-level-describe"?: Linter.RuleEntry; + /** + * Enforce unbound methods are called with their expected scope + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/unbound-method.md + */ + "jest/unbound-method"?: Linter.RuleEntry; + /** + * Enforce valid `describe()` callback + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/valid-describe-callback.md + */ + "jest/valid-describe-callback"?: Linter.RuleEntry<[]>; + /** + * Enforce valid `expect()` usage + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/valid-expect.md + */ + "jest/valid-expect"?: Linter.RuleEntry; + /** + * Require promises that have expectations in their chain to be valid + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/valid-expect-in-promise.md + */ + "jest/valid-expect-in-promise"?: Linter.RuleEntry<[]>; + /** + * Enforce valid titles + * @see https://github.com/jest-community/eslint-plugin-jest/blob/v28.2.0/docs/rules/valid-title.md + */ + "jest/valid-title"?: Linter.RuleEntry; + /** + * Enforce emojis are wrapped in `` and provide screenreader 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 `