Skip to content

Commit febbde6

Browse files
chore: Update ESLint config (#7637)
* chore: Update ESLint config * Fix errors * Fix knip
1 parent e6a0fdd commit febbde6

File tree

48 files changed

+77
-159
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+77
-159
lines changed

eslint.config.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
// @ts-check
22

3-
// @ts-ignore
4-
import { rootConfig } from '@tanstack/config/eslint'
5-
// @ts-ignore
6-
import cspellConfigs from '@cspell/eslint-plugin/configs'
3+
// @ts-ignore Needed due to moduleResolution Node vs Bundler
4+
import { tanstackConfig } from '@tanstack/config/eslint'
5+
import pluginCspell from '@cspell/eslint-plugin'
76

87
export default [
9-
...rootConfig,
10-
cspellConfigs.recommended,
8+
...tanstackConfig,
119
{
1210
name: 'tanstack/temp',
11+
plugins: {
12+
cspell: pluginCspell,
13+
},
1314
rules: {
14-
'@cspell/spellchecker': [
15-
'error',
15+
'cspell/spellchecker': [
16+
'warn',
1617
{
1718
cspell: {
1819
words: [
@@ -34,8 +35,11 @@ export default [
3435
},
3536
},
3637
],
37-
'@typescript-eslint/no-empty-function': 'off',
38+
'ts/ban-types': 'off',
39+
'ts/no-empty-function': 'off',
40+
'ts/require-await': 'off',
3841
'no-case-declarations': 'off',
42+
'no-empty': 'off',
3943
'no-prototype-builtins': 'off',
4044
},
4145
},

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"@cspell/eslint-plugin": "^8.9.1",
4747
"@eslint-react/eslint-plugin": "^1.5.16",
4848
"@solidjs/testing-library": "^0.8.8",
49-
"@tanstack/config": "^0.8.1",
49+
"@tanstack/config": "^0.8.6",
5050
"@testing-library/jest-dom": "^6.4.5",
5151
"@testing-library/react": "^15.0.7",
5252
"@types/node": "^20.12.12",
@@ -72,7 +72,6 @@
7272
"solid-js": "^1.8.17",
7373
"tsup": "^8.0.2",
7474
"typescript": "5.3.3",
75-
"typescript-eslint": "^7.14.1",
7675
"typescript47": "npm:typescript@4.7",
7776
"typescript48": "npm:typescript@4.8",
7877
"typescript49": "npm:typescript@4.9",

packages/angular-query-devtools-experimental/src/angular-query-devtools.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import { isPlatformBrowser } from '@angular/common'
22
import * as queryDevtools from '@tanstack/query-devtools'
3-
import {
4-
injectQueryClient,
5-
onlineManager,
6-
} from '@tanstack/angular-query-experimental'
73
import {
84
ChangeDetectionStrategy,
95
Component,
@@ -14,7 +10,11 @@ import {
1410
booleanAttribute,
1511
inject,
1612
} from '@angular/core'
17-
import { QueryClient } from '@tanstack/angular-query-experimental'
13+
import {
14+
QueryClient,
15+
injectQueryClient,
16+
onlineManager,
17+
} from '@tanstack/angular-query-experimental'
1818
import type {
1919
AfterViewInit,
2020
OnChanges,

packages/angular-query-experimental/src/infinite-query-options.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
import type { DataTag } from '@tanstack/query-core'
2-
import type { InfiniteData } from '@tanstack/query-core'
1+
import type {
2+
DataTag,
3+
DefaultError,
4+
InfiniteData,
5+
QueryKey,
6+
} from '@tanstack/query-core'
37
import type { CreateInfiniteQueryOptions, NonUndefinedGuard } from './types'
4-
import type { DefaultError, QueryKey } from '@tanstack/query-core'
58

69
/**
710
* @public

packages/angular-query-experimental/src/util/assert-injector/assert-injector.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable @cspell/spellchecker */
1+
/* eslint-disable cspell/spellchecker */
22
/**
33
* The code in this file is adapted from NG Extension Platform at https://ngxtension.netlify.app.
44
*

packages/angular-query-experimental/src/util/assert-injector/assert-injector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable @cspell/spellchecker */
1+
/* eslint-disable cspell/spellchecker */
22
/**
33
* The code in this file is adapted from NG Extension Platform at https://ngxtension.netlify.app.
44
*

packages/angular-query-experimental/src/util/create-injection-token/create-injection-token.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable @cspell/spellchecker */
1+
/* eslint-disable cspell/spellchecker */
22
/**
33
* The code in this file is adapted from NG Extension Platform at https://ngxtension.netlify.app.
44
*

packages/angular-query-experimental/src/util/create-injection-token/create-injection-token.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable @cspell/spellchecker */
1+
/* eslint-disable cspell/spellchecker */
22
/**
33
* The code in this file is adapted from NG Extension Platform at https://ngxtension.netlify.app.
44
*
@@ -169,7 +169,7 @@ export function createNoopInjectionToken<
169169
type TReturn = TMulti extends true ? Array<TValue> : TValue
170170

171171
const token =
172-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
172+
// eslint-disable-next-line ts/no-unnecessary-condition
173173
(options as CreateInjectionTokenOptions<() => void, []>)?.token ||
174174
new InjectionToken<TReturn>(description)
175175
return [

packages/query-codemods/eslint.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ export default [
66
...rootConfig,
77
{
88
rules: {
9-
'@cspell/spellchecker': 'off',
10-
'@typescript-eslint/no-unused-vars': 'off',
11-
'@typescript-eslint/no-unnecessary-condition': 'off',
9+
'cspell/spellchecker': 'off',
10+
'ts/no-unnecessary-condition': 'off',
11+
'import/no-duplicates': 'off',
1212
'import/no-unresolved': 'off',
1313
'import/order': 'off',
1414
'no-shadow': 'off',

packages/query-codemods/src/v4/__tests__/key-transformation.test.cjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// eslint-disable-next-line @typescript-eslint/no-var-requires
21
const defineTest = require('jscodeshift/dist/testUtils').defineTest
32

43
defineTest(__dirname, 'key-transformation.cjs', null, 'default-import', {

0 commit comments

Comments
 (0)