From 0138cabb2793775283afa027750367cadc9d23c9 Mon Sep 17 00:00:00 2001 From: Alex <8125011+alex-kinokon@users.noreply.github.com> Date: Sun, 25 Aug 2024 16:28:34 -0400 Subject: [PATCH] Update rules --- dist/index.d.ts | 4 + dist/package.json | 30 +- package.json | 26 +- pnpm-lock.yaml | 346 ++++++++++---------- scripts/build-local-rules.ts | 5 +- scripts/build.ts | 14 +- scripts/check-imports.ts | 7 +- src/commits.json | 6 +- src/custom/index.ts | 4 +- src/custom/no-useless-import-alias.ts | 45 +++ src/custom/restrict-template-expressions.ts | 4 +- src/env.ts | 9 +- src/index.ts | 8 +- src/local/index.ts | 2 + src/presets/custom.ts | 10 +- src/presets/misc.ts | 4 + src/presets/typescript.ts | 22 +- src/presets/unicorn.ts | 15 +- 18 files changed, 325 insertions(+), 236 deletions(-) create mode 100644 src/custom/no-useless-import-alias.ts diff --git a/dist/index.d.ts b/dist/index.d.ts index fcdc11d..9df2920 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -42,6 +42,8 @@ export interface LocalRuleOptions { }>; /** Ban assignment of empty object literals `{}` and replace them with `Object.create(null)` */ "custom/no-empty-object-literal": RuleEntry; + /** Ban useless import alias */ + "custom/no-useless-import-alias": RuleEntry; } export type RuleOptions = Rules & Partial; export interface CustomRule { @@ -64,6 +66,8 @@ export type InputConfig = Omit & { * Glob pattern to find paths to custom rule files in JavaScript or TypeScript. * Note this must be a string literal or an array of string literals since * this is statically analyzed. + * + * Rules are prefixed with `custom/` and the file name is used as the rule name. */ customRuleFiles?: string | string[]; /** diff --git a/dist/package.json b/dist/package.json index 54eb6fc..1120826 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "@aet/eslint-rules", - "version": "1.0.1-beta.28", + "version": "1.0.1-beta.42", "license": "UNLICENSED", "bin": { "eslint-install": "install.js", @@ -10,19 +10,21 @@ "eslint": "^8.57.0", "typescript": "^5.4.4" }, + "optionalDependencies": { + "@tanstack/eslint-plugin-query": "^5.52.0" + }, "dependencies": { - "@antfu/install-pkg": "^0.3.4", + "@antfu/install-pkg": "^0.4.0", "@nolyfill/is-core-module": "^1.0.39", - "@aet/eslint-define-config": "^0.1.0-beta.22", + "@aet/eslint-define-config": "^0.1.0-beta.24", "@eslint-community/eslint-utils": "^4.4.0", - "@tanstack/eslint-plugin-query": "^5.51.15", "@types/eslint": "^9.6.0", - "@typescript-eslint/eslint-plugin": "^8.1.0", - "@typescript-eslint/parser": "^8.1.0", - "@typescript-eslint/type-utils": "^8.1.0", - "@typescript-eslint/utils": "^8.1.0", - "@eslint-react/eslint-plugin": "1.10.0", - "@stylistic/eslint-plugin": "^2.6.2", + "@typescript-eslint/eslint-plugin": "^8.2.0", + "@typescript-eslint/parser": "^8.2.0", + "@typescript-eslint/type-utils": "^8.2.0", + "@typescript-eslint/utils": "^8.2.0", + "@eslint-react/eslint-plugin": "1.12.1", + "@stylistic/eslint-plugin": "^2.6.4", "aria-query": "^5.3.0", "axe-core": "^4.10.0", "axobject-query": "4.1.0", @@ -36,16 +38,16 @@ "eslint-module-utils": "^2.8.1", "eslint-plugin-es-x": "^8.0.0", "eslint-plugin-import-x": "^3.1.0", - "eslint-plugin-jsdoc": "^50.0.1", - "eslint-plugin-react-refresh": "^0.4.9", + "eslint-plugin-jsdoc": "^50.2.2", + "eslint-plugin-react-refresh": "^0.4.11", "eslint-plugin-unicorn": "^55.0.0", "esprima": "^4.0.1", "esquery": "^1.6.0", "estraverse": "^5.3.0", "fast-glob": "^3.3.2", "get-tsconfig": "^4.7.6", - "is-bun-module": "^1.0.2", - "ignore": "^5.3.1", + "is-bun-module": "^1.1.0", + "ignore": "^5.3.2", "is-glob": "^4.0.3", "language-tags": "^1.0.9", "lodash": "^4.17.21", diff --git a/package.json b/package.json index a8f2de3..f8f4d95 100644 --- a/package.json +++ b/package.json @@ -8,11 +8,11 @@ }, "private": true, "devDependencies": { - "@aet/eslint-define-config": "^0.1.0-beta.22", - "@antfu/install-pkg": "^0.3.4", + "@aet/eslint-define-config": "^0.1.0-beta.24", + "@antfu/install-pkg": "^0.4.0", "@babel/core": "^7.25.2", "@babel/plugin-transform-flow-strip-types": "^7.25.2", - "@babel/preset-env": "^7.25.3", + "@babel/preset-env": "^7.25.4", "@types/babel-plugin-macros": "^3.1.3", "@types/babel__core": "^7.20.5", "@types/eslint": "^9.6.0", @@ -21,20 +21,20 @@ "@types/estree": "^1.0.5", "@types/estree-jsx": "^1.0.5", "@types/lodash": "^4.17.7", - "@types/node": "^22.2.0", - "@typescript-eslint/eslint-plugin": "^8.1.0", - "@typescript-eslint/type-utils": "^8.1.0", - "@typescript-eslint/types": "^8.1.0", - "@typescript-eslint/typescript-estree": "^8.1.0", - "@typescript-eslint/utils": "^8.1.0", + "@types/node": "^22.5.0", + "@typescript-eslint/eslint-plugin": "^8.2.0", + "@typescript-eslint/type-utils": "^8.2.0", + "@typescript-eslint/types": "^8.2.0", + "@typescript-eslint/typescript-estree": "^8.2.0", + "@typescript-eslint/utils": "^8.2.0", "babel-plugin-macros": "^3.1.0", "dts-bundle-generator": "9.4.0", - "esbuild": "0.23.0", + "esbuild": "0.23.1", "esbuild-plugin-alias": "^0.2.1", "eslint": "8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-import-x": "^3.1.0", - "eslint-plugin-jsdoc": "^50.0.1", + "eslint-plugin-jsdoc": "^50.2.2", "eslint-plugin-unicorn": "^55.0.0", "esprima": "^4.0.1", "esquery": "^1.6.0", @@ -47,8 +47,8 @@ "picocolors": "^1.0.1", "prettier": "^3.3.3", "prop-types": "^15.8.1", - "terser": "^5.31.5", - "type-fest": "^4.24.0", + "terser": "^5.31.6", + "type-fest": "^4.25.0", "typescript": "^5.5.4" }, "prettier": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b97a6f9..ff074da 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -28,11 +28,11 @@ importers: .: devDependencies: '@aet/eslint-define-config': - specifier: ^0.1.0-beta.22 - version: 0.1.0-beta.22 + specifier: ^0.1.0-beta.24 + version: 0.1.0-beta.24 '@antfu/install-pkg': - specifier: ^0.3.3 - version: 0.3.3 + specifier: ^0.3.5 + version: 0.3.5 '@babel/core': specifier: ^7.25.2 version: 7.25.2 @@ -67,20 +67,20 @@ importers: specifier: ^4.17.7 version: 4.17.7 '@types/node': - specifier: ^22.2.0 - version: 22.2.0 + specifier: ^22.4.0 + version: 22.4.0 '@typescript-eslint/eslint-plugin': - specifier: ^8.0.1 - version: 8.0.1(@typescript-eslint/parser@8.0.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) + specifier: ^8.1.0 + version: 8.1.0(@typescript-eslint/parser@8.0.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/type-utils': - specifier: ^8.0.1 - version: 8.0.1(eslint@8.57.0)(typescript@5.5.4) + specifier: ^8.1.0 + version: 8.1.0(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/types': - specifier: ^8.0.1 - version: 8.0.1 + specifier: ^8.1.0 + version: 8.1.0 '@typescript-eslint/typescript-estree': - specifier: ^8.0.1 - version: 8.0.1(typescript@5.5.4) + specifier: ^8.1.0 + version: 8.1.0(typescript@5.5.4) '@typescript-eslint/utils': specifier: 8.0.0 version: 8.0.0(eslint@8.57.0)(typescript@5.5.4) @@ -91,8 +91,8 @@ importers: specifier: 9.4.0 version: 9.4.0 esbuild: - specifier: 0.23.0 - version: 0.23.0 + specifier: 0.23.1 + version: 0.23.1 esbuild-plugin-alias: specifier: ^0.2.1 version: 0.2.1 @@ -106,8 +106,8 @@ importers: specifier: ^3.1.0 version: 3.1.0(eslint@8.57.0)(typescript@5.5.4) eslint-plugin-jsdoc: - specifier: ^50.0.1 - version: 50.0.1(eslint@8.57.0) + specifier: ^50.2.2 + version: 50.2.2(eslint@8.57.0) eslint-plugin-unicorn: specifier: ^55.0.0 version: 55.0.0(eslint@8.57.0) @@ -145,8 +145,8 @@ importers: specifier: ^15.8.1 version: 15.8.1 terser: - specifier: ^5.31.5 - version: 5.31.5 + specifier: ^5.31.6 + version: 5.31.6 type-fest: specifier: ^4.24.0 version: 4.24.0 @@ -156,16 +156,16 @@ importers: packages: - '@aet/eslint-define-config@0.1.0-beta.22': - resolution: {integrity: sha512-c2G0WwfvrOxCGoJ1lYw5c+gKKlXp4ahdyAgJW+Mmir53SKGQjYUt/5Vr6cx2Qn9MjoLWPX4VgTQLmlRq/MS3wg==} + '@aet/eslint-define-config@0.1.0-beta.24': + resolution: {integrity: sha512-eFVYlxL0ORnucuaW3lDHzTmHOQKSb42QuvoO3PBokAAXRgmknGJUibprko0FDenA2rpLPReXfU5kwOvre+U3BA==} engines: {node: '>=18.0.0', npm: '>=9.0.0'} '@ampproject/remapping@2.3.0': resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} - '@antfu/install-pkg@0.3.3': - resolution: {integrity: sha512-nHHsk3NXQ6xkCfiRRC8Nfrg8pU5kkr3P3Y9s9dKqiuRmBD0Yap7fymNDjGFKeWhZQHqqbCS5CfeMy9wtExM24w==} + '@antfu/install-pkg@0.3.5': + resolution: {integrity: sha512-HwIACY0IzrM7FGafMbWZOqEDBSfCwPcylu+GacaRcxJm4Yvvuh3Dy2vZwqdJAzXponc6aLO9FaH4l75pq8/ZSA==} '@babel/code-frame@7.24.7': resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} @@ -751,150 +751,150 @@ packages: resolution: {integrity: sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==} engines: {node: '>=6.9.0'} - '@es-joy/jsdoccomment@0.46.0': - resolution: {integrity: sha512-C3Axuq1xd/9VqFZpW4YAzOx5O9q/LP46uIQy/iNDpHG3fmPa6TBtvfglMCs3RBiBxAIi0Go97r8+jvTt55XMyQ==} + '@es-joy/jsdoccomment@0.48.0': + resolution: {integrity: sha512-G6QUWIcC+KvSwXNsJyDTHvqUdNoAVJPPgkc3+Uk4WBKqZvoXhlvazOgm9aL0HwihJLQf0l+tOE2UFzXBqCqgDw==} engines: {node: '>=16'} - '@esbuild/aix-ppc64@0.23.0': - resolution: {integrity: sha512-3sG8Zwa5fMcA9bgqB8AfWPQ+HFke6uD3h1s3RIwUNK8EG7a4buxvuFTs3j1IMs2NXAk9F30C/FF4vxRgQCcmoQ==} + '@esbuild/aix-ppc64@0.23.1': + resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.23.0': - resolution: {integrity: sha512-EuHFUYkAVfU4qBdyivULuu03FhJO4IJN9PGuABGrFy4vUuzk91P2d+npxHcFdpUnfYKy0PuV+n6bKIpHOB3prQ==} + '@esbuild/android-arm64@0.23.1': + resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.23.0': - resolution: {integrity: sha512-+KuOHTKKyIKgEEqKbGTK8W7mPp+hKinbMBeEnNzjJGyFcWsfrXjSTNluJHCY1RqhxFurdD8uNXQDei7qDlR6+g==} + '@esbuild/android-arm@0.23.1': + resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.23.0': - resolution: {integrity: sha512-WRrmKidLoKDl56LsbBMhzTTBxrsVwTKdNbKDalbEZr0tcsBgCLbEtoNthOW6PX942YiYq8HzEnb4yWQMLQuipQ==} + '@esbuild/android-x64@0.23.1': + resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.23.0': - resolution: {integrity: sha512-YLntie/IdS31H54Ogdn+v50NuoWF5BDkEUFpiOChVa9UnKpftgwzZRrI4J132ETIi+D8n6xh9IviFV3eXdxfow==} + '@esbuild/darwin-arm64@0.23.1': + resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.23.0': - resolution: {integrity: sha512-IMQ6eme4AfznElesHUPDZ+teuGwoRmVuuixu7sv92ZkdQcPbsNHzutd+rAfaBKo8YK3IrBEi9SLLKWJdEvJniQ==} + '@esbuild/darwin-x64@0.23.1': + resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.23.0': - resolution: {integrity: sha512-0muYWCng5vqaxobq6LB3YNtevDFSAZGlgtLoAc81PjUfiFz36n4KMpwhtAd4he8ToSI3TGyuhyx5xmiWNYZFyw==} + '@esbuild/freebsd-arm64@0.23.1': + resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.23.0': - resolution: {integrity: sha512-XKDVu8IsD0/q3foBzsXGt/KjD/yTKBCIwOHE1XwiXmrRwrX6Hbnd5Eqn/WvDekddK21tfszBSrE/WMaZh+1buQ==} + '@esbuild/freebsd-x64@0.23.1': + resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.23.0': - resolution: {integrity: sha512-j1t5iG8jE7BhonbsEg5d9qOYcVZv/Rv6tghaXM/Ug9xahM0nX/H2gfu6X6z11QRTMT6+aywOMA8TDkhPo8aCGw==} + '@esbuild/linux-arm64@0.23.1': + resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.23.0': - resolution: {integrity: sha512-SEELSTEtOFu5LPykzA395Mc+54RMg1EUgXP+iw2SJ72+ooMwVsgfuwXo5Fn0wXNgWZsTVHwY2cg4Vi/bOD88qw==} + '@esbuild/linux-arm@0.23.1': + resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.23.0': - resolution: {integrity: sha512-P7O5Tkh2NbgIm2R6x1zGJJsnacDzTFcRWZyTTMgFdVit6E98LTxO+v8LCCLWRvPrjdzXHx9FEOA8oAZPyApWUA==} + '@esbuild/linux-ia32@0.23.1': + resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.23.0': - resolution: {integrity: sha512-InQwepswq6urikQiIC/kkx412fqUZudBO4SYKu0N+tGhXRWUqAx+Q+341tFV6QdBifpjYgUndV1hhMq3WeJi7A==} + '@esbuild/linux-loong64@0.23.1': + resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.23.0': - resolution: {integrity: sha512-J9rflLtqdYrxHv2FqXE2i1ELgNjT+JFURt/uDMoPQLcjWQA5wDKgQA4t/dTqGa88ZVECKaD0TctwsUfHbVoi4w==} + '@esbuild/linux-mips64el@0.23.1': + resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.23.0': - resolution: {integrity: sha512-cShCXtEOVc5GxU0fM+dsFD10qZ5UpcQ8AM22bYj0u/yaAykWnqXJDpd77ublcX6vdDsWLuweeuSNZk4yUxZwtw==} + '@esbuild/linux-ppc64@0.23.1': + resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.23.0': - resolution: {integrity: sha512-HEtaN7Y5UB4tZPeQmgz/UhzoEyYftbMXrBCUjINGjh3uil+rB/QzzpMshz3cNUxqXN7Vr93zzVtpIDL99t9aRw==} + '@esbuild/linux-riscv64@0.23.1': + resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.23.0': - resolution: {integrity: sha512-WDi3+NVAuyjg/Wxi+o5KPqRbZY0QhI9TjrEEm+8dmpY9Xir8+HE/HNx2JoLckhKbFopW0RdO2D72w8trZOV+Wg==} + '@esbuild/linux-s390x@0.23.1': + resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.23.0': - resolution: {integrity: sha512-a3pMQhUEJkITgAw6e0bWA+F+vFtCciMjW/LPtoj99MhVt+Mfb6bbL9hu2wmTZgNd994qTAEw+U/r6k3qHWWaOQ==} + '@esbuild/linux-x64@0.23.1': + resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-x64@0.23.0': - resolution: {integrity: sha512-cRK+YDem7lFTs2Q5nEv/HHc4LnrfBCbH5+JHu6wm2eP+d8OZNoSMYgPZJq78vqQ9g+9+nMuIsAO7skzphRXHyw==} + '@esbuild/netbsd-x64@0.23.1': + resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.23.0': - resolution: {integrity: sha512-suXjq53gERueVWu0OKxzWqk7NxiUWSUlrxoZK7usiF50C6ipColGR5qie2496iKGYNLhDZkPxBI3erbnYkU0rQ==} + '@esbuild/openbsd-arm64@0.23.1': + resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.23.0': - resolution: {integrity: sha512-6p3nHpby0DM/v15IFKMjAaayFhqnXV52aEmv1whZHX56pdkK+MEaLoQWj+H42ssFarP1PcomVhbsR4pkz09qBg==} + '@esbuild/openbsd-x64@0.23.1': + resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/sunos-x64@0.23.0': - resolution: {integrity: sha512-BFelBGfrBwk6LVrmFzCq1u1dZbG4zy/Kp93w2+y83Q5UGYF1d8sCzeLI9NXjKyujjBBniQa8R8PzLFAUrSM9OA==} + '@esbuild/sunos-x64@0.23.1': + resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.23.0': - resolution: {integrity: sha512-lY6AC8p4Cnb7xYHuIxQ6iYPe6MfO2CC43XXKo9nBXDb35krYt7KGhQnOkRGar5psxYkircpCqfbNDB4uJbS2jQ==} + '@esbuild/win32-arm64@0.23.1': + resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.23.0': - resolution: {integrity: sha512-7L1bHlOTcO4ByvI7OXVI5pNN6HSu6pUQq9yodga8izeuB1KcT2UkHaH6118QJwopExPn0rMHIseCTx1CRo/uNA==} + '@esbuild/win32-ia32@0.23.1': + resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.23.0': - resolution: {integrity: sha512-Arm+WgUFLUATuoxCJcahGuk6Yj9Pzxd6l11Zb/2aAuv5kWWvvfhLFo2fni4uSK5vzlUdCGZ/BdV5tH8klj8p8g==} + '@esbuild/win32-x64@0.23.1': + resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -1015,8 +1015,8 @@ packages: '@types/lodash@4.17.7': resolution: {integrity: sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==} - '@types/node@22.2.0': - resolution: {integrity: sha512-bm6EG6/pCpkxDf/0gDNDdtDILMOHgaQBVOJGdwsqClnxA3xL6jtMv76rLBc006RVMWbmaf0xbmom4Z/5o2nRkQ==} + '@types/node@22.4.0': + resolution: {integrity: sha512-49AbMDwYUz7EXxKU/r7mXOsxwFr4BYbvB7tWYxVuLdb2ibd30ijjXINSMAHiEEZk5PCRBmW1gUeisn2VMKt3cQ==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -1024,8 +1024,8 @@ packages: '@types/parse-json@4.0.2': resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} - '@typescript-eslint/eslint-plugin@8.0.1': - resolution: {integrity: sha512-5g3Y7GDFsJAnY4Yhvk8sZtFfV6YNF2caLzjrRPUBzewjPCaj0yokePB4LJSobyCzGMzjZZYFbwuzbfDHlimXbQ==} + '@typescript-eslint/eslint-plugin@8.1.0': + resolution: {integrity: sha512-LlNBaHFCEBPHyD4pZXb35mzjGkuGKXU5eeCA1SxvHfiRES0E82dOounfVpL4DCqYvJEKab0bZIA0gCRpdLKkCw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -1049,12 +1049,12 @@ packages: resolution: {integrity: sha512-V0aa9Csx/ZWWv2IPgTfY7T4agYwJyILESu/PVqFtTFz9RIS823mAze+NbnBI8xiwdX3iqeQbcTYlvB04G9wyQw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.0.1': - resolution: {integrity: sha512-NpixInP5dm7uukMiRyiHjRKkom5RIFA4dfiHvalanD2cF0CLUuQqxfg8PtEUo9yqJI2bBhF+pcSafqnG3UBnRQ==} + '@typescript-eslint/scope-manager@8.1.0': + resolution: {integrity: sha512-DsuOZQji687sQUjm4N6c9xABJa7fjvfIdjqpSIIVOgaENf2jFXiM9hIBZOL3hb6DHK9Nvd2d7zZnoMLf9e0OtQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.0.1': - resolution: {integrity: sha512-+/UT25MWvXeDX9YaHv1IS6KI1fiuTto43WprE7pgSMswHbn1Jm9GEM4Txp+X74ifOWV8emu2AWcbLhpJAvD5Ng==} + '@typescript-eslint/type-utils@8.1.0': + resolution: {integrity: sha512-oLYvTxljVvsMnldfl6jIKxTaU7ok7km0KDrwOt1RHYu6nxlhN3TIx8k5Q52L6wR33nOwDgM7VwW1fT1qMNfFIA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -1066,8 +1066,8 @@ packages: resolution: {integrity: sha512-wgdSGs9BTMWQ7ooeHtu5quddKKs5Z5dS+fHLbrQI+ID0XWJLODGMHRfhwImiHoeO2S5Wir2yXuadJN6/l4JRxw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.0.1': - resolution: {integrity: sha512-PpqTVT3yCA/bIgJ12czBuE3iBlM3g4inRSC5J0QOdQFAn07TYrYEQBBKgXH1lQpglup+Zy6c1fxuwTk4MTNKIw==} + '@typescript-eslint/types@8.1.0': + resolution: {integrity: sha512-q2/Bxa0gMOu/2/AKALI0tCKbG2zppccnRIRCW6BaaTlRVaPKft4oVYPp7WOPpcnsgbr0qROAVCVKCvIQ0tbWog==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/typescript-estree@8.0.0': @@ -1079,8 +1079,8 @@ packages: typescript: optional: true - '@typescript-eslint/typescript-estree@8.0.1': - resolution: {integrity: sha512-8V9hriRvZQXPWU3bbiUV4Epo7EvgM6RTs+sUmxp5G//dBGy402S7Fx0W0QkB2fb4obCF8SInoUzvTYtc3bkb5w==} + '@typescript-eslint/typescript-estree@8.1.0': + resolution: {integrity: sha512-NTHhmufocEkMiAord/g++gWKb0Fr34e9AExBRdqgWdVBaKoei2dIyYKD9Q0jBnvfbEA5zaf8plUFMUH6kQ0vGg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -1098,8 +1098,8 @@ packages: resolution: {integrity: sha512-oN0K4nkHuOyF3PVMyETbpP5zp6wfyOvm7tWhTMfoqxSSsPmJIh6JNASuZDlODE8eE+0EB9uar+6+vxr9DBTYOA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.0.1': - resolution: {integrity: sha512-W5E+o0UfUcK5EgchLZsyVWqARmsM7v54/qEq6PY3YI5arkgmCzHiuk0zKSJJbm71V0xdRna4BGomkCTXz2/LkQ==} + '@typescript-eslint/visitor-keys@8.1.0': + resolution: {integrity: sha512-ba0lNI19awqZ5ZNKh6wCModMwoZs457StTebQ0q1NP58zSi2F6MOZRXwfKZy+jB78JNJ/WH8GSh2IQNzXX8Nag==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ungap/structured-clone@1.2.0': @@ -1314,8 +1314,8 @@ packages: esbuild-plugin-alias@0.2.1: resolution: {integrity: sha512-jyfL/pwPqaFXyKnj8lP8iLk6Z0m099uXR45aSN8Av1XD4vhvQutxxPzgA2bTcAwQpa1zCXDcWOlhFgyP3GKqhQ==} - esbuild@0.23.0: - resolution: {integrity: sha512-1lvV17H2bMYda/WaFb2jLPeHU3zml2k4/yagNMG8Q/YtfMjCwEUZa2eXXMgZTVSL5q1n4H7sQ0X6CdJDqqeCFA==} + esbuild@0.23.1: + resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} engines: {node: '>=18'} hasBin: true @@ -1346,8 +1346,8 @@ packages: peerDependencies: eslint: ^8.56.0 || ^9.0.0-0 - eslint-plugin-jsdoc@50.0.1: - resolution: {integrity: sha512-UayhAysIk1Du8InV27WMbV4AMSJSu60+bekmeuGK2OUy4QJSFPr1srYT6AInykGkmMdRuHfDX6Q0tJEr8BtDtg==} + eslint-plugin-jsdoc@50.2.2: + resolution: {integrity: sha512-i0ZMWA199DG7sjxlzXn5AeYZxpRfMJjDPUl7lL9eJJX8TPRoIaxJU4ys/joP5faM5AXE1eqW/dslCj3uj4Nqpg==} engines: {node: '>=18'} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 @@ -1586,8 +1586,8 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true - jsdoc-type-pratt-parser@4.0.0: - resolution: {integrity: sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==} + jsdoc-type-pratt-parser@4.1.0: + resolution: {integrity: sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==} engines: {node: '>=12.0.0'} jsesc@0.5.0: @@ -1997,8 +1997,8 @@ packages: resolution: {integrity: sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==} engines: {node: ^14.18.0 || >=16.0.0} - terser@5.31.5: - resolution: {integrity: sha512-YPmas0L0rE1UyLL/llTWA0SiDOqIcAQYLeUj7cJYzXHlRTAnMSg9pPe4VJ5PlKvTrPQsdVFuiRiwyeNlYgwh2Q==} + terser@5.31.6: + resolution: {integrity: sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg==} engines: {node: '>=10'} hasBin: true @@ -2058,8 +2058,8 @@ packages: engines: {node: '>=14.17'} hasBin: true - undici-types@6.13.0: - resolution: {integrity: sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==} + undici-types@6.19.6: + resolution: {integrity: sha512-e/vggGopEfTKSvj4ihnOLTsqhrKRN3LeO6qSN/GxohhuRv8qH9bNQ4B8W7e/vFL+0XTnmHPB4/kegunZGA4Org==} unicode-canonical-property-names-ecmascript@2.0.0: resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} @@ -2143,14 +2143,14 @@ packages: snapshots: - '@aet/eslint-define-config@0.1.0-beta.22': {} + '@aet/eslint-define-config@0.1.0-beta.24': {} '@ampproject/remapping@2.3.0': dependencies: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - '@antfu/install-pkg@0.3.3': + '@antfu/install-pkg@0.3.5': dependencies: '@jsdevtools/ez-spawn': 3.0.4 @@ -2926,82 +2926,82 @@ snapshots: '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 - '@es-joy/jsdoccomment@0.46.0': + '@es-joy/jsdoccomment@0.48.0': dependencies: comment-parser: 1.4.1 esquery: 1.6.0 - jsdoc-type-pratt-parser: 4.0.0 + jsdoc-type-pratt-parser: 4.1.0 - '@esbuild/aix-ppc64@0.23.0': + '@esbuild/aix-ppc64@0.23.1': optional: true - '@esbuild/android-arm64@0.23.0': + '@esbuild/android-arm64@0.23.1': optional: true - '@esbuild/android-arm@0.23.0': + '@esbuild/android-arm@0.23.1': optional: true - '@esbuild/android-x64@0.23.0': + '@esbuild/android-x64@0.23.1': optional: true - '@esbuild/darwin-arm64@0.23.0': + '@esbuild/darwin-arm64@0.23.1': optional: true - '@esbuild/darwin-x64@0.23.0': + '@esbuild/darwin-x64@0.23.1': optional: true - '@esbuild/freebsd-arm64@0.23.0': + '@esbuild/freebsd-arm64@0.23.1': optional: true - '@esbuild/freebsd-x64@0.23.0': + '@esbuild/freebsd-x64@0.23.1': optional: true - '@esbuild/linux-arm64@0.23.0': + '@esbuild/linux-arm64@0.23.1': optional: true - '@esbuild/linux-arm@0.23.0': + '@esbuild/linux-arm@0.23.1': optional: true - '@esbuild/linux-ia32@0.23.0': + '@esbuild/linux-ia32@0.23.1': optional: true - '@esbuild/linux-loong64@0.23.0': + '@esbuild/linux-loong64@0.23.1': optional: true - '@esbuild/linux-mips64el@0.23.0': + '@esbuild/linux-mips64el@0.23.1': optional: true - '@esbuild/linux-ppc64@0.23.0': + '@esbuild/linux-ppc64@0.23.1': optional: true - '@esbuild/linux-riscv64@0.23.0': + '@esbuild/linux-riscv64@0.23.1': optional: true - '@esbuild/linux-s390x@0.23.0': + '@esbuild/linux-s390x@0.23.1': optional: true - '@esbuild/linux-x64@0.23.0': + '@esbuild/linux-x64@0.23.1': optional: true - '@esbuild/netbsd-x64@0.23.0': + '@esbuild/netbsd-x64@0.23.1': optional: true - '@esbuild/openbsd-arm64@0.23.0': + '@esbuild/openbsd-arm64@0.23.1': optional: true - '@esbuild/openbsd-x64@0.23.0': + '@esbuild/openbsd-x64@0.23.1': optional: true - '@esbuild/sunos-x64@0.23.0': + '@esbuild/sunos-x64@0.23.1': optional: true - '@esbuild/win32-arm64@0.23.0': + '@esbuild/win32-arm64@0.23.1': optional: true - '@esbuild/win32-ia32@0.23.0': + '@esbuild/win32-ia32@0.23.1': optional: true - '@esbuild/win32-x64@0.23.0': + '@esbuild/win32-x64@0.23.1': optional: true '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': @@ -3134,22 +3134,22 @@ snapshots: '@types/lodash@4.17.7': {} - '@types/node@22.2.0': + '@types/node@22.4.0': dependencies: - undici-types: 6.13.0 + undici-types: 6.19.6 '@types/normalize-package-data@2.4.4': {} '@types/parse-json@4.0.2': {} - '@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)': + '@typescript-eslint/eslint-plugin@8.1.0(@typescript-eslint/parser@8.0.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@eslint-community/regexpp': 4.11.0 '@typescript-eslint/parser': 8.0.0(eslint@8.57.0)(typescript@5.5.4) - '@typescript-eslint/scope-manager': 8.0.1 - '@typescript-eslint/type-utils': 8.0.1(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/scope-manager': 8.1.0 + '@typescript-eslint/type-utils': 8.1.0(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/utils': 8.0.0(eslint@8.57.0)(typescript@5.5.4) - '@typescript-eslint/visitor-keys': 8.0.1 + '@typescript-eslint/visitor-keys': 8.1.0 eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 @@ -3178,14 +3178,14 @@ snapshots: '@typescript-eslint/types': 8.0.0 '@typescript-eslint/visitor-keys': 8.0.0 - '@typescript-eslint/scope-manager@8.0.1': + '@typescript-eslint/scope-manager@8.1.0': dependencies: - '@typescript-eslint/types': 8.0.1 - '@typescript-eslint/visitor-keys': 8.0.1 + '@typescript-eslint/types': 8.1.0 + '@typescript-eslint/visitor-keys': 8.1.0 - '@typescript-eslint/type-utils@8.0.1(eslint@8.57.0)(typescript@5.5.4)': + '@typescript-eslint/type-utils@8.1.0(eslint@8.57.0)(typescript@5.5.4)': dependencies: - '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.5.4) '@typescript-eslint/utils': 8.0.0(eslint@8.57.0)(typescript@5.5.4) debug: 4.3.6 ts-api-utils: 1.3.0(typescript@5.5.4) @@ -3197,7 +3197,7 @@ snapshots: '@typescript-eslint/types@8.0.0': {} - '@typescript-eslint/types@8.0.1': {} + '@typescript-eslint/types@8.1.0': {} '@typescript-eslint/typescript-estree@8.0.0(patch_hash=zlal42evfhopemboiioznx3k3i)(typescript@5.5.4)': dependencies: @@ -3214,10 +3214,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.0.1(typescript@5.5.4)': + '@typescript-eslint/typescript-estree@8.1.0(typescript@5.5.4)': dependencies: - '@typescript-eslint/types': 8.0.1 - '@typescript-eslint/visitor-keys': 8.0.1 + '@typescript-eslint/types': 8.1.0 + '@typescript-eslint/visitor-keys': 8.1.0 debug: 4.3.6 globby: 11.1.0 is-glob: 4.0.3 @@ -3245,9 +3245,9 @@ snapshots: '@typescript-eslint/types': 8.0.0 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.0.1': + '@typescript-eslint/visitor-keys@8.1.0': dependencies: - '@typescript-eslint/types': 8.0.1 + '@typescript-eslint/types': 8.1.0 eslint-visitor-keys: 3.4.3 '@ungap/structured-clone@1.2.0': {} @@ -3447,32 +3447,32 @@ snapshots: esbuild-plugin-alias@0.2.1: {} - esbuild@0.23.0: + esbuild@0.23.1: optionalDependencies: - '@esbuild/aix-ppc64': 0.23.0 - '@esbuild/android-arm': 0.23.0 - '@esbuild/android-arm64': 0.23.0 - '@esbuild/android-x64': 0.23.0 - '@esbuild/darwin-arm64': 0.23.0 - '@esbuild/darwin-x64': 0.23.0 - '@esbuild/freebsd-arm64': 0.23.0 - '@esbuild/freebsd-x64': 0.23.0 - '@esbuild/linux-arm': 0.23.0 - '@esbuild/linux-arm64': 0.23.0 - '@esbuild/linux-ia32': 0.23.0 - '@esbuild/linux-loong64': 0.23.0 - '@esbuild/linux-mips64el': 0.23.0 - '@esbuild/linux-ppc64': 0.23.0 - '@esbuild/linux-riscv64': 0.23.0 - '@esbuild/linux-s390x': 0.23.0 - '@esbuild/linux-x64': 0.23.0 - '@esbuild/netbsd-x64': 0.23.0 - '@esbuild/openbsd-arm64': 0.23.0 - '@esbuild/openbsd-x64': 0.23.0 - '@esbuild/sunos-x64': 0.23.0 - '@esbuild/win32-arm64': 0.23.0 - '@esbuild/win32-ia32': 0.23.0 - '@esbuild/win32-x64': 0.23.0 + '@esbuild/aix-ppc64': 0.23.1 + '@esbuild/android-arm': 0.23.1 + '@esbuild/android-arm64': 0.23.1 + '@esbuild/android-x64': 0.23.1 + '@esbuild/darwin-arm64': 0.23.1 + '@esbuild/darwin-x64': 0.23.1 + '@esbuild/freebsd-arm64': 0.23.1 + '@esbuild/freebsd-x64': 0.23.1 + '@esbuild/linux-arm': 0.23.1 + '@esbuild/linux-arm64': 0.23.1 + '@esbuild/linux-ia32': 0.23.1 + '@esbuild/linux-loong64': 0.23.1 + '@esbuild/linux-mips64el': 0.23.1 + '@esbuild/linux-ppc64': 0.23.1 + '@esbuild/linux-riscv64': 0.23.1 + '@esbuild/linux-s390x': 0.23.1 + '@esbuild/linux-x64': 0.23.1 + '@esbuild/netbsd-x64': 0.23.1 + '@esbuild/openbsd-arm64': 0.23.1 + '@esbuild/openbsd-x64': 0.23.1 + '@esbuild/sunos-x64': 0.23.1 + '@esbuild/win32-arm64': 0.23.1 + '@esbuild/win32-ia32': 0.23.1 + '@esbuild/win32-x64': 0.23.1 escalade@3.1.2: {} @@ -3509,9 +3509,9 @@ snapshots: - supports-color - typescript - eslint-plugin-jsdoc@50.0.1(eslint@8.57.0): + eslint-plugin-jsdoc@50.2.2(eslint@8.57.0): dependencies: - '@es-joy/jsdoccomment': 0.46.0 + '@es-joy/jsdoccomment': 0.48.0 are-docs-informative: 0.0.2 comment-parser: 1.4.1 debug: 4.3.6 @@ -3793,7 +3793,7 @@ snapshots: dependencies: argparse: 2.0.1 - jsdoc-type-pratt-parser@4.0.0: {} + jsdoc-type-pratt-parser@4.1.0: {} jsesc@0.5.0: {} @@ -4168,7 +4168,7 @@ snapshots: '@pkgr/core': 0.1.1 tslib: 2.6.3 - terser@5.31.5: + terser@5.31.6: dependencies: '@jridgewell/source-map': 0.3.6 acorn: 8.12.1 @@ -4211,7 +4211,7 @@ snapshots: typescript@5.5.4: {} - undici-types@6.13.0: {} + undici-types@6.19.6: {} unicode-canonical-property-names-ecmascript@2.0.0: {} diff --git a/scripts/build-local-rules.ts b/scripts/build-local-rules.ts index e71753f..248750f 100755 --- a/scripts/build-local-rules.ts +++ b/scripts/build-local-rules.ts @@ -1,5 +1,6 @@ #!/usr/bin/env tsx import { promises as fs } from 'node:fs'; + import { camelCase } from 'lodash'; export async function buildLocalRules() { @@ -9,8 +10,8 @@ export async function buildLocalRules() { .map(file => file.slice(0, -3)); const entryFile = /* js */ ` -import type { Rule } from 'eslint'; import type { ESLintUtils } from '@typescript-eslint/utils'; +import type { Rule } from 'eslint'; ${files.map(file => `import ${camelCase(file)} from './${file}';`).join('\n')} @@ -26,5 +27,5 @@ export const rules: Record< } if (require.main === module) { - buildLocalRules(); + void buildLocalRules(); } diff --git a/scripts/build.ts b/scripts/build.ts index 82cc333..c2f88ec 100755 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -1,13 +1,16 @@ #!/usr/bin/env tsx import { promises as fs } from 'node:fs'; -import { resolve, relative } from 'node:path'; import { isBuiltin } from 'node:module'; +import { relative, resolve } from 'node:path'; + import esbuild from 'esbuild'; import type { Plugin } from 'esbuild'; import { memoize } from 'lodash'; import { gray, green } from 'picocolors'; import { minify_sync } from 'terser'; + import { dependencies } from '../dist/package.json'; + import { buildLocalRules } from './build-local-rules'; import { dts } from './dts'; import { babelPlugin } from './modifier'; @@ -160,7 +163,6 @@ async function main() { bundleType('./src/types.ts', './dist/types.d.ts'); const unminify = { minify: false }; - const treeShake = { treeShaking: true, minify: false }; console.log('Building packages…'); await Promise.all([ @@ -173,7 +175,13 @@ async function main() { bundle('./src/index.ts', './dist/index.js', unminify), bundle('./src/types.ts', './dist/types.js', unminify), bundle('./src/prettier.ts', './dist/prettier.js', unminify), - bundle('./src/install.ts', './dist/install.js', treeShake), + bundle('./src/install.ts', './dist/install.js', { + treeShaking: true, + minify: false, + banner: { + js: '#!/usr/bin/env node\n/* eslint-disable */', + }, + }), editPackageJson(), ]); diff --git a/scripts/check-imports.ts b/scripts/check-imports.ts index 52b14aa..a20acf4 100755 --- a/scripts/check-imports.ts +++ b/scripts/check-imports.ts @@ -1,8 +1,11 @@ #!/usr/bin/env bun +import fs from 'node:fs'; +import { builtinModules } from 'node:module'; + import glob from 'fast-glob'; -import fs from 'fs'; -import { builtinModules } from 'module'; + import { uniq } from 'lodash'; + import { dependencies, peerDependencies } from '../dist/package.json'; function checkImports() { diff --git a/src/commits.json b/src/commits.json index b6414f2..653ec36 100644 --- a/src/commits.json +++ b/src/commits.json @@ -12,10 +12,10 @@ "subject": "chore(deps): update dependency node to v18.20.4 (#309)" }, "eslint-plugin-jsx-a11y": { - "hash": "cca288b73a39fa0932a57c02a7a88de68fc971fc", - "date": "2024-07-22T02:39:43+01:00", + "hash": "a08fbcc502d6a6fa7d01a48c5f0b895c61e8cdd5", + "date": "2024-08-22T20:21:57+01:00", "committer": "Jordan Harband", - "subject": "[readme] fix typo in shareable config section in readme" + "subject": "[Fix] `label-has-associated-control`: ignore undetermined label text" }, "eslint-plugin-n": { "hash": "e5e758ea0cd238220127ae7bcbd967f1d8920f28", diff --git a/src/custom/index.ts b/src/custom/index.ts index 8c9d28e..3ae609d 100644 --- a/src/custom/index.ts +++ b/src/custom/index.ts @@ -1,8 +1,9 @@ -import type { Rule } from 'eslint'; import type { ESLintUtils } from '@typescript-eslint/utils'; +import type { Rule } from 'eslint'; import noEmptyObjectLiteral from './no-empty-object-literal'; import noImportDot from './no-import-dot'; +import noUselessImportAlias from './no-useless-import-alias'; import restrictTemplateExpressions from './restrict-template-expressions'; export const rules: Record< @@ -11,5 +12,6 @@ export const rules: Record< > = { 'no-empty-object-literal': noEmptyObjectLiteral, 'no-import-dot': noImportDot, + 'no-useless-import-alias': noUselessImportAlias, 'restrict-template-expressions': restrictTemplateExpressions, }; diff --git a/src/custom/no-useless-import-alias.ts b/src/custom/no-useless-import-alias.ts new file mode 100644 index 0000000..57daafe --- /dev/null +++ b/src/custom/no-useless-import-alias.ts @@ -0,0 +1,45 @@ +import type { Rule } from 'eslint'; +import type { Position } from 'estree'; + +const rule: Rule.RuleModule = { + meta: { + type: 'problem', + docs: { + description: + "Ban useless import aliasing like `import { abc as abc } from 'module'`", + category: 'Best Practices', + recommended: true, + }, + fixable: 'code', + }, + create(context) { + return { + ImportDeclaration(node) { + if (node.specifiers.length === 0) return; + + for (const specifier of node.specifiers) { + if (specifier.type !== 'ImportSpecifier') continue; + + const { imported, local } = specifier; + if ( + imported.name === local.name && + !arePositionsEqual(imported.loc!.start, local.loc!.start) + ) { + context.report({ + node: specifier, + message: `Useless aliasing of '${imported.name}'?`, + fix(fixer) { + return fixer.removeRange([imported.range![1], local.range![1]]); + }, + }); + } + } + }, + }; + }, +}; + +const arePositionsEqual = (a: Position, b: Position) => + a.line === b.line && a.column === b.column; + +export default rule; diff --git a/src/custom/restrict-template-expressions.ts b/src/custom/restrict-template-expressions.ts index cbafcfc..faf6720 100644 --- a/src/custom/restrict-template-expressions.ts +++ b/src/custom/restrict-template-expressions.ts @@ -29,8 +29,6 @@ export default createRule({ type: 'problem', docs: { description: 'Enforce template literal expressions to be of `string` type', - recommended: 'recommended', - requiresTypeChecking: true, }, messages: { invalidType: 'Invalid type "{{type}}" of template literal expression.', @@ -55,6 +53,8 @@ export default createRule({ defaultOptions: [defaultOption], create(context, [options]) { const services = getParserServices(context); + if (!services.program) return {}; + const checker = services.program.getTypeChecker(); const allowed = new Set(options.allow); diff --git a/src/env.ts b/src/env.ts index 0b3d376..5b4dd66 100644 --- a/src/env.ts +++ b/src/env.ts @@ -3,7 +3,7 @@ import { resolve } from 'node:path'; import type { Middleware } from './middleware'; import { jsdoc } from './presets/jsdoc'; -import { reactQuery, storybook } from './presets/misc'; +import { reactQuery, storybook, vitest } from './presets/misc'; import { react, reactRefresh } from './presets/react'; import { tailwind } from './presets/tailwind'; import { testingLibrary } from './presets/testing-library'; @@ -16,6 +16,7 @@ const middlewares = { reactQuery, testingLibrary, jsdoc, + vitest, }; export const envs: { @@ -29,7 +30,6 @@ export const envs: { }, { dependency: '@vitejs/plugin-react', - eslintPlugin: 'eslint-plugin-react-refresh', middleware: 'reactRefresh', }, { @@ -52,6 +52,11 @@ export const envs: { eslintPlugin: 'eslint-plugin-testing-library', middleware: 'testingLibrary', }, + { + dependency: 'vitest', + eslintPlugin: 'eslint-plugin-vitest', + middleware: 'vitest', + }, ]; export function getProjectDependencies() { diff --git a/src/index.ts b/src/index.ts index 42255fe..175d803 100644 --- a/src/index.ts +++ b/src/index.ts @@ -50,6 +50,8 @@ export interface LocalRuleOptions { 'custom/restrict-template-expressions': RuleEntry<{ allow: string[] }>; /** Ban assignment of empty object literals `{}` and replace them with `Object.create(null)` */ 'custom/no-empty-object-literal': RuleEntry; + /** Ban useless import alias */ + 'custom/no-useless-import-alias': RuleEntry; } export type RuleOptions = Rules & Partial; @@ -76,6 +78,8 @@ export type InputConfig = Omit & { * Glob pattern to find paths to custom rule files in JavaScript or TypeScript. * Note this must be a string literal or an array of string literals since * this is statically analyzed. + * + * Rules are prefixed with `custom/` and the file name is used as the rule name. */ customRuleFiles?: string | string[]; @@ -161,7 +165,7 @@ export function extendConfig( { files: ['repl.ts', 'scripts/**/*.ts'], rules: { 'no-console': off } }, ...(overrides ?? []), ], - rules: { ...eslintRules, ...rules }, + rules: { ...eslintRules }, ...rest, }; @@ -181,5 +185,7 @@ export function extendConfig( result.plugins = unique(result.plugins); result.extends = unique(result.extends); + Object.assign(result.rules, rules); + return result; } diff --git a/src/local/index.ts b/src/local/index.ts index 2bf8c7e..bb860d7 100644 --- a/src/local/index.ts +++ b/src/local/index.ts @@ -21,6 +21,7 @@ const transpilers = [ function tryRequire() { for (const candidate of transpilers) { try { + // eslint-disable-next-line @typescript-eslint/no-require-imports require(candidate); return; } catch {} @@ -70,6 +71,7 @@ function main() { if (!isAbsolute(file)) { file = resolve(rootDir, file); } + // eslint-disable-next-line @typescript-eslint/no-require-imports const module = unwrapDefault(require(file)); const name = module.name ?? basename(file, extname(file)); plugin.rules![name] = module; diff --git a/src/presets/custom.ts b/src/presets/custom.ts index 5840f95..c1323ab 100644 --- a/src/presets/custom.ts +++ b/src/presets/custom.ts @@ -4,9 +4,15 @@ import { defineMiddleware } from '../middleware'; const customRules: Partial = { 'custom/no-import-dot': error, - 'custom/restrict-template-expressions': error, + 'custom/no-useless-import-alias': error, }; -export const custom = defineMiddleware((_, { addRules }) => { +export const custom = defineMiddleware((config, { addRules }) => { addRules(customRules); + config.overrides.push({ + files: ['*.ts', '!*.d.ts'], + rules: { + 'custom/restrict-template-expressions': error, + }, + }); }); diff --git a/src/presets/misc.ts b/src/presets/misc.ts index c15c265..6d29b00 100644 --- a/src/presets/misc.ts +++ b/src/presets/misc.ts @@ -7,3 +7,7 @@ export const storybook = defineMiddleware(config => { export const reactQuery = defineMiddleware(config => { config.extends.push('plugin:@tanstack/eslint-plugin-query/recommended'); }); + +export const vitest = defineMiddleware(config => { + config.extends.push('plugin:vitest/recommended'); +}); diff --git a/src/presets/typescript.ts b/src/presets/typescript.ts index 86ef425..f77d020 100644 --- a/src/presets/typescript.ts +++ b/src/presets/typescript.ts @@ -7,22 +7,13 @@ import { defineMiddleware } from '../middleware'; const importRules: Partial = { 'import-x/first': error, 'import-x/no-absolute-path': error, - 'import-x/no-duplicates': error, + 'import-x/no-duplicates': warn, 'import-x/no-useless-path-segments': error, 'import-x/order': [ - error, + warn, { - groups: [ - 'builtin', - 'external', - 'internal', - 'parent', - 'sibling', - 'index', - 'object', - 'type', - ], - 'newlines-between': 'always-and-inside-groups', + groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'], + 'newlines-between': 'always', alphabetize: { order: 'asc', caseInsensitive: true }, }, ], @@ -83,18 +74,19 @@ export const importTypeScript = defineMiddleware((config, { addRules, addSetting }); config.overrides.push( { - files: ['.eslintrc.js', '.eslintrc.cjs', '*.config.js', 'index.js'], + files: ['.eslintrc.js', '*.config.js', '*.cjs', '*.mjs'], extends: ['plugin:@typescript-eslint/disable-type-checked'], rules: { 'import-x/no-commonjs': off, + 'import-x/unambiguous': off, '@typescript-eslint/no-require-imports': off, - 'rules/restrict-template-expressions': off, }, }, { files: ['*.d.ts'], rules: { '@typescript-eslint/consistent-type-imports': off, + 'import-x/unambiguous': off, }, }, ); diff --git a/src/presets/unicorn.ts b/src/presets/unicorn.ts index 3a4f42f..e63a3cd 100644 --- a/src/presets/unicorn.ts +++ b/src/presets/unicorn.ts @@ -1,7 +1,7 @@ /* eslint-disable unicorn/string-content */ import type { UnicornRulesObject } from '@aet/eslint-define-config/src/rules/unicorn'; -import { error, warn } from '../constants'; +import { error, off, warn } from '../constants'; import { defineMiddleware } from '../middleware'; const suggest = (suggest: string) => ({ suggest, fix: false }); @@ -86,10 +86,13 @@ const unicornRules: Partial = { '<=>': suggest('⇔'), '\\.\\.\\.': suggest('…'), "'s ": suggest('’s '), + "'d ": suggest('’d '), + "'t ": suggest('’t '), "l'": suggest('l’'), "d'": suggest('d’'), - '?!': suggest('⁈'), - '!?': suggest('⁉'), + "qu'": suggest('qu’'), + '\\?!': suggest('⁈'), + '!\\?': suggest('⁉'), }, }, ], @@ -99,4 +102,10 @@ const unicornRules: Partial = { export const unicorn = defineMiddleware((config, { addRules }) => { config.plugins.push('unicorn'); addRules(unicornRules); + config.overrides.push({ + files: ['*.test.ts', '*.test.tsx'], + rules: { + 'unicorn/no-useless-undefined': off, + }, + }); });