-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
52 lines (51 loc) · 1.71 KB
/
Copy patheslint.config.js
File metadata and controls
52 lines (51 loc) · 1.71 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
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{
ignores: [
'**/dist/**',
'**/build/**',
'**/.svelte-kit/**',
'**/node_modules/**',
'**/coverage/**',
'**/.turbo/**',
'**/.claude/**',
'**/.memory/**',
'**/*.svelte',
'**/*.d.ts',
// SvelteKit compiles the service worker in a separate webworker tsconfig (so typescript-eslint's
// project service can't place it); it is type-checked by `svelte-check` instead.
'**/service-worker.ts',
],
},
js.configs.recommended,
// Type-aware rules for the source + test TypeScript (covered by each package's tsconfig).
{
files: ['packages/*/src/**/*.ts', 'apps/*/src/**/*.ts', 'apps/*/tests/**/*.ts'],
extends: [...tseslint.configs.recommendedTypeChecked],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
// Plain (non-type-aware) recommended for config files and anything else.
{
files: ['**/*.ts', '**/*.js', '**/*.mjs'],
ignores: ['packages/*/src/**/*.ts', 'apps/*/src/**/*.ts', 'apps/*/tests/**/*.ts'],
extends: [...tseslint.configs.recommended],
},
{
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
// Several APIs are async by contract (crypto helpers kept swappable; Fastify handlers;
// the canUseTool/AgentAdapter Promise-returning callbacks) even when a given body has no
// await. require-await would force ugly no-op awaits or break those signatures.
'@typescript-eslint/require-await': 'off',
},
},
);