Remove Property is not working as expected.
@aeschli is already working on this.
Since May 4, 2018.
Assessment
This issue has not been assessed yet.
Description
It's such a great tool to handle JSON (with comments). Thanks!
But I find that it can not pass the following test:
test('remove property', () => {
let content = '{\n "x": "y",\n // This is a comment\n "test": "1"\n}';
let edits = removeProperty(content, ['x'], formatterOptions);
assertEdit(content, edits, '{\n // This is a comment\n "test": "1"\n}');
});
I've added a comment right after the property x. What I want is to remove the property but keep the comment. But jsonc-parser removes the comment too, which I think this maybe a bug or something?
P.S. You can test this in edit.test.ts.
- Dominant language
- TypeScript
- Stars
- 759
- Forks
- 66
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 7
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/node-jsonc-parser
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
microsoft/node-jsonc-parser#125 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
microsoft/node-jsonc-parser#105 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
microsoft/node-jsonc-parser#103 · 2 comments · 8 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
microsoft/node-jsonc-parser#97 · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/node-jsonc-parser#95 · 1 reaction ·
All issues in microsoft/node-jsonc-parser
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·