Support ESLint flat configs (#8109)

Kristján Oddsson created

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))

Change summary

crates/zed/src/languages/typescript.rs | 4 ++++
1 file changed, 4 insertions(+)

Detailed changes

crates/zed/src/languages/typescript.rs 🔗

@@ -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(),
+                },
             }
         })
     }