Closed JoshuaKGoldberg closed 8 months ago
Latest commit: d37340fa96ba0f66d46c410eebba22995a3ff94c
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
It may need to be refactored if a type annotation utility is added to jsonc-eslint-parser, but for now this PR is good so I'll merge it. Thank you!
Augments the
RuleListener
interface with two mappings fromAST.JSONNode["type"]
. One adds the node types under their name (e.g."JSONLiteral"
); the other adds them under their name +":exit"
. We utilize a similar strategy in typescript-eslint: https://github.com/typescript-eslint/typescript-eslint/blob/4c8edcfb7d3cc02d07d2329c87da4377c1cbf969/packages/utils/src/ts-eslint/Rule.ts#L289Also removes the now-redundant explicit type annotations from the
node
parameters in rule listener functions.Fixes #268.