Skip to content

Commit

Permalink
chore: Enable @typescript-eslint/stylistic config (#6914)
Browse files Browse the repository at this point in the history
* Add @typescript-eslint/stylistic

* Remove knip ignore
  • Loading branch information
lachlancollins committed Feb 17, 2024
1 parent 496cd8c commit 426bcd6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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' },
Expand All @@ -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',
Expand Down
23 changes: 9 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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-*
1 change: 0 additions & 1 deletion knip.json
Original file line number Diff line number Diff line change
@@ -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"],
Expand Down
2 changes: 1 addition & 1 deletion packages/query-core/src/queryObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class QueryObserver<
#staleTimeoutId?: ReturnType<typeof setTimeout>
#refetchIntervalId?: ReturnType<typeof setInterval>
#currentRefetchInterval?: number | false
#trackedProps: Set<keyof QueryObserverResult> = new Set()
#trackedProps = new Set<keyof QueryObserverResult>()

constructor(
client: QueryClient,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query-next-experimental/src/htmlescape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string> = {
'&': '\\u0026',
'>': '\\u003e',
'<': '\\u003c',
Expand Down

0 comments on commit 426bcd6

Please sign in to comment.