From e13e3c7a5a804f1c351fdd1e115d2be03e3eed8d Mon Sep 17 00:00:00 2001 From: Leif Arriens <30775450+leifarriens@users.noreply.github.com> Date: Wed, 16 Oct 2024 23:08:01 +0200 Subject: [PATCH] fix: add eslintjs types (#1216) --- pnpm-lock.yaml | 36 +++++++++++++++++++++++++++--------- tooling/eslint/package.json | 1 + tooling/eslint/types.d.ts | 10 ---------- 3 files changed, 28 insertions(+), 19 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9505a5246..8d063fb19 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -553,7 +553,7 @@ importers: version: 7.37.1(eslint@9.12.0(jiti@2.3.3)) eslint-plugin-react-hooks: specifier: rc - version: 5.1.0-rc-1460d67c-20241003(eslint@9.12.0(jiti@2.3.3)) + version: 5.1.0-rc-09111202-20241011(eslint@9.12.0(jiti@2.3.3)) eslint-plugin-turbo: specifier: ^2.1.3 version: 2.1.3(eslint@9.12.0(jiti@2.3.3)) @@ -567,6 +567,9 @@ importers: '@acme/tsconfig': specifier: workspace:* version: link:../typescript + '@types/eslint__js': + specifier: 8.42.3 + version: 8.42.3 eslint: specifier: 'catalog:' version: 9.12.0(jiti@2.3.3) @@ -2330,7 +2333,7 @@ packages: '@radix-ui/react-compose-refs@1.1.0': resolution: {integrity: sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==} peerDependencies: - '@types/react': '*' + '@types/react': 18.3.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -2419,7 +2422,7 @@ packages: '@radix-ui/react-id@1.1.0': resolution: {integrity: sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA==} peerDependencies: - '@types/react': '*' + '@types/react': 18.3.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -2493,7 +2496,7 @@ packages: '@radix-ui/react-primitive@2.0.0': resolution: {integrity: sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==} peerDependencies: - '@types/react': '*' + '@types/react': 18.3.1 '@types/react-dom': '*' react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc @@ -2533,7 +2536,7 @@ packages: '@radix-ui/react-use-callback-ref@1.1.0': resolution: {integrity: sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==} peerDependencies: - '@types/react': '*' + '@types/react': 18.3.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -2542,7 +2545,7 @@ packages: '@radix-ui/react-use-controllable-state@1.1.0': resolution: {integrity: sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==} peerDependencies: - '@types/react': '*' + '@types/react': 18.3.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -3075,6 +3078,12 @@ packages: '@types/cookie@0.6.0': resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} + '@types/eslint@9.6.1': + resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} + + '@types/eslint__js@8.42.3': + resolution: {integrity: sha512-alfG737uhmPdnvkrLdZLcEKJ/B8s9Y4hrZ+YAdzUeoArBlSUERA2E87ROfOaS4jd/C45fzOoZzidLc1IPwLqOw==} + '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} @@ -4450,8 +4459,8 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9 - eslint-plugin-react-hooks@5.1.0-rc-1460d67c-20241003: - resolution: {integrity: sha512-6RB5ld4hvk8hDc0JNMyid5/+SQ0ZyRtmmZV2lSvnWAA0zLIANUpSf7QNb7gtPYVop4qSu79hJpBsDGwdtXluig==} + eslint-plugin-react-hooks@5.1.0-rc-09111202-20241011: + resolution: {integrity: sha512-HLdP3Qpr9KUckSEhxwWHqpXGJYKlZV+P9gqdOwPa45Ka3qhY1kuflvtwRMMA9dd7p8AL/lRLU3UUfNcDVh5DGw==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 @@ -11115,6 +11124,15 @@ snapshots: '@types/cookie@0.6.0': {} + '@types/eslint@9.6.1': + dependencies: + '@types/estree': 1.0.6 + '@types/json-schema': 7.0.15 + + '@types/eslint__js@8.42.3': + dependencies: + '@types/eslint': 9.6.1 + '@types/estree@1.0.5': {} '@types/estree@1.0.6': {} @@ -12655,7 +12673,7 @@ snapshots: safe-regex-test: 1.0.3 string.prototype.includes: 2.0.0 - eslint-plugin-react-hooks@5.1.0-rc-1460d67c-20241003(eslint@9.12.0(jiti@2.3.3)): + eslint-plugin-react-hooks@5.1.0-rc-09111202-20241011(eslint@9.12.0(jiti@2.3.3)): dependencies: eslint: 9.12.0(jiti@2.3.3) diff --git a/tooling/eslint/package.json b/tooling/eslint/package.json index 991fd01fc..b9d65dbe9 100644 --- a/tooling/eslint/package.json +++ b/tooling/eslint/package.json @@ -26,6 +26,7 @@ "devDependencies": { "@acme/prettier-config": "workspace:*", "@acme/tsconfig": "workspace:*", + "@types/eslint__js": "8.42.3", "eslint": "catalog:", "prettier": "catalog:", "typescript": "catalog:" diff --git a/tooling/eslint/types.d.ts b/tooling/eslint/types.d.ts index f0dba6d00..11a9ff0be 100644 --- a/tooling/eslint/types.d.ts +++ b/tooling/eslint/types.d.ts @@ -3,16 +3,6 @@ * we "need" to type some of the plugins manually :( */ -declare module "@eslint/js" { - // Why the hell doesn't eslint themselves export their types? - import type { Linter } from "eslint"; - - export const configs: { - readonly recommended: { readonly rules: Readonly }; - readonly all: { readonly rules: Readonly }; - }; -} - declare module "eslint-plugin-import" { import type { Linter, Rule } from "eslint";