From 4588951d1b3f91f7fa2522e41d76088a7291ef3d Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sat, 17 Feb 2024 13:06:40 +1100 Subject: [PATCH 1/2] Add @typescript-eslint/stylistic --- .eslintrc.cjs | 3 +++ .gitignore | 23 ++++++++----------- packages/query-core/src/queryObserver.ts | 2 +- .../src/htmlescape.ts | 2 +- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index bd85d64c21..9a244f0617 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -11,6 +11,7 @@ const config = { 'eslint:recommended', 'plugin:@cspell/recommended', 'plugin:@typescript-eslint/recommended', + 'plugin:@typescript-eslint/stylistic', 'plugin:import/recommended', 'plugin:import/typescript', 'prettier', @@ -64,6 +65,7 @@ const config = { ], '@typescript-eslint/ban-types': 'off', '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/consistent-type-definitions': 'off', '@typescript-eslint/consistent-type-imports': [ 'error', { prefer: 'type-imports' }, @@ -83,6 +85,7 @@ const config = { }, }, ], + '@typescript-eslint/no-empty-function': 'off', '@typescript-eslint/no-empty-interface': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-non-null-assertion': 'off', diff --git a/.gitignore b/.gitignore index f0a1e00fa8..16202c3520 100644 --- a/.gitignore +++ b/.gitignore @@ -7,18 +7,9 @@ package-lock.json yarn.lock # builds -types -*/**/.angular -*/**/.svelte-kit -*/**/.tsup -*/**/build -*/**/dist -*/**/lib -*/**/es -artifacts -.rpt2_cache +build coverage -*.tgz +dist # misc .DS_Store @@ -41,9 +32,13 @@ stats.html *.log *.tsbuildinfo -.DS_Store +.angular .cache -.pnpm-store .idea - .nx/cache +.pnpm-store +.svelte-kit +.tsup + +vite.config.js.timestamp-* +vite.config.ts.timestamp-* diff --git a/packages/query-core/src/queryObserver.ts b/packages/query-core/src/queryObserver.ts index a9a51a4ac4..a52e90a804 100644 --- a/packages/query-core/src/queryObserver.ts +++ b/packages/query-core/src/queryObserver.ts @@ -64,7 +64,7 @@ export class QueryObserver< #staleTimeoutId?: ReturnType #refetchIntervalId?: ReturnType #currentRefetchInterval?: number | false - #trackedProps: Set = new Set() + #trackedProps = new Set() constructor( client: QueryClient, diff --git a/packages/react-query-next-experimental/src/htmlescape.ts b/packages/react-query-next-experimental/src/htmlescape.ts index 06f01532f8..cad819b397 100644 --- a/packages/react-query-next-experimental/src/htmlescape.ts +++ b/packages/react-query-next-experimental/src/htmlescape.ts @@ -9,7 +9,7 @@ // This utility is based on https://github.com/zertosh/htmlescape // License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE -const ESCAPE_LOOKUP: { [match: string]: string } = { +const ESCAPE_LOOKUP: Record = { '&': '\\u0026', '>': '\\u003e', '<': '\\u003c', From c97eceefdb473b88cf1fa5d8aefdc1def71126f1 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sat, 17 Feb 2024 13:07:23 +1100 Subject: [PATCH 2/2] Remove knip ignore --- knip.json | 1 - 1 file changed, 1 deletion(-) diff --git a/knip.json b/knip.json index 8693e6613d..a2707455cd 100644 --- a/knip.json +++ b/knip.json @@ -1,7 +1,6 @@ { "$schema": "https://unpkg.com/knip@4/schema.json", "ignoreWorkspaces": ["examples/**", "integrations/**"], - "ignore": ["**/react-app-env.d.ts", "**/vite-env.d.ts"], "workspaces": { "packages/codemods": { "entry": ["src/v4/*.js", "src/v5/*/*.js"],