Update rules

This commit is contained in:
Alex 2024-08-25 16:28:34 -04:00
parent b0cc4a1525
commit 0138cabb27
18 changed files with 325 additions and 236 deletions

4
dist/index.d.ts vendored
View File

@ -42,6 +42,8 @@ export interface LocalRuleOptions {
}>; }>;
/** Ban assignment of empty object literals `{}` and replace them with `Object.create(null)` */ /** Ban assignment of empty object literals `{}` and replace them with `Object.create(null)` */
"custom/no-empty-object-literal": RuleEntry<unknown>; "custom/no-empty-object-literal": RuleEntry<unknown>;
/** Ban useless import alias */
"custom/no-useless-import-alias": RuleEntry<unknown>;
} }
export type RuleOptions = Rules & Partial<LocalRuleOptions>; export type RuleOptions = Rules & Partial<LocalRuleOptions>;
export interface CustomRule { export interface CustomRule {
@ -64,6 +66,8 @@ export type InputConfig = Omit<ESLintConfig, "rules"> & {
* Glob pattern to find paths to custom rule files in JavaScript or TypeScript. * 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 * Note this must be a string literal or an array of string literals since
* this is statically analyzed. * this is statically analyzed.
*
* Rules are prefixed with `custom/` and the file name is used as the rule name.
*/ */
customRuleFiles?: string | string[]; customRuleFiles?: string | string[];
/** /**

30
dist/package.json vendored
View File

@ -1,6 +1,6 @@
{ {
"name": "@aet/eslint-rules", "name": "@aet/eslint-rules",
"version": "1.0.1-beta.28", "version": "1.0.1-beta.42",
"license": "UNLICENSED", "license": "UNLICENSED",
"bin": { "bin": {
"eslint-install": "install.js", "eslint-install": "install.js",
@ -10,19 +10,21 @@
"eslint": "^8.57.0", "eslint": "^8.57.0",
"typescript": "^5.4.4" "typescript": "^5.4.4"
}, },
"optionalDependencies": {
"@tanstack/eslint-plugin-query": "^5.52.0"
},
"dependencies": { "dependencies": {
"@antfu/install-pkg": "^0.3.4", "@antfu/install-pkg": "^0.4.0",
"@nolyfill/is-core-module": "^1.0.39", "@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", "@eslint-community/eslint-utils": "^4.4.0",
"@tanstack/eslint-plugin-query": "^5.51.15",
"@types/eslint": "^9.6.0", "@types/eslint": "^9.6.0",
"@typescript-eslint/eslint-plugin": "^8.1.0", "@typescript-eslint/eslint-plugin": "^8.2.0",
"@typescript-eslint/parser": "^8.1.0", "@typescript-eslint/parser": "^8.2.0",
"@typescript-eslint/type-utils": "^8.1.0", "@typescript-eslint/type-utils": "^8.2.0",
"@typescript-eslint/utils": "^8.1.0", "@typescript-eslint/utils": "^8.2.0",
"@eslint-react/eslint-plugin": "1.10.0", "@eslint-react/eslint-plugin": "1.12.1",
"@stylistic/eslint-plugin": "^2.6.2", "@stylistic/eslint-plugin": "^2.6.4",
"aria-query": "^5.3.0", "aria-query": "^5.3.0",
"axe-core": "^4.10.0", "axe-core": "^4.10.0",
"axobject-query": "4.1.0", "axobject-query": "4.1.0",
@ -36,16 +38,16 @@
"eslint-module-utils": "^2.8.1", "eslint-module-utils": "^2.8.1",
"eslint-plugin-es-x": "^8.0.0", "eslint-plugin-es-x": "^8.0.0",
"eslint-plugin-import-x": "^3.1.0", "eslint-plugin-import-x": "^3.1.0",
"eslint-plugin-jsdoc": "^50.0.1", "eslint-plugin-jsdoc": "^50.2.2",
"eslint-plugin-react-refresh": "^0.4.9", "eslint-plugin-react-refresh": "^0.4.11",
"eslint-plugin-unicorn": "^55.0.0", "eslint-plugin-unicorn": "^55.0.0",
"esprima": "^4.0.1", "esprima": "^4.0.1",
"esquery": "^1.6.0", "esquery": "^1.6.0",
"estraverse": "^5.3.0", "estraverse": "^5.3.0",
"fast-glob": "^3.3.2", "fast-glob": "^3.3.2",
"get-tsconfig": "^4.7.6", "get-tsconfig": "^4.7.6",
"is-bun-module": "^1.0.2", "is-bun-module": "^1.1.0",
"ignore": "^5.3.1", "ignore": "^5.3.2",
"is-glob": "^4.0.3", "is-glob": "^4.0.3",
"language-tags": "^1.0.9", "language-tags": "^1.0.9",
"lodash": "^4.17.21", "lodash": "^4.17.21",

View File

@ -8,11 +8,11 @@
}, },
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"@aet/eslint-define-config": "^0.1.0-beta.22", "@aet/eslint-define-config": "^0.1.0-beta.24",
"@antfu/install-pkg": "^0.3.4", "@antfu/install-pkg": "^0.4.0",
"@babel/core": "^7.25.2", "@babel/core": "^7.25.2",
"@babel/plugin-transform-flow-strip-types": "^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-plugin-macros": "^3.1.3",
"@types/babel__core": "^7.20.5", "@types/babel__core": "^7.20.5",
"@types/eslint": "^9.6.0", "@types/eslint": "^9.6.0",
@ -21,20 +21,20 @@
"@types/estree": "^1.0.5", "@types/estree": "^1.0.5",
"@types/estree-jsx": "^1.0.5", "@types/estree-jsx": "^1.0.5",
"@types/lodash": "^4.17.7", "@types/lodash": "^4.17.7",
"@types/node": "^22.2.0", "@types/node": "^22.5.0",
"@typescript-eslint/eslint-plugin": "^8.1.0", "@typescript-eslint/eslint-plugin": "^8.2.0",
"@typescript-eslint/type-utils": "^8.1.0", "@typescript-eslint/type-utils": "^8.2.0",
"@typescript-eslint/types": "^8.1.0", "@typescript-eslint/types": "^8.2.0",
"@typescript-eslint/typescript-estree": "^8.1.0", "@typescript-eslint/typescript-estree": "^8.2.0",
"@typescript-eslint/utils": "^8.1.0", "@typescript-eslint/utils": "^8.2.0",
"babel-plugin-macros": "^3.1.0", "babel-plugin-macros": "^3.1.0",
"dts-bundle-generator": "9.4.0", "dts-bundle-generator": "9.4.0",
"esbuild": "0.23.0", "esbuild": "0.23.1",
"esbuild-plugin-alias": "^0.2.1", "esbuild-plugin-alias": "^0.2.1",
"eslint": "8.57.0", "eslint": "8.57.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-import-x": "^3.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", "eslint-plugin-unicorn": "^55.0.0",
"esprima": "^4.0.1", "esprima": "^4.0.1",
"esquery": "^1.6.0", "esquery": "^1.6.0",
@ -47,8 +47,8 @@
"picocolors": "^1.0.1", "picocolors": "^1.0.1",
"prettier": "^3.3.3", "prettier": "^3.3.3",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
"terser": "^5.31.5", "terser": "^5.31.6",
"type-fest": "^4.24.0", "type-fest": "^4.25.0",
"typescript": "^5.5.4" "typescript": "^5.5.4"
}, },
"prettier": { "prettier": {

346
pnpm-lock.yaml generated
View File

@ -28,11 +28,11 @@ importers:
.: .:
devDependencies: devDependencies:
'@aet/eslint-define-config': '@aet/eslint-define-config':
specifier: ^0.1.0-beta.22 specifier: ^0.1.0-beta.24
version: 0.1.0-beta.22 version: 0.1.0-beta.24
'@antfu/install-pkg': '@antfu/install-pkg':
specifier: ^0.3.3 specifier: ^0.3.5
version: 0.3.3 version: 0.3.5
'@babel/core': '@babel/core':
specifier: ^7.25.2 specifier: ^7.25.2
version: 7.25.2 version: 7.25.2
@ -67,20 +67,20 @@ importers:
specifier: ^4.17.7 specifier: ^4.17.7
version: 4.17.7 version: 4.17.7
'@types/node': '@types/node':
specifier: ^22.2.0 specifier: ^22.4.0
version: 22.2.0 version: 22.4.0
'@typescript-eslint/eslint-plugin': '@typescript-eslint/eslint-plugin':
specifier: ^8.0.1 specifier: ^8.1.0
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) 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': '@typescript-eslint/type-utils':
specifier: ^8.0.1 specifier: ^8.1.0
version: 8.0.1(eslint@8.57.0)(typescript@5.5.4) version: 8.1.0(eslint@8.57.0)(typescript@5.5.4)
'@typescript-eslint/types': '@typescript-eslint/types':
specifier: ^8.0.1 specifier: ^8.1.0
version: 8.0.1 version: 8.1.0
'@typescript-eslint/typescript-estree': '@typescript-eslint/typescript-estree':
specifier: ^8.0.1 specifier: ^8.1.0
version: 8.0.1(typescript@5.5.4) version: 8.1.0(typescript@5.5.4)
'@typescript-eslint/utils': '@typescript-eslint/utils':
specifier: 8.0.0 specifier: 8.0.0
version: 8.0.0(eslint@8.57.0)(typescript@5.5.4) version: 8.0.0(eslint@8.57.0)(typescript@5.5.4)
@ -91,8 +91,8 @@ importers:
specifier: 9.4.0 specifier: 9.4.0
version: 9.4.0 version: 9.4.0
esbuild: esbuild:
specifier: 0.23.0 specifier: 0.23.1
version: 0.23.0 version: 0.23.1
esbuild-plugin-alias: esbuild-plugin-alias:
specifier: ^0.2.1 specifier: ^0.2.1
version: 0.2.1 version: 0.2.1
@ -106,8 +106,8 @@ importers:
specifier: ^3.1.0 specifier: ^3.1.0
version: 3.1.0(eslint@8.57.0)(typescript@5.5.4) version: 3.1.0(eslint@8.57.0)(typescript@5.5.4)
eslint-plugin-jsdoc: eslint-plugin-jsdoc:
specifier: ^50.0.1 specifier: ^50.2.2
version: 50.0.1(eslint@8.57.0) version: 50.2.2(eslint@8.57.0)
eslint-plugin-unicorn: eslint-plugin-unicorn:
specifier: ^55.0.0 specifier: ^55.0.0
version: 55.0.0(eslint@8.57.0) version: 55.0.0(eslint@8.57.0)
@ -145,8 +145,8 @@ importers:
specifier: ^15.8.1 specifier: ^15.8.1
version: 15.8.1 version: 15.8.1
terser: terser:
specifier: ^5.31.5 specifier: ^5.31.6
version: 5.31.5 version: 5.31.6
type-fest: type-fest:
specifier: ^4.24.0 specifier: ^4.24.0
version: 4.24.0 version: 4.24.0
@ -156,16 +156,16 @@ importers:
packages: packages:
'@aet/eslint-define-config@0.1.0-beta.22': '@aet/eslint-define-config@0.1.0-beta.24':
resolution: {integrity: sha512-c2G0WwfvrOxCGoJ1lYw5c+gKKlXp4ahdyAgJW+Mmir53SKGQjYUt/5Vr6cx2Qn9MjoLWPX4VgTQLmlRq/MS3wg==} resolution: {integrity: sha512-eFVYlxL0ORnucuaW3lDHzTmHOQKSb42QuvoO3PBokAAXRgmknGJUibprko0FDenA2rpLPReXfU5kwOvre+U3BA==}
engines: {node: '>=18.0.0', npm: '>=9.0.0'} engines: {node: '>=18.0.0', npm: '>=9.0.0'}
'@ampproject/remapping@2.3.0': '@ampproject/remapping@2.3.0':
resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==}
engines: {node: '>=6.0.0'} engines: {node: '>=6.0.0'}
'@antfu/install-pkg@0.3.3': '@antfu/install-pkg@0.3.5':
resolution: {integrity: sha512-nHHsk3NXQ6xkCfiRRC8Nfrg8pU5kkr3P3Y9s9dKqiuRmBD0Yap7fymNDjGFKeWhZQHqqbCS5CfeMy9wtExM24w==} resolution: {integrity: sha512-HwIACY0IzrM7FGafMbWZOqEDBSfCwPcylu+GacaRcxJm4Yvvuh3Dy2vZwqdJAzXponc6aLO9FaH4l75pq8/ZSA==}
'@babel/code-frame@7.24.7': '@babel/code-frame@7.24.7':
resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==}
@ -751,150 +751,150 @@ packages:
resolution: {integrity: sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==} resolution: {integrity: sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==}
engines: {node: '>=6.9.0'} engines: {node: '>=6.9.0'}
'@es-joy/jsdoccomment@0.46.0': '@es-joy/jsdoccomment@0.48.0':
resolution: {integrity: sha512-C3Axuq1xd/9VqFZpW4YAzOx5O9q/LP46uIQy/iNDpHG3fmPa6TBtvfglMCs3RBiBxAIi0Go97r8+jvTt55XMyQ==} resolution: {integrity: sha512-G6QUWIcC+KvSwXNsJyDTHvqUdNoAVJPPgkc3+Uk4WBKqZvoXhlvazOgm9aL0HwihJLQf0l+tOE2UFzXBqCqgDw==}
engines: {node: '>=16'} engines: {node: '>=16'}
'@esbuild/aix-ppc64@0.23.0': '@esbuild/aix-ppc64@0.23.1':
resolution: {integrity: sha512-3sG8Zwa5fMcA9bgqB8AfWPQ+HFke6uD3h1s3RIwUNK8EG7a4buxvuFTs3j1IMs2NXAk9F30C/FF4vxRgQCcmoQ==} resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [ppc64] cpu: [ppc64]
os: [aix] os: [aix]
'@esbuild/android-arm64@0.23.0': '@esbuild/android-arm64@0.23.1':
resolution: {integrity: sha512-EuHFUYkAVfU4qBdyivULuu03FhJO4IJN9PGuABGrFy4vUuzk91P2d+npxHcFdpUnfYKy0PuV+n6bKIpHOB3prQ==} resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [arm64] cpu: [arm64]
os: [android] os: [android]
'@esbuild/android-arm@0.23.0': '@esbuild/android-arm@0.23.1':
resolution: {integrity: sha512-+KuOHTKKyIKgEEqKbGTK8W7mPp+hKinbMBeEnNzjJGyFcWsfrXjSTNluJHCY1RqhxFurdD8uNXQDei7qDlR6+g==} resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [arm] cpu: [arm]
os: [android] os: [android]
'@esbuild/android-x64@0.23.0': '@esbuild/android-x64@0.23.1':
resolution: {integrity: sha512-WRrmKidLoKDl56LsbBMhzTTBxrsVwTKdNbKDalbEZr0tcsBgCLbEtoNthOW6PX942YiYq8HzEnb4yWQMLQuipQ==} resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [x64] cpu: [x64]
os: [android] os: [android]
'@esbuild/darwin-arm64@0.23.0': '@esbuild/darwin-arm64@0.23.1':
resolution: {integrity: sha512-YLntie/IdS31H54Ogdn+v50NuoWF5BDkEUFpiOChVa9UnKpftgwzZRrI4J132ETIi+D8n6xh9IviFV3eXdxfow==} resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [arm64] cpu: [arm64]
os: [darwin] os: [darwin]
'@esbuild/darwin-x64@0.23.0': '@esbuild/darwin-x64@0.23.1':
resolution: {integrity: sha512-IMQ6eme4AfznElesHUPDZ+teuGwoRmVuuixu7sv92ZkdQcPbsNHzutd+rAfaBKo8YK3IrBEi9SLLKWJdEvJniQ==} resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [x64] cpu: [x64]
os: [darwin] os: [darwin]
'@esbuild/freebsd-arm64@0.23.0': '@esbuild/freebsd-arm64@0.23.1':
resolution: {integrity: sha512-0muYWCng5vqaxobq6LB3YNtevDFSAZGlgtLoAc81PjUfiFz36n4KMpwhtAd4he8ToSI3TGyuhyx5xmiWNYZFyw==} resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [arm64] cpu: [arm64]
os: [freebsd] os: [freebsd]
'@esbuild/freebsd-x64@0.23.0': '@esbuild/freebsd-x64@0.23.1':
resolution: {integrity: sha512-XKDVu8IsD0/q3foBzsXGt/KjD/yTKBCIwOHE1XwiXmrRwrX6Hbnd5Eqn/WvDekddK21tfszBSrE/WMaZh+1buQ==} resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [x64] cpu: [x64]
os: [freebsd] os: [freebsd]
'@esbuild/linux-arm64@0.23.0': '@esbuild/linux-arm64@0.23.1':
resolution: {integrity: sha512-j1t5iG8jE7BhonbsEg5d9qOYcVZv/Rv6tghaXM/Ug9xahM0nX/H2gfu6X6z11QRTMT6+aywOMA8TDkhPo8aCGw==} resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
'@esbuild/linux-arm@0.23.0': '@esbuild/linux-arm@0.23.1':
resolution: {integrity: sha512-SEELSTEtOFu5LPykzA395Mc+54RMg1EUgXP+iw2SJ72+ooMwVsgfuwXo5Fn0wXNgWZsTVHwY2cg4Vi/bOD88qw==} resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [arm] cpu: [arm]
os: [linux] os: [linux]
'@esbuild/linux-ia32@0.23.0': '@esbuild/linux-ia32@0.23.1':
resolution: {integrity: sha512-P7O5Tkh2NbgIm2R6x1zGJJsnacDzTFcRWZyTTMgFdVit6E98LTxO+v8LCCLWRvPrjdzXHx9FEOA8oAZPyApWUA==} resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [ia32] cpu: [ia32]
os: [linux] os: [linux]
'@esbuild/linux-loong64@0.23.0': '@esbuild/linux-loong64@0.23.1':
resolution: {integrity: sha512-InQwepswq6urikQiIC/kkx412fqUZudBO4SYKu0N+tGhXRWUqAx+Q+341tFV6QdBifpjYgUndV1hhMq3WeJi7A==} resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [loong64] cpu: [loong64]
os: [linux] os: [linux]
'@esbuild/linux-mips64el@0.23.0': '@esbuild/linux-mips64el@0.23.1':
resolution: {integrity: sha512-J9rflLtqdYrxHv2FqXE2i1ELgNjT+JFURt/uDMoPQLcjWQA5wDKgQA4t/dTqGa88ZVECKaD0TctwsUfHbVoi4w==} resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [mips64el] cpu: [mips64el]
os: [linux] os: [linux]
'@esbuild/linux-ppc64@0.23.0': '@esbuild/linux-ppc64@0.23.1':
resolution: {integrity: sha512-cShCXtEOVc5GxU0fM+dsFD10qZ5UpcQ8AM22bYj0u/yaAykWnqXJDpd77ublcX6vdDsWLuweeuSNZk4yUxZwtw==} resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [ppc64] cpu: [ppc64]
os: [linux] os: [linux]
'@esbuild/linux-riscv64@0.23.0': '@esbuild/linux-riscv64@0.23.1':
resolution: {integrity: sha512-HEtaN7Y5UB4tZPeQmgz/UhzoEyYftbMXrBCUjINGjh3uil+rB/QzzpMshz3cNUxqXN7Vr93zzVtpIDL99t9aRw==} resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [riscv64] cpu: [riscv64]
os: [linux] os: [linux]
'@esbuild/linux-s390x@0.23.0': '@esbuild/linux-s390x@0.23.1':
resolution: {integrity: sha512-WDi3+NVAuyjg/Wxi+o5KPqRbZY0QhI9TjrEEm+8dmpY9Xir8+HE/HNx2JoLckhKbFopW0RdO2D72w8trZOV+Wg==} resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [s390x] cpu: [s390x]
os: [linux] os: [linux]
'@esbuild/linux-x64@0.23.0': '@esbuild/linux-x64@0.23.1':
resolution: {integrity: sha512-a3pMQhUEJkITgAw6e0bWA+F+vFtCciMjW/LPtoj99MhVt+Mfb6bbL9hu2wmTZgNd994qTAEw+U/r6k3qHWWaOQ==} resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
'@esbuild/netbsd-x64@0.23.0': '@esbuild/netbsd-x64@0.23.1':
resolution: {integrity: sha512-cRK+YDem7lFTs2Q5nEv/HHc4LnrfBCbH5+JHu6wm2eP+d8OZNoSMYgPZJq78vqQ9g+9+nMuIsAO7skzphRXHyw==} resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [x64] cpu: [x64]
os: [netbsd] os: [netbsd]
'@esbuild/openbsd-arm64@0.23.0': '@esbuild/openbsd-arm64@0.23.1':
resolution: {integrity: sha512-suXjq53gERueVWu0OKxzWqk7NxiUWSUlrxoZK7usiF50C6ipColGR5qie2496iKGYNLhDZkPxBI3erbnYkU0rQ==} resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [arm64] cpu: [arm64]
os: [openbsd] os: [openbsd]
'@esbuild/openbsd-x64@0.23.0': '@esbuild/openbsd-x64@0.23.1':
resolution: {integrity: sha512-6p3nHpby0DM/v15IFKMjAaayFhqnXV52aEmv1whZHX56pdkK+MEaLoQWj+H42ssFarP1PcomVhbsR4pkz09qBg==} resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [x64] cpu: [x64]
os: [openbsd] os: [openbsd]
'@esbuild/sunos-x64@0.23.0': '@esbuild/sunos-x64@0.23.1':
resolution: {integrity: sha512-BFelBGfrBwk6LVrmFzCq1u1dZbG4zy/Kp93w2+y83Q5UGYF1d8sCzeLI9NXjKyujjBBniQa8R8PzLFAUrSM9OA==} resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [x64] cpu: [x64]
os: [sunos] os: [sunos]
'@esbuild/win32-arm64@0.23.0': '@esbuild/win32-arm64@0.23.1':
resolution: {integrity: sha512-lY6AC8p4Cnb7xYHuIxQ6iYPe6MfO2CC43XXKo9nBXDb35krYt7KGhQnOkRGar5psxYkircpCqfbNDB4uJbS2jQ==} resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [arm64] cpu: [arm64]
os: [win32] os: [win32]
'@esbuild/win32-ia32@0.23.0': '@esbuild/win32-ia32@0.23.1':
resolution: {integrity: sha512-7L1bHlOTcO4ByvI7OXVI5pNN6HSu6pUQq9yodga8izeuB1KcT2UkHaH6118QJwopExPn0rMHIseCTx1CRo/uNA==} resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [ia32] cpu: [ia32]
os: [win32] os: [win32]
'@esbuild/win32-x64@0.23.0': '@esbuild/win32-x64@0.23.1':
resolution: {integrity: sha512-Arm+WgUFLUATuoxCJcahGuk6Yj9Pzxd6l11Zb/2aAuv5kWWvvfhLFo2fni4uSK5vzlUdCGZ/BdV5tH8klj8p8g==} resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==}
engines: {node: '>=18'} engines: {node: '>=18'}
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
@ -1015,8 +1015,8 @@ packages:
'@types/lodash@4.17.7': '@types/lodash@4.17.7':
resolution: {integrity: sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==} resolution: {integrity: sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==}
'@types/node@22.2.0': '@types/node@22.4.0':
resolution: {integrity: sha512-bm6EG6/pCpkxDf/0gDNDdtDILMOHgaQBVOJGdwsqClnxA3xL6jtMv76rLBc006RVMWbmaf0xbmom4Z/5o2nRkQ==} resolution: {integrity: sha512-49AbMDwYUz7EXxKU/r7mXOsxwFr4BYbvB7tWYxVuLdb2ibd30ijjXINSMAHiEEZk5PCRBmW1gUeisn2VMKt3cQ==}
'@types/normalize-package-data@2.4.4': '@types/normalize-package-data@2.4.4':
resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==}
@ -1024,8 +1024,8 @@ packages:
'@types/parse-json@4.0.2': '@types/parse-json@4.0.2':
resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==}
'@typescript-eslint/eslint-plugin@8.0.1': '@typescript-eslint/eslint-plugin@8.1.0':
resolution: {integrity: sha512-5g3Y7GDFsJAnY4Yhvk8sZtFfV6YNF2caLzjrRPUBzewjPCaj0yokePB4LJSobyCzGMzjZZYFbwuzbfDHlimXbQ==} resolution: {integrity: sha512-LlNBaHFCEBPHyD4pZXb35mzjGkuGKXU5eeCA1SxvHfiRES0E82dOounfVpL4DCqYvJEKab0bZIA0gCRpdLKkCw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies: peerDependencies:
'@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0
@ -1049,12 +1049,12 @@ packages:
resolution: {integrity: sha512-V0aa9Csx/ZWWv2IPgTfY7T4agYwJyILESu/PVqFtTFz9RIS823mAze+NbnBI8xiwdX3iqeQbcTYlvB04G9wyQw==} resolution: {integrity: sha512-V0aa9Csx/ZWWv2IPgTfY7T4agYwJyILESu/PVqFtTFz9RIS823mAze+NbnBI8xiwdX3iqeQbcTYlvB04G9wyQw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/scope-manager@8.0.1': '@typescript-eslint/scope-manager@8.1.0':
resolution: {integrity: sha512-NpixInP5dm7uukMiRyiHjRKkom5RIFA4dfiHvalanD2cF0CLUuQqxfg8PtEUo9yqJI2bBhF+pcSafqnG3UBnRQ==} resolution: {integrity: sha512-DsuOZQji687sQUjm4N6c9xABJa7fjvfIdjqpSIIVOgaENf2jFXiM9hIBZOL3hb6DHK9Nvd2d7zZnoMLf9e0OtQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/type-utils@8.0.1': '@typescript-eslint/type-utils@8.1.0':
resolution: {integrity: sha512-+/UT25MWvXeDX9YaHv1IS6KI1fiuTto43WprE7pgSMswHbn1Jm9GEM4Txp+X74ifOWV8emu2AWcbLhpJAvD5Ng==} resolution: {integrity: sha512-oLYvTxljVvsMnldfl6jIKxTaU7ok7km0KDrwOt1RHYu6nxlhN3TIx8k5Q52L6wR33nOwDgM7VwW1fT1qMNfFIA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies: peerDependencies:
typescript: '*' typescript: '*'
@ -1066,8 +1066,8 @@ packages:
resolution: {integrity: sha512-wgdSGs9BTMWQ7ooeHtu5quddKKs5Z5dS+fHLbrQI+ID0XWJLODGMHRfhwImiHoeO2S5Wir2yXuadJN6/l4JRxw==} resolution: {integrity: sha512-wgdSGs9BTMWQ7ooeHtu5quddKKs5Z5dS+fHLbrQI+ID0XWJLODGMHRfhwImiHoeO2S5Wir2yXuadJN6/l4JRxw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/types@8.0.1': '@typescript-eslint/types@8.1.0':
resolution: {integrity: sha512-PpqTVT3yCA/bIgJ12czBuE3iBlM3g4inRSC5J0QOdQFAn07TYrYEQBBKgXH1lQpglup+Zy6c1fxuwTk4MTNKIw==} resolution: {integrity: sha512-q2/Bxa0gMOu/2/AKALI0tCKbG2zppccnRIRCW6BaaTlRVaPKft4oVYPp7WOPpcnsgbr0qROAVCVKCvIQ0tbWog==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/typescript-estree@8.0.0': '@typescript-eslint/typescript-estree@8.0.0':
@ -1079,8 +1079,8 @@ packages:
typescript: typescript:
optional: true optional: true
'@typescript-eslint/typescript-estree@8.0.1': '@typescript-eslint/typescript-estree@8.1.0':
resolution: {integrity: sha512-8V9hriRvZQXPWU3bbiUV4Epo7EvgM6RTs+sUmxp5G//dBGy402S7Fx0W0QkB2fb4obCF8SInoUzvTYtc3bkb5w==} resolution: {integrity: sha512-NTHhmufocEkMiAord/g++gWKb0Fr34e9AExBRdqgWdVBaKoei2dIyYKD9Q0jBnvfbEA5zaf8plUFMUH6kQ0vGg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies: peerDependencies:
typescript: '*' typescript: '*'
@ -1098,8 +1098,8 @@ packages:
resolution: {integrity: sha512-oN0K4nkHuOyF3PVMyETbpP5zp6wfyOvm7tWhTMfoqxSSsPmJIh6JNASuZDlODE8eE+0EB9uar+6+vxr9DBTYOA==} resolution: {integrity: sha512-oN0K4nkHuOyF3PVMyETbpP5zp6wfyOvm7tWhTMfoqxSSsPmJIh6JNASuZDlODE8eE+0EB9uar+6+vxr9DBTYOA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/visitor-keys@8.0.1': '@typescript-eslint/visitor-keys@8.1.0':
resolution: {integrity: sha512-W5E+o0UfUcK5EgchLZsyVWqARmsM7v54/qEq6PY3YI5arkgmCzHiuk0zKSJJbm71V0xdRna4BGomkCTXz2/LkQ==} resolution: {integrity: sha512-ba0lNI19awqZ5ZNKh6wCModMwoZs457StTebQ0q1NP58zSi2F6MOZRXwfKZy+jB78JNJ/WH8GSh2IQNzXX8Nag==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@ungap/structured-clone@1.2.0': '@ungap/structured-clone@1.2.0':
@ -1314,8 +1314,8 @@ packages:
esbuild-plugin-alias@0.2.1: esbuild-plugin-alias@0.2.1:
resolution: {integrity: sha512-jyfL/pwPqaFXyKnj8lP8iLk6Z0m099uXR45aSN8Av1XD4vhvQutxxPzgA2bTcAwQpa1zCXDcWOlhFgyP3GKqhQ==} resolution: {integrity: sha512-jyfL/pwPqaFXyKnj8lP8iLk6Z0m099uXR45aSN8Av1XD4vhvQutxxPzgA2bTcAwQpa1zCXDcWOlhFgyP3GKqhQ==}
esbuild@0.23.0: esbuild@0.23.1:
resolution: {integrity: sha512-1lvV17H2bMYda/WaFb2jLPeHU3zml2k4/yagNMG8Q/YtfMjCwEUZa2eXXMgZTVSL5q1n4H7sQ0X6CdJDqqeCFA==} resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==}
engines: {node: '>=18'} engines: {node: '>=18'}
hasBin: true hasBin: true
@ -1346,8 +1346,8 @@ packages:
peerDependencies: peerDependencies:
eslint: ^8.56.0 || ^9.0.0-0 eslint: ^8.56.0 || ^9.0.0-0
eslint-plugin-jsdoc@50.0.1: eslint-plugin-jsdoc@50.2.2:
resolution: {integrity: sha512-UayhAysIk1Du8InV27WMbV4AMSJSu60+bekmeuGK2OUy4QJSFPr1srYT6AInykGkmMdRuHfDX6Q0tJEr8BtDtg==} resolution: {integrity: sha512-i0ZMWA199DG7sjxlzXn5AeYZxpRfMJjDPUl7lL9eJJX8TPRoIaxJU4ys/joP5faM5AXE1eqW/dslCj3uj4Nqpg==}
engines: {node: '>=18'} engines: {node: '>=18'}
peerDependencies: peerDependencies:
eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 eslint: ^7.0.0 || ^8.0.0 || ^9.0.0
@ -1586,8 +1586,8 @@ packages:
resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==}
hasBin: true hasBin: true
jsdoc-type-pratt-parser@4.0.0: jsdoc-type-pratt-parser@4.1.0:
resolution: {integrity: sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==} resolution: {integrity: sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==}
engines: {node: '>=12.0.0'} engines: {node: '>=12.0.0'}
jsesc@0.5.0: jsesc@0.5.0:
@ -1997,8 +1997,8 @@ packages:
resolution: {integrity: sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==} resolution: {integrity: sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==}
engines: {node: ^14.18.0 || >=16.0.0} engines: {node: ^14.18.0 || >=16.0.0}
terser@5.31.5: terser@5.31.6:
resolution: {integrity: sha512-YPmas0L0rE1UyLL/llTWA0SiDOqIcAQYLeUj7cJYzXHlRTAnMSg9pPe4VJ5PlKvTrPQsdVFuiRiwyeNlYgwh2Q==} resolution: {integrity: sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg==}
engines: {node: '>=10'} engines: {node: '>=10'}
hasBin: true hasBin: true
@ -2058,8 +2058,8 @@ packages:
engines: {node: '>=14.17'} engines: {node: '>=14.17'}
hasBin: true hasBin: true
undici-types@6.13.0: undici-types@6.19.6:
resolution: {integrity: sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==} resolution: {integrity: sha512-e/vggGopEfTKSvj4ihnOLTsqhrKRN3LeO6qSN/GxohhuRv8qH9bNQ4B8W7e/vFL+0XTnmHPB4/kegunZGA4Org==}
unicode-canonical-property-names-ecmascript@2.0.0: unicode-canonical-property-names-ecmascript@2.0.0:
resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==}
@ -2143,14 +2143,14 @@ packages:
snapshots: snapshots:
'@aet/eslint-define-config@0.1.0-beta.22': {} '@aet/eslint-define-config@0.1.0-beta.24': {}
'@ampproject/remapping@2.3.0': '@ampproject/remapping@2.3.0':
dependencies: dependencies:
'@jridgewell/gen-mapping': 0.3.5 '@jridgewell/gen-mapping': 0.3.5
'@jridgewell/trace-mapping': 0.3.25 '@jridgewell/trace-mapping': 0.3.25
'@antfu/install-pkg@0.3.3': '@antfu/install-pkg@0.3.5':
dependencies: dependencies:
'@jsdevtools/ez-spawn': 3.0.4 '@jsdevtools/ez-spawn': 3.0.4
@ -2926,82 +2926,82 @@ snapshots:
'@babel/helper-validator-identifier': 7.24.7 '@babel/helper-validator-identifier': 7.24.7
to-fast-properties: 2.0.0 to-fast-properties: 2.0.0
'@es-joy/jsdoccomment@0.46.0': '@es-joy/jsdoccomment@0.48.0':
dependencies: dependencies:
comment-parser: 1.4.1 comment-parser: 1.4.1
esquery: 1.6.0 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 optional: true
'@esbuild/android-arm64@0.23.0': '@esbuild/android-arm64@0.23.1':
optional: true optional: true
'@esbuild/android-arm@0.23.0': '@esbuild/android-arm@0.23.1':
optional: true optional: true
'@esbuild/android-x64@0.23.0': '@esbuild/android-x64@0.23.1':
optional: true optional: true
'@esbuild/darwin-arm64@0.23.0': '@esbuild/darwin-arm64@0.23.1':
optional: true optional: true
'@esbuild/darwin-x64@0.23.0': '@esbuild/darwin-x64@0.23.1':
optional: true optional: true
'@esbuild/freebsd-arm64@0.23.0': '@esbuild/freebsd-arm64@0.23.1':
optional: true optional: true
'@esbuild/freebsd-x64@0.23.0': '@esbuild/freebsd-x64@0.23.1':
optional: true optional: true
'@esbuild/linux-arm64@0.23.0': '@esbuild/linux-arm64@0.23.1':
optional: true optional: true
'@esbuild/linux-arm@0.23.0': '@esbuild/linux-arm@0.23.1':
optional: true optional: true
'@esbuild/linux-ia32@0.23.0': '@esbuild/linux-ia32@0.23.1':
optional: true optional: true
'@esbuild/linux-loong64@0.23.0': '@esbuild/linux-loong64@0.23.1':
optional: true optional: true
'@esbuild/linux-mips64el@0.23.0': '@esbuild/linux-mips64el@0.23.1':
optional: true optional: true
'@esbuild/linux-ppc64@0.23.0': '@esbuild/linux-ppc64@0.23.1':
optional: true optional: true
'@esbuild/linux-riscv64@0.23.0': '@esbuild/linux-riscv64@0.23.1':
optional: true optional: true
'@esbuild/linux-s390x@0.23.0': '@esbuild/linux-s390x@0.23.1':
optional: true optional: true
'@esbuild/linux-x64@0.23.0': '@esbuild/linux-x64@0.23.1':
optional: true optional: true
'@esbuild/netbsd-x64@0.23.0': '@esbuild/netbsd-x64@0.23.1':
optional: true optional: true
'@esbuild/openbsd-arm64@0.23.0': '@esbuild/openbsd-arm64@0.23.1':
optional: true optional: true
'@esbuild/openbsd-x64@0.23.0': '@esbuild/openbsd-x64@0.23.1':
optional: true optional: true
'@esbuild/sunos-x64@0.23.0': '@esbuild/sunos-x64@0.23.1':
optional: true optional: true
'@esbuild/win32-arm64@0.23.0': '@esbuild/win32-arm64@0.23.1':
optional: true optional: true
'@esbuild/win32-ia32@0.23.0': '@esbuild/win32-ia32@0.23.1':
optional: true optional: true
'@esbuild/win32-x64@0.23.0': '@esbuild/win32-x64@0.23.1':
optional: true optional: true
'@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)':
@ -3134,22 +3134,22 @@ snapshots:
'@types/lodash@4.17.7': {} '@types/lodash@4.17.7': {}
'@types/node@22.2.0': '@types/node@22.4.0':
dependencies: dependencies:
undici-types: 6.13.0 undici-types: 6.19.6
'@types/normalize-package-data@2.4.4': {} '@types/normalize-package-data@2.4.4': {}
'@types/parse-json@4.0.2': {} '@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: dependencies:
'@eslint-community/regexpp': 4.11.0 '@eslint-community/regexpp': 4.11.0
'@typescript-eslint/parser': 8.0.0(eslint@8.57.0)(typescript@5.5.4) '@typescript-eslint/parser': 8.0.0(eslint@8.57.0)(typescript@5.5.4)
'@typescript-eslint/scope-manager': 8.0.1 '@typescript-eslint/scope-manager': 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)
'@typescript-eslint/utils': 8.0.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 eslint: 8.57.0
graphemer: 1.4.0 graphemer: 1.4.0
ignore: 5.3.1 ignore: 5.3.1
@ -3178,14 +3178,14 @@ snapshots:
'@typescript-eslint/types': 8.0.0 '@typescript-eslint/types': 8.0.0
'@typescript-eslint/visitor-keys': 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: dependencies:
'@typescript-eslint/types': 8.0.1 '@typescript-eslint/types': 8.1.0
'@typescript-eslint/visitor-keys': 8.0.1 '@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: 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) '@typescript-eslint/utils': 8.0.0(eslint@8.57.0)(typescript@5.5.4)
debug: 4.3.6 debug: 4.3.6
ts-api-utils: 1.3.0(typescript@5.5.4) 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.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)': '@typescript-eslint/typescript-estree@8.0.0(patch_hash=zlal42evfhopemboiioznx3k3i)(typescript@5.5.4)':
dependencies: dependencies:
@ -3214,10 +3214,10 @@ snapshots:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - 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: dependencies:
'@typescript-eslint/types': 8.0.1 '@typescript-eslint/types': 8.1.0
'@typescript-eslint/visitor-keys': 8.0.1 '@typescript-eslint/visitor-keys': 8.1.0
debug: 4.3.6 debug: 4.3.6
globby: 11.1.0 globby: 11.1.0
is-glob: 4.0.3 is-glob: 4.0.3
@ -3245,9 +3245,9 @@ snapshots:
'@typescript-eslint/types': 8.0.0 '@typescript-eslint/types': 8.0.0
eslint-visitor-keys: 3.4.3 eslint-visitor-keys: 3.4.3
'@typescript-eslint/visitor-keys@8.0.1': '@typescript-eslint/visitor-keys@8.1.0':
dependencies: dependencies:
'@typescript-eslint/types': 8.0.1 '@typescript-eslint/types': 8.1.0
eslint-visitor-keys: 3.4.3 eslint-visitor-keys: 3.4.3
'@ungap/structured-clone@1.2.0': {} '@ungap/structured-clone@1.2.0': {}
@ -3447,32 +3447,32 @@ snapshots:
esbuild-plugin-alias@0.2.1: {} esbuild-plugin-alias@0.2.1: {}
esbuild@0.23.0: esbuild@0.23.1:
optionalDependencies: optionalDependencies:
'@esbuild/aix-ppc64': 0.23.0 '@esbuild/aix-ppc64': 0.23.1
'@esbuild/android-arm': 0.23.0 '@esbuild/android-arm': 0.23.1
'@esbuild/android-arm64': 0.23.0 '@esbuild/android-arm64': 0.23.1
'@esbuild/android-x64': 0.23.0 '@esbuild/android-x64': 0.23.1
'@esbuild/darwin-arm64': 0.23.0 '@esbuild/darwin-arm64': 0.23.1
'@esbuild/darwin-x64': 0.23.0 '@esbuild/darwin-x64': 0.23.1
'@esbuild/freebsd-arm64': 0.23.0 '@esbuild/freebsd-arm64': 0.23.1
'@esbuild/freebsd-x64': 0.23.0 '@esbuild/freebsd-x64': 0.23.1
'@esbuild/linux-arm': 0.23.0 '@esbuild/linux-arm': 0.23.1
'@esbuild/linux-arm64': 0.23.0 '@esbuild/linux-arm64': 0.23.1
'@esbuild/linux-ia32': 0.23.0 '@esbuild/linux-ia32': 0.23.1
'@esbuild/linux-loong64': 0.23.0 '@esbuild/linux-loong64': 0.23.1
'@esbuild/linux-mips64el': 0.23.0 '@esbuild/linux-mips64el': 0.23.1
'@esbuild/linux-ppc64': 0.23.0 '@esbuild/linux-ppc64': 0.23.1
'@esbuild/linux-riscv64': 0.23.0 '@esbuild/linux-riscv64': 0.23.1
'@esbuild/linux-s390x': 0.23.0 '@esbuild/linux-s390x': 0.23.1
'@esbuild/linux-x64': 0.23.0 '@esbuild/linux-x64': 0.23.1
'@esbuild/netbsd-x64': 0.23.0 '@esbuild/netbsd-x64': 0.23.1
'@esbuild/openbsd-arm64': 0.23.0 '@esbuild/openbsd-arm64': 0.23.1
'@esbuild/openbsd-x64': 0.23.0 '@esbuild/openbsd-x64': 0.23.1
'@esbuild/sunos-x64': 0.23.0 '@esbuild/sunos-x64': 0.23.1
'@esbuild/win32-arm64': 0.23.0 '@esbuild/win32-arm64': 0.23.1
'@esbuild/win32-ia32': 0.23.0 '@esbuild/win32-ia32': 0.23.1
'@esbuild/win32-x64': 0.23.0 '@esbuild/win32-x64': 0.23.1
escalade@3.1.2: {} escalade@3.1.2: {}
@ -3509,9 +3509,9 @@ snapshots:
- supports-color - supports-color
- typescript - typescript
eslint-plugin-jsdoc@50.0.1(eslint@8.57.0): eslint-plugin-jsdoc@50.2.2(eslint@8.57.0):
dependencies: dependencies:
'@es-joy/jsdoccomment': 0.46.0 '@es-joy/jsdoccomment': 0.48.0
are-docs-informative: 0.0.2 are-docs-informative: 0.0.2
comment-parser: 1.4.1 comment-parser: 1.4.1
debug: 4.3.6 debug: 4.3.6
@ -3793,7 +3793,7 @@ snapshots:
dependencies: dependencies:
argparse: 2.0.1 argparse: 2.0.1
jsdoc-type-pratt-parser@4.0.0: {} jsdoc-type-pratt-parser@4.1.0: {}
jsesc@0.5.0: {} jsesc@0.5.0: {}
@ -4168,7 +4168,7 @@ snapshots:
'@pkgr/core': 0.1.1 '@pkgr/core': 0.1.1
tslib: 2.6.3 tslib: 2.6.3
terser@5.31.5: terser@5.31.6:
dependencies: dependencies:
'@jridgewell/source-map': 0.3.6 '@jridgewell/source-map': 0.3.6
acorn: 8.12.1 acorn: 8.12.1
@ -4211,7 +4211,7 @@ snapshots:
typescript@5.5.4: {} typescript@5.5.4: {}
undici-types@6.13.0: {} undici-types@6.19.6: {}
unicode-canonical-property-names-ecmascript@2.0.0: {} unicode-canonical-property-names-ecmascript@2.0.0: {}

View File

@ -1,5 +1,6 @@
#!/usr/bin/env tsx #!/usr/bin/env tsx
import { promises as fs } from 'node:fs'; import { promises as fs } from 'node:fs';
import { camelCase } from 'lodash'; import { camelCase } from 'lodash';
export async function buildLocalRules() { export async function buildLocalRules() {
@ -9,8 +10,8 @@ export async function buildLocalRules() {
.map(file => file.slice(0, -3)); .map(file => file.slice(0, -3));
const entryFile = /* js */ ` const entryFile = /* js */ `
import type { Rule } from 'eslint';
import type { ESLintUtils } from '@typescript-eslint/utils'; import type { ESLintUtils } from '@typescript-eslint/utils';
import type { Rule } from 'eslint';
${files.map(file => `import ${camelCase(file)} from './${file}';`).join('\n')} ${files.map(file => `import ${camelCase(file)} from './${file}';`).join('\n')}
@ -26,5 +27,5 @@ export const rules: Record<
} }
if (require.main === module) { if (require.main === module) {
buildLocalRules(); void buildLocalRules();
} }

View File

@ -1,13 +1,16 @@
#!/usr/bin/env tsx #!/usr/bin/env tsx
import { promises as fs } from 'node:fs'; import { promises as fs } from 'node:fs';
import { resolve, relative } from 'node:path';
import { isBuiltin } from 'node:module'; import { isBuiltin } from 'node:module';
import { relative, resolve } from 'node:path';
import esbuild from 'esbuild'; import esbuild from 'esbuild';
import type { Plugin } from 'esbuild'; import type { Plugin } from 'esbuild';
import { memoize } from 'lodash'; import { memoize } from 'lodash';
import { gray, green } from 'picocolors'; import { gray, green } from 'picocolors';
import { minify_sync } from 'terser'; import { minify_sync } from 'terser';
import { dependencies } from '../dist/package.json'; import { dependencies } from '../dist/package.json';
import { buildLocalRules } from './build-local-rules'; import { buildLocalRules } from './build-local-rules';
import { dts } from './dts'; import { dts } from './dts';
import { babelPlugin } from './modifier'; import { babelPlugin } from './modifier';
@ -160,7 +163,6 @@ async function main() {
bundleType('./src/types.ts', './dist/types.d.ts'); bundleType('./src/types.ts', './dist/types.d.ts');
const unminify = { minify: false }; const unminify = { minify: false };
const treeShake = { treeShaking: true, minify: false };
console.log('Building packages…'); console.log('Building packages…');
await Promise.all([ await Promise.all([
@ -173,7 +175,13 @@ async function main() {
bundle('./src/index.ts', './dist/index.js', unminify), bundle('./src/index.ts', './dist/index.js', unminify),
bundle('./src/types.ts', './dist/types.js', unminify), bundle('./src/types.ts', './dist/types.js', unminify),
bundle('./src/prettier.ts', './dist/prettier.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(), editPackageJson(),
]); ]);

View File

@ -1,8 +1,11 @@
#!/usr/bin/env bun #!/usr/bin/env bun
import fs from 'node:fs';
import { builtinModules } from 'node:module';
import glob from 'fast-glob'; import glob from 'fast-glob';
import fs from 'fs';
import { builtinModules } from 'module';
import { uniq } from 'lodash'; import { uniq } from 'lodash';
import { dependencies, peerDependencies } from '../dist/package.json'; import { dependencies, peerDependencies } from '../dist/package.json';
function checkImports() { function checkImports() {

View File

@ -12,10 +12,10 @@
"subject": "chore(deps): update dependency node to v18.20.4 (#309)" "subject": "chore(deps): update dependency node to v18.20.4 (#309)"
}, },
"eslint-plugin-jsx-a11y": { "eslint-plugin-jsx-a11y": {
"hash": "cca288b73a39fa0932a57c02a7a88de68fc971fc", "hash": "a08fbcc502d6a6fa7d01a48c5f0b895c61e8cdd5",
"date": "2024-07-22T02:39:43+01:00", "date": "2024-08-22T20:21:57+01:00",
"committer": "Jordan Harband", "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": { "eslint-plugin-n": {
"hash": "e5e758ea0cd238220127ae7bcbd967f1d8920f28", "hash": "e5e758ea0cd238220127ae7bcbd967f1d8920f28",

View File

@ -1,8 +1,9 @@
import type { Rule } from 'eslint';
import type { ESLintUtils } from '@typescript-eslint/utils'; import type { ESLintUtils } from '@typescript-eslint/utils';
import type { Rule } from 'eslint';
import noEmptyObjectLiteral from './no-empty-object-literal'; import noEmptyObjectLiteral from './no-empty-object-literal';
import noImportDot from './no-import-dot'; import noImportDot from './no-import-dot';
import noUselessImportAlias from './no-useless-import-alias';
import restrictTemplateExpressions from './restrict-template-expressions'; import restrictTemplateExpressions from './restrict-template-expressions';
export const rules: Record< export const rules: Record<
@ -11,5 +12,6 @@ export const rules: Record<
> = { > = {
'no-empty-object-literal': noEmptyObjectLiteral, 'no-empty-object-literal': noEmptyObjectLiteral,
'no-import-dot': noImportDot, 'no-import-dot': noImportDot,
'no-useless-import-alias': noUselessImportAlias,
'restrict-template-expressions': restrictTemplateExpressions, 'restrict-template-expressions': restrictTemplateExpressions,
}; };

View File

@ -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;

View File

@ -29,8 +29,6 @@ export default createRule<Option[], MessageId>({
type: 'problem', type: 'problem',
docs: { docs: {
description: 'Enforce template literal expressions to be of `string` type', description: 'Enforce template literal expressions to be of `string` type',
recommended: 'recommended',
requiresTypeChecking: true,
}, },
messages: { messages: {
invalidType: 'Invalid type "{{type}}" of template literal expression.', invalidType: 'Invalid type "{{type}}" of template literal expression.',
@ -55,6 +53,8 @@ export default createRule<Option[], MessageId>({
defaultOptions: [defaultOption], defaultOptions: [defaultOption],
create(context, [options]) { create(context, [options]) {
const services = getParserServices(context); const services = getParserServices(context);
if (!services.program) return {};
const checker = services.program.getTypeChecker(); const checker = services.program.getTypeChecker();
const allowed = new Set(options.allow); const allowed = new Set(options.allow);

View File

@ -3,7 +3,7 @@ import { resolve } from 'node:path';
import type { Middleware } from './middleware'; import type { Middleware } from './middleware';
import { jsdoc } from './presets/jsdoc'; 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 { react, reactRefresh } from './presets/react';
import { tailwind } from './presets/tailwind'; import { tailwind } from './presets/tailwind';
import { testingLibrary } from './presets/testing-library'; import { testingLibrary } from './presets/testing-library';
@ -16,6 +16,7 @@ const middlewares = {
reactQuery, reactQuery,
testingLibrary, testingLibrary,
jsdoc, jsdoc,
vitest,
}; };
export const envs: { export const envs: {
@ -29,7 +30,6 @@ export const envs: {
}, },
{ {
dependency: '@vitejs/plugin-react', dependency: '@vitejs/plugin-react',
eslintPlugin: 'eslint-plugin-react-refresh',
middleware: 'reactRefresh', middleware: 'reactRefresh',
}, },
{ {
@ -52,6 +52,11 @@ export const envs: {
eslintPlugin: 'eslint-plugin-testing-library', eslintPlugin: 'eslint-plugin-testing-library',
middleware: 'testingLibrary', middleware: 'testingLibrary',
}, },
{
dependency: 'vitest',
eslintPlugin: 'eslint-plugin-vitest',
middleware: 'vitest',
},
]; ];
export function getProjectDependencies() { export function getProjectDependencies() {

View File

@ -50,6 +50,8 @@ export interface LocalRuleOptions {
'custom/restrict-template-expressions': RuleEntry<{ allow: string[] }>; 'custom/restrict-template-expressions': RuleEntry<{ allow: string[] }>;
/** Ban assignment of empty object literals `{}` and replace them with `Object.create(null)` */ /** Ban assignment of empty object literals `{}` and replace them with `Object.create(null)` */
'custom/no-empty-object-literal': RuleEntry<unknown>; 'custom/no-empty-object-literal': RuleEntry<unknown>;
/** Ban useless import alias */
'custom/no-useless-import-alias': RuleEntry<unknown>;
} }
export type RuleOptions = Rules & Partial<LocalRuleOptions>; export type RuleOptions = Rules & Partial<LocalRuleOptions>;
@ -76,6 +78,8 @@ export type InputConfig = Omit<ESLintConfig, 'rules'> & {
* Glob pattern to find paths to custom rule files in JavaScript or TypeScript. * 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 * Note this must be a string literal or an array of string literals since
* this is statically analyzed. * this is statically analyzed.
*
* Rules are prefixed with `custom/` and the file name is used as the rule name.
*/ */
customRuleFiles?: string | string[]; customRuleFiles?: string | string[];
@ -161,7 +165,7 @@ export function extendConfig(
{ files: ['repl.ts', 'scripts/**/*.ts'], rules: { 'no-console': off } }, { files: ['repl.ts', 'scripts/**/*.ts'], rules: { 'no-console': off } },
...(overrides ?? []), ...(overrides ?? []),
], ],
rules: { ...eslintRules, ...rules }, rules: { ...eslintRules },
...rest, ...rest,
}; };
@ -181,5 +185,7 @@ export function extendConfig(
result.plugins = unique(result.plugins); result.plugins = unique(result.plugins);
result.extends = unique(result.extends); result.extends = unique(result.extends);
Object.assign(result.rules, rules);
return result; return result;
} }

View File

@ -21,6 +21,7 @@ const transpilers = [
function tryRequire() { function tryRequire() {
for (const candidate of transpilers) { for (const candidate of transpilers) {
try { try {
// eslint-disable-next-line @typescript-eslint/no-require-imports
require(candidate); require(candidate);
return; return;
} catch {} } catch {}
@ -70,6 +71,7 @@ function main() {
if (!isAbsolute(file)) { if (!isAbsolute(file)) {
file = resolve(rootDir, file); file = resolve(rootDir, file);
} }
// eslint-disable-next-line @typescript-eslint/no-require-imports
const module = unwrapDefault(require(file)); const module = unwrapDefault(require(file));
const name = module.name ?? basename(file, extname(file)); const name = module.name ?? basename(file, extname(file));
plugin.rules![name] = module; plugin.rules![name] = module;

View File

@ -4,9 +4,15 @@ import { defineMiddleware } from '../middleware';
const customRules: Partial<LocalRuleOptions> = { const customRules: Partial<LocalRuleOptions> = {
'custom/no-import-dot': error, '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); addRules(customRules);
config.overrides.push({
files: ['*.ts', '!*.d.ts'],
rules: {
'custom/restrict-template-expressions': error,
},
});
}); });

View File

@ -7,3 +7,7 @@ export const storybook = defineMiddleware(config => {
export const reactQuery = defineMiddleware(config => { export const reactQuery = defineMiddleware(config => {
config.extends.push('plugin:@tanstack/eslint-plugin-query/recommended'); config.extends.push('plugin:@tanstack/eslint-plugin-query/recommended');
}); });
export const vitest = defineMiddleware(config => {
config.extends.push('plugin:vitest/recommended');
});

View File

@ -7,22 +7,13 @@ import { defineMiddleware } from '../middleware';
const importRules: Partial<ImportXRulesObject> = { const importRules: Partial<ImportXRulesObject> = {
'import-x/first': error, 'import-x/first': error,
'import-x/no-absolute-path': 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/no-useless-path-segments': error,
'import-x/order': [ 'import-x/order': [
error, warn,
{ {
groups: [ groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
'builtin', 'newlines-between': 'always',
'external',
'internal',
'parent',
'sibling',
'index',
'object',
'type',
],
'newlines-between': 'always-and-inside-groups',
alphabetize: { order: 'asc', caseInsensitive: true }, alphabetize: { order: 'asc', caseInsensitive: true },
}, },
], ],
@ -83,18 +74,19 @@ export const importTypeScript = defineMiddleware((config, { addRules, addSetting
}); });
config.overrides.push( 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'], extends: ['plugin:@typescript-eslint/disable-type-checked'],
rules: { rules: {
'import-x/no-commonjs': off, 'import-x/no-commonjs': off,
'import-x/unambiguous': off,
'@typescript-eslint/no-require-imports': off, '@typescript-eslint/no-require-imports': off,
'rules/restrict-template-expressions': off,
}, },
}, },
{ {
files: ['*.d.ts'], files: ['*.d.ts'],
rules: { rules: {
'@typescript-eslint/consistent-type-imports': off, '@typescript-eslint/consistent-type-imports': off,
'import-x/unambiguous': off,
}, },
}, },
); );

View File

@ -1,7 +1,7 @@
/* eslint-disable unicorn/string-content */ /* eslint-disable unicorn/string-content */
import type { UnicornRulesObject } from '@aet/eslint-define-config/src/rules/unicorn'; 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'; import { defineMiddleware } from '../middleware';
const suggest = (suggest: string) => ({ suggest, fix: false }); const suggest = (suggest: string) => ({ suggest, fix: false });
@ -86,10 +86,13 @@ const unicornRules: Partial<UnicornRulesObject> = {
'<=>': suggest('⇔'), '<=>': suggest('⇔'),
'\\.\\.\\.': suggest('…'), '\\.\\.\\.': suggest('…'),
"'s ": suggest('s '), "'s ": suggest('s '),
"'d ": suggest('d '),
"'t ": suggest('t '),
"l'": suggest('l'), "l'": suggest('l'),
"d'": suggest('d'), "d'": suggest('d'),
'?!': suggest('⁈'), "qu'": suggest('qu'),
'!?': suggest('⁉'), '\\?!': suggest('⁈'),
'!\\?': suggest('⁉'),
}, },
}, },
], ],
@ -99,4 +102,10 @@ const unicornRules: Partial<UnicornRulesObject> = {
export const unicorn = defineMiddleware((config, { addRules }) => { export const unicorn = defineMiddleware((config, { addRules }) => {
config.plugins.push('unicorn'); config.plugins.push('unicorn');
addRules(unicornRules); addRules(unicornRules);
config.overrides.push({
files: ['*.test.ts', '*.test.tsx'],
rules: {
'unicorn/no-useless-undefined': off,
},
});
}); });