Open andy0130tw opened 2 months ago
I found this ad-hoc patch useful if I want to disable the flat config no matter what:
Edit ~/Library/Application\ Support/Zed/languages/eslint/vscode-eslint-release/2.4.4/vscode-eslint/server/out/eslint.js
at line 606:
resultPromise = connection.workspace.getConfiguration({ scopeUri: uri, section: '' }).then((configuration) => {
const settings = Object.assign({}, configuration, { silent: false, library: undefined, resolvedGlobalPackageManagerPath: undefined }, { workingDirectory: undefined });
+ settings.experimental.useFlatConfig = false
if (settings.validate === settings_1.Validate.off) {
Check for existing issues
Edit: See also https://github.com/zed-industries/zed/issues/9648.
Describe the feature
Zed's eslint support for TypeScript projects is implemented by adapting the language service powered by vscode-eslint. The docs hint the key
lsp.eslint.settings.*
for configurating eslint, however, only few key is read. Its configuration, is a hardcoded object with values determined with some heuristics, which is hardly configurable. It can gain much more flexibility if we can supply a set of extra options from Zed's settings.A use case would be disabling flat config in a nested directory setup where
eslint.config.{,c,m}js
is present in workspace root. Note that setting a working directory following #9648's suggestion does not work around this issue. This is currently impossible without patching the package Zed has downloaded.If applicable, add mockups / screenshots to help present your vision of the feature
N/A