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:
parent
1a520990cc
commit
2618191785
1 changed files with 8 additions and 2 deletions
|
@ -341,8 +341,14 @@ impl EsLintLspAdapter {
|
||||||
const SERVER_PATH: &'static str = "vscode-eslint/server/out/eslintServer.js";
|
const SERVER_PATH: &'static str = "vscode-eslint/server/out/eslintServer.js";
|
||||||
const SERVER_NAME: LanguageServerName = LanguageServerName::new_static("eslint");
|
const SERVER_NAME: LanguageServerName = LanguageServerName::new_static("eslint");
|
||||||
|
|
||||||
const FLAT_CONFIG_FILE_NAMES: &'static [&'static str] =
|
const FLAT_CONFIG_FILE_NAMES: &'static [&'static str] = &[
|
||||||
&["eslint.config.js", "eslint.config.mjs", "eslint.config.cjs"];
|
"eslint.config.js",
|
||||||
|
"eslint.config.mjs",
|
||||||
|
"eslint.config.cjs",
|
||||||
|
"eslint.config.ts",
|
||||||
|
"eslint.config.cts",
|
||||||
|
"eslint.config.mts",
|
||||||
|
];
|
||||||
|
|
||||||
pub fn new(node: NodeRuntime) -> Self {
|
pub fn new(node: NodeRuntime) -> Self {
|
||||||
EsLintLspAdapter { node }
|
EsLintLspAdapter { node }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue