๐Ÿ“ฆ vercel / next.js

๐Ÿ“„ eslint.cli.config.mjs ยท 28 lines
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
28import { 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.
    ignores: ['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',
    },
  },
])