Support ESLint flat configs (#8109)

Not available before the new eslint language server version is released, but prepares the ground for it.

## Further reading

- https://eslint.org/docs/latest/use/configure/configuration-files-new
- https://github.com/microsoft/vscode-eslint?tab=readme-ov-file#settings-options

Release Notes:

- Added ESLint flat config support
([#7271](https://github.com/zed-industries/zed/issues/7271))
This commit is contained in:
Kristján Oddsson 2024-02-22 21:22:31 +01:00 committed by GitHub
parent a475d8640f
commit 347f68887f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -237,6 +237,10 @@ impl LspAdapter for EsLintLspAdapter {
"name": workspace_root.file_name()
.unwrap_or_else(|| workspace_root.as_os_str()),
},
"problems": {},
"experimental": {
"useFlatConfig": workspace_root.join("eslint.config.js").is_file(),
},
}
})
}