azeemba / eslint-plugin-json

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

Doesn't handle non-standard JSON file #5

Open nikolay opened 8 years ago

nikolay commented 8 years ago

Examples: .babelrc, .eslintrc, .nsprc, .jsinspectrc, and so on.

azeemba commented 8 years ago

I certainly don't want to hardcode all the different config files that we can come up with. The best solution is probably to make this configurable somehow. I am not sure how this can be done though.

I am open to hear viable solutions.

dguo commented 8 years ago

You can use rule options to make this configurable. I also agree that that's probably the best approach. .eslintrc can be JSON or YAML (though that documentation also says it's deprecated to not give it a .json or .yaml extension).

azeemba commented 5 years ago

The plugin can't dictate what files are linted so the above solution doesn't work. However, there seems to be some new discussion in https://github.com/eslint/rfcs/pull/3 which will make this a user setting