Closed alecmev closed 3 months ago
I don't really understand what you mean by problem. The types provided by this plugin are of no use to anyone other than the person writing the plugin. Are you asking to remove d.ts from this plugin? If not, please provide a repository that reproduces the problem.
Are you asking to remove d.ts from this plugin?
No, the presence of .d.ts
is appreciated.
The types provided by this plugin are of no use to anyone other than the person writing the plugin.
Hmm, I'm just a user, and they're useful to me. My eslint.config.js
is type-checked, because I like being told by TypeScript when I don't put something in the right spot, which happens relatively often.
If not, please provide a repository that reproduces the problem.
Sure! Here: https://github.com/alecmev/eslint-plugin-jsonc-repro-309 Run npm i
and then npx tsc
.
After switching to typescript-eslint
's types, as per https://github.com/typescript-eslint/typescript-eslint/issues/8613#issuecomment-1983584487, the error around plugin
goes away, but not rules
.
I checked, and I think it's a bug in @types/eslint
. The @types/eslint
type definition cannot accept nodes other than @types/estree
, but eslint
can accept extended nodes.
I think the problem is that string
just isn't specific enough. It should be "error" | "warn" | "off"
, or even just the exact value, which is "error"
in this case.
as const
would help then.
This should be fixed in #322
I'm getting the following errors with
skipLibCheck: false
:I'm using a flat config, but I don't think that's the reason.