-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
82 lines (78 loc) · 2.35 KB
/
eslint.config.js
File metadata and controls
82 lines (78 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// @ts-check
import { fileURLToPath } from "node:url";
import { includeIgnoreFile } from "@eslint/compat";
// @ts-ignore Needed due to moduleResolution Node vs Bundler
import { tanstackConfig } from '@tanstack/config/eslint';
import pluginCspell from '@cspell/eslint-plugin';
import vitest from '@vitest/eslint-plugin';
import eslintPluginPlugin from 'eslint-plugin-eslint-plugin';
const gitignorePath = fileURLToPath(new URL(".gitignore", import.meta.url));
export default [
includeIgnoreFile(gitignorePath, "Imported .gitignore patterns"),
...tanstackConfig,
eslintPluginPlugin.configs['all-type-checked'],
{
rules: {
'eslint-plugin/test-case-property-ordering': ['error', ['name', 'errors', 'code', 'output']],
}
},
{
name: 'tanstack/temp',
plugins: {
cspell: pluginCspell,
},
rules: {
'cspell/spellchecker': [
'warn',
{
cspell: {
words: [
'Promisable', // Our public interface
'TSES', // @typescript-eslint package's interface
'codemod', // We support our codemod
'datatag', // Query options tagging
'extralight', // Our public interface
'jscodeshift',
'refetches', // Query refetch operations
'retryer', // Our public interface
'solidjs', // Our target framework
'tabular-nums', // https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-numeric
'tanstack', // Our package scope
'todos', // Too general word to be caught as error
'tsqd', // Our public interface (TanStack Query Devtools shorthand)
'tsup', // We use tsup as builder
'typecheck', // Field of vite.config.ts
'vue-demi', // dependency of @tanstack/vue-query
'ɵkind', // Angular specific
'ɵproviders', // Angular specific
],
},
},
],
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'no-case-declarations': 'off',
},
},
{
files: ['**/*.spec.ts*', '**/*.test.ts*', '**/*.test-d.ts*'],
plugins: { vitest },
rules: vitest.configs.recommended.rules,
settings: { vitest: { typecheck: true } },
},
{
plugins: { vitest },
rules: {
...vitest.configs.recommended.rules,
'vitest/expect-expect': [
'warn',
{
assertFunctionNames: ['expect', 'expectArrayEqualIgnoreOrder'],
},
],
},
},
{
ignores: ['src/__tests__/entrypoint.test.ts']
}
];