Add TypeScript support to ESLint flat config (#30044)

Sync ESLint flat config names with [the latest
docs](https://eslint.org/docs/latest/use/configure/configuration-files#configuration-file).
New ESLint has native support for `eslint.config.ts`

Release Notes:

- N/A

---------

Co-authored-by: Peter Tripp <peter@zed.dev>
This commit is contained in:
Andrey Sitnik 2025-05-07 14:49:00 +02:00 committed by GitHub
parent 1a520990cc
commit 2618191785
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -341,8 +341,14 @@ impl EsLintLspAdapter {
const SERVER_PATH: &'static str = "vscode-eslint/server/out/eslintServer.js";
const SERVER_NAME: LanguageServerName = LanguageServerName::new_static("eslint");
const FLAT_CONFIG_FILE_NAMES: &'static [&'static str] =
&["eslint.config.js", "eslint.config.mjs", "eslint.config.cjs"];
const FLAT_CONFIG_FILE_NAMES: &'static [&'static str] = &[
"eslint.config.js",
"eslint.config.mjs",
"eslint.config.cjs",
"eslint.config.ts",
"eslint.config.cts",
"eslint.config.mts",
];
pub fn new(node: NodeRuntime) -> Self {
EsLintLspAdapter { node }