Skip to content

Commit

Permalink
eslint: allow ts extensions for config (vercel#75222)
Browse files Browse the repository at this point in the history
### Why?

`eslint.config.*ts` config files were not included to be calculated before as they are experimental but shouldn't be a blocker from us, so uncommented them from the supported config files.

Will follow up with eslint config test cases when we enable the flat config on `eslint-config-next`, but confirmed on local that `.(m|c)ts` extensions work.

Fixes vercel#74900
  • Loading branch information
devjiwonchoi authored Jan 23, 2025
1 parent 9083d93 commit f10073b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/next/src/lib/eslint/runLintCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,11 @@ export async function runLintCheck(
'eslint.config.js',
'eslint.config.mjs',
'eslint.config.cjs',
// TODO(jiwon): Support when it's stable.
// TS extensions are experimental and requires to install another package `jiti`.
// TS extensions require to install a separate package `jiti`.
// https://eslint.org/docs/latest/use/configure/configuration-files#typescript-configuration-files
// 'eslint.config.ts',
// 'eslint.config.mts',
// 'eslint.config.cts',
'eslint.config.ts',
'eslint.config.mts',
'eslint.config.cts',
// eslint <= v8
'.eslintrc.js',
'.eslintrc.cjs',
Expand Down

0 comments on commit f10073b

Please sign in to comment.