-
Notifications
You must be signed in to change notification settings - Fork 31.2k
Expand file tree
/
Copy patheslint.cli.config.mjs
More file actions
39 lines (38 loc) · 1.12 KB
/
eslint.cli.config.mjs
File metadata and controls
39 lines (38 loc) · 1.12 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
import { defineConfig } from 'eslint/config'
import baseConfig from './eslint.config.mjs'
export default defineConfig([
{
extends: [baseConfig],
},
{
files: ['**/*.ts', '**/*.tsx'],
// This override adds type-checked rules.
// Linting with type-checked rules is very slow and needs a lot of memory,
// so we exclude non-essential files.
// NOTE: eslint.config.mjs has a config block that mirrors these
// `files`/`ignores` to override non-type-checked rules for the same set of
// files. Keep both in sync if you change the globs.
ignores: [
'bench/**/*',
'examples/**/*',
'test/**/*',
'**/*.d.ts',
'turbopack/**/*',
],
languageOptions: {
parserOptions: {
project: true,
},
},
// These rules are added on top of the rules that are declared in
// the base config for the matching files.
rules: {
// TODO: enable in follow-up PR
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/switch-exhaustiveness-check': [
'error',
{ requireDefaultForNonUnion: true },
],
},
},
])