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

eslint.config.js

48 lines1.3 KB

1import { tanstackConfig } from '@tanstack/eslint-config'
2​
3export default [
4 ...tanstackConfig,
5 {
6 ignores: [
7 `**/dist/**`,
8 `**/.output/**`,
9 `**/.nitro/**`,
10 `**/traildepot/**`,
11 `examples/angular/**`,
12 `packages/db-collection-e2e/vite.config.ts`,
13 `packages/capacitor-db-sqlite-persistence/e2e/app/android/**`,
14 `packages/capacitor-db-sqlite-persistence/e2e/app/ios/**`,
15 // Expo expects Metro config in CommonJS format.
16 `packages/expo-db-sqlite-persistence/e2e/expo-runtime-app/metro.config.js`,
17 ],
18 },
19 {
20 settings: {
21 // import-x/* settings required for import/no-cycle.
22 'import-x/resolver': { typescript: true },
23 'import-x/extensions': ['.ts', '.tsx', '.js', '.jsx', '.cjs', '.mjs'],
24 },
25 rules: {
26 'pnpm/enforce-catalog': `off`,
27 'pnpm/json-enforce-catalog': `off`,
28 },
29 },
30 {
31 files: [`**/*.ts`, `**/*.tsx`],
32 rules: {
33 '@typescript-eslint/no-unused-vars': [
34 `error`,
35 { argsIgnorePattern: `^_`, varsIgnorePattern: `^_` },
36 ],
37 '@typescript-eslint/naming-convention': [
38 `error`,
39 {
40 selector: `typeParameter`,
41 format: [`PascalCase`],
42 leadingUnderscore: `allow`,
43 },
44 ],
45 'import/no-cycle': `error`,
46 },
47 },