Perhaps trailing commas should be enabled by default
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- devtools
Hướng nghiên cứu
Bắt đầu với giá trị mặc định của tùy chọn parser trong src/impl/parser.ts tại vị trí được liên kết, sau đó kiểm tra cách dấu phẩy ở cuối được bao phủ ở những nơi khác trong repository. Xác định xem việc bật chúng theo mặc định có giữ nguyên hành vi opt-out hay không, rồi cập nhật các bài kiểm thử parser liên quan để xác nhận cả hai giá trị mặc định.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
For any use of JSONC that is user-facing in VS code, for example in a .jsonc file saved by the user, or even the user settings JSONC file, trailing commas don't trigger an error:
-
User config example:
-
Standalone
.jsoncfile example: -
Only in
.jsonis it shown as an error:
Visual Studio Code's own uses of JSONC seem for uses where trailing commas are desired, like the user config. An intended strength of the JSONC format seems to be easy user editing and writing. For "strict" uses of automatically generated files where the syntax is meant to stay super correct, there's still JSON as there always was as the more common choice.
Based on this, I would suggest that perhaps trailing commas should be enabled in the parser by default, so that e.g. parsing the VS Code config in JSONC works without manual changes.
I'm sure some will disagree, but the option to turn it off would remain in any case.
(Please note I'm not suggesting to remove the warning in the VS Code UI about trailing commas as discussed here, since I realize other JSONC parsers might still treat this differently.)
- Ngôn ngữ chính
- TypeScript
- Star
- 759
- Fork
- 66
- Merge trung bình
- 5 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 7
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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
-
Độ 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 ·
-
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 · 2 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 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 35/100
Tất cả issue của microsoft/node-jsonc-parser
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
area:tools bug good first issue help wanted priority:P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
TaewoooPark/Motifcode#14 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
newrelic-experimental/preflight#793 · 1 bình luận ·
-
bug 🐞
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
BasedHardware/omi#15320 ·