azeemba / eslint-plugin-json

Lint your JSON files
MIT License
209 stars 29 forks source link

`json/*` rules should be avoided where possible #37

Open edg2s opened 4 years ago

edg2s commented 4 years ago

For example in the definition of the recommended ruleset, which most users will use, it would be better to just list out all the rules. When the * alias is used, failures do not list which rule triggered the error:

Using *

invalid.json
  2:3   error  Duplicate object key  json/*
  3:3   error  Comment not allowed   json/*

Using individual rules

invalid.json
  2:3   error  Duplicate object key  json/duplicate-key
  3:3   error  Comment not allowed   json/trailing-comma
AdrieanKhisbe commented 4 years ago

Hello @edg2s,

I'm going to check, If I recall well, it's supposed to be the case, so we might have a bug/regression

(feel free to ping me if no answers from me in the coming days)

AdrieanKhisbe commented 4 years ago

Hey @edg2s, not really a bug, it was made this way.

But this could be improved indeed, I have some idea how. Stay tuned