Skip to content
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 JSON5 support #15

Merged
merged 2 commits into from
Jul 25, 2024
Merged

feat: Add JSON5 support #15

merged 2 commits into from
Jul 25, 2024

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented Jul 23, 2024

Prerequisites checklist

What is the purpose of this pull request?

Add JSON5 support

What changes did you make? (Give an overview)

  • Upgraded Momoa to the latest version that supports JSON5
  • Updated no-empty-keys and no-duplicate-keys to support JSON5.
  • Added JSON5 tests for both rules.
  • Updated README

Related Issues

Is there anything you'd like reviewers to focus on?

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Updated no-empty-keys

This update seems to be missing from this PR.

// foo.json5
{
    bar: "baz"
}
Oops! Something went wrong! :(

ESLint: 9.7.0

TypeError: Cannot read properties of undefined (reading 'trim')
Occurred while linting C:\projects\json\foo.json5:3
Rule: "json/no-empty-keys"
    at Member (file:///C:/projects/json/src/rules/no-empty-keys.js:24:13)

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mdjermanovic mdjermanovic merged commit ea8dbb5 into main Jul 25, 2024
15 checks passed
@mdjermanovic mdjermanovic deleted the json5 branch July 25, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants