项目作者: editorconfig

项目描述 :
高级语言:
项目地址: git://github.com/editorconfig/editorconfig-defaults.git
创建时间: 2017-11-13T13:12:51Z
项目社区:https://github.com/editorconfig/editorconfig-defaults

开源协议:

下载


EditorConfig Defaults

Description of the file format

  1. {
  2. "file_format": "1.0",
  3. "version":"0.1.0",
  4. "matches": {
  5. "<<matcher>>": {
  6. "description": "<<description>>",
  7. "comment": "<<comment>>",
  8. "flavors": {
  9. "<<flavor>>": {
  10. "description": "<<description>>",
  11. "comment": "<<comment>>",
  12. "reference": "<<reference>>",
  13. "editorconfig": {
  14. "<<setting>>": "<<value>>"
  15. }
  16. }
  17. }
  18. }
  19. }
  20. }

Where

  • matcher stands for the default files-glob the section defines; the format
    should allow to use it to filter the defaults based on a list of files.
    This is what goes between [ and ] in the editorconfig-file.
  • flavors stands for the given flavor name; it should be used to let the
    user choose the preferred style; the using tool might omit showing it if
    there is only one flavor (f.e. common or convention) for the section.
  • setting and value are the editorconfig-settings for that flavor;
    they should be used to populate the editorconfig-file.
    value can be a string, boolean or int value.
  • description contains the plain-text description of that flavor;
    it should be used as an introductory description of the flavor.
  • reference is the reference to the source of the flavor; it should a URL
    that leads to a authoritative description of the flavor.
  • comment can be placed within a <<matcher>> and <<flavor>> and is
    an optional string.

Linting

To perform all the checks that are available:

  1. npm install
  2. npm run lint

To validate the JSON without node, there are several sites available like
https://www.jsonschemavalidator.net/ and https://jsonschemalint.com/