Closed waspeer closed 3 months ago
Hi, thanks for suggesting this. There is a comment below the line you added, reading
// no languageOptions; ESLint's default parser can't parse TypeScript,
// and parsers are configured in languageOptions, so let the user handle
// this rather than cause potential conflicts
I've considered providing languageOptions
to the TypeScript config, but there are multiple ways to support parsing TypeScript, and I don't want to tie users to any particular one. I think that's a reasonable tradeoff for requiring a few extra lines of config.
I'm going to close this, but I'm happy to reconsider if this gets significant attention from the community. But again, thanks for putting in the time to create a PR, and please feel welcome to make any other suggestions in the future 🙂
Ah, I apologize for missing the comment right below my change 🙈
I understand the reasoning, but I don't believe there is a significant risk of conflicts. In fact, I would argue that this config wouldn't make much sense without jsx: true
, given that it's intended for use with Solid. In my personal ESLint setup, I combine Solid's TypeScript config with recommended.languageOptions
spread in in combination with the typescript-eslint
recommended config, and it works perfectly.
Since this setup will likely be used by the majority of users, optimizing for it seems reasonable. Additionally, flat configs can be easily customized for edge cases, so I don't foresee any major issues.
If the typescript config is meant to be a drop-in replacement of the recommended config it is expected to also have similar languageOptions.