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

eslint.config.js

52 lines1.7 KB

1// @ts-check
2​
3// @ts-ignore Needed due to moduleResolution Node vs Bundler
4import { tanstackConfig } from '@tanstack/config/eslint'
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 'codemod', // We support our codemod
22 'combinate', // Library name
23 'extralight', // Our public interface
24 'jscodeshift',
25 'Promisable', // Our public interface
26 'retryer', // Our public interface
27 'solidjs', // Our target framework
28 'tabular-nums', // https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-numeric
29 'tanstack', // Our package scope
30 'todos', // Too general word to be caught as error
31 'TSES', // @typescript-eslint package's interface
32 'tsqd', // Our public interface (TanStack Query Devtools shorthand)
33 'tsup', // We use tsup as builder
34 'typecheck', // Field of vite.config.ts
35 'vue-demi', // dependency of @tanstack/vue-query
36 ],
37 },
38 },
39 ],
40 '@typescript-eslint/no-empty-function': 'off',
41 '@typescript-eslint/no-unsafe-function-type': 'off',
42 '@typescript-eslint/require-await': 'error',
43 'no-case-declarations': 'off',
44 },
45 },
46 {
47 files: ['**/*.spec.ts*', '**/*.test.ts*', '**/*.test-d.ts*'],
48 plugins: { vitest },
49 rules: vitest.configs.recommended.rules,
50 settings: { vitest: { typecheck: true } },
51 },