-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add top-level-interop rule #69
Conversation
A new rule that checks that the top-level item in a JSON file is either an array or an object, as suggested by RFC8259. Not turned on in the recommended config because the software that had this issue is almost entirely obsolete. Refs eslint#68.
I clicked through the CLA. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this together. Overall, it looks good. Just some areas to clean up before merging.
Made requested changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Waiting for a second review before merging.
Co-authored-by: Milos Djermanovic <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Waiting for @mdjermanovic to re-review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
A new rule that checks that the top-level item in a JSON file is either an array or an object, as suggested by RFC8259. Not turned on in the recommended config because the software that had this issue is almost entirely obsolete.
Refs #68.
Prerequisites checklist
What is the purpose of this pull request?
As discussed in #68, add a new rule to enforce the top-level item in a JSON doc be an array or object.
What changes did you make? (Give an overview)
Added src/rules/top-level-interop.js and tests/rules/top-level-interop.test.js
Related Issues
Refs #68
Is there anything you'd like reviewers to focus on?
Should this be in the recommended set? I could be persuaded either way.