Remove Property is not working as expected.
@aeschli đang làm issue này rồi.
Từ ngày 4/5/2018.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 764
- Fork
- 68
- Merge trung bình
- 3 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/node-jsonc-parser
-
modify(): trailing inline comment is re-attached to the newly inserted propertyCó thể đã có người làm @rksharma-owg đã nhận 23 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
microsoft/node-jsonc-parser#125 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
microsoft/node-jsonc-parser#105 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
microsoft/node-jsonc-parser#103 · 2 bình luận · 8 reaction ·
-
Provide usage examplesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
microsoft/node-jsonc-parser#97 · 3 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoft/node-jsonc-parser#95 · 1 reaction ·
Tất cả issue của microsoft/node-jsonc-parser
Issue tương tự
-
fix(data-lake): wizard source step still previews the local slug, not the server-disambiguated oneĐang mởdata-lake
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue priority: low size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Empty label or headline exports the editor hint ("LABEL" / "Headline goes here") into the PNGĐang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Spray wall wizard: Done button on the hold review step sits under the navigation header (iOS)Đang mởbug ios mobile priority:P1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
streamplace/streamplace#1351 ·
Maintainer thường phản hồi trong vòng 2 ngày