Closed JoshuaKGoldberg closed 8 months ago
Would you be open to a PR that adds a few explicit call signatures that have a type for the RuleListener's node? We use this strategy in typescript-eslint to remove the need for most node: ... type annotations in our rules.
Thank you for posting the issue! Yeah, I think it would be useful to have that type annotations. I think it would be useful if jsonc-eslint-parser provided type annotations so that each plugin would be easier to use.
Found when looking into https://github.com/ota-meshi/jsonc-eslint-parser/issues/184: this package's rules seem to completely ignore
estree
types, and instead replace node types with their ownAST.JSON*
types.https://github.com/ota-meshi/eslint-plugin-jsonc/blob/247c013126fbbaa8eb169527c7b5cdf8e8987bab/lib/types.ts#L3-L5
https://github.com/ota-meshi/eslint-plugin-jsonc/blob/247c013126fbbaa8eb169527c7b5cdf8e8987bab/lib/rules/no-bigint-literals.ts#L25
Would you be open to a PR that adds a few explicit call signatures that have a type for the
RuleListener
'snode
? We use this strategy in typescript-eslint to remove the need for mostnode: ...
type annotations in our rules.In theory this could be automated with TypeScript type magicks. I haven't looked into it.