Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

root.eslint.config.js

64 lines2.0 KB

1// @ts-check
2​
3// @ts-ignore Needed due to moduleResolution Node vs Bundler
4import { tanstackConfig } from '@tanstack/eslint-config'
5import pluginCspell from '@cspell/eslint-plugin'
6import vitest from '@vitest/eslint-plugin'
7​
8export default [
9 ...tanstackConfig,
10 {
11 name: 'tanstack/temp',
12 plugins: {
13 cspell: pluginCspell,
14 },
15 rules: {
16 'cspell/spellchecker': [
17 'warn',
18 {
19 cspell: {
20 words: [
21 'Promisable', // Our public interface
22 'TSES', // @typescript-eslint package's interface
23 'codemod', // We support our codemod
24 'combinate', // Library name
25 'datatag', // Query options tagging
26 'extralight', // Our public interface
27 'jscodeshift',
28 'refetches', // Query refetch operations
29 'retryer', // Our public interface
30 'solidjs', // Our target framework
31 'tabular-nums', // https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-numeric
32 'tanstack', // Our package scope
33 'todos', // Too general word to be caught as error
34 'tsqd', // Our public interface (TanStack Query Devtools shorthand)
35 'tsup', // We use tsup as builder
36 'typecheck', // Field of vite.config.ts
37 'vue-demi', // dependency of @tanstack/vue-query
38 'ɵkind', // Angular specific
39 'ɵproviders', // Angular specific
40 ],
41 },
42 },
43 ],
44 '@typescript-eslint/no-empty-function': 'off',
45 '@typescript-eslint/no-unsafe-function-type': 'off',
46 'no-case-declarations': 'off',
47 'prefer-const': 'off',
48 },
49 },
50 {
51 files: ['**/*.spec.ts*', '**/*.test.ts*', '**/*.test-d.ts*'],
52 plugins: { vitest },
53 rules: {
54 ...vitest.configs.recommended.rules,
55 'vitest/no-standalone-expect': [
56 'error',
57 {
58 additionalTestBlockFunctions: ['testIf'],
59 },
60 ],
61 },
62 settings: { vitest: { typecheck: true } },
63 },