google / tern-closure

A Tern plugin adding Closure support.
Apache License 2.0
33 stars 18 forks source link

Flatten .tern-project options structure? #8

Closed jgiles closed 10 years ago

jgiles commented 10 years ago

Currently, finder options have their own field:

{
  "plugins": {
    "doc_comment": false,
    "closure": {
      "finder": {
        "name": "grep",
        "options": {
          "dirs": [
            "relevant/project/subdir",
            "/absolute/path/to/library"
          ]
        }
      }
    }
  }
}

It's a minor issue, but this adds extra depth to the options JSON and makes it more difficult for humans to edit.

It might be easier if the finder property was an object with all the finder options, like this:

{
  "plugins": {
    "doc_comment": false,
    "closure": {
      "finder": {
        "name": "grep",
        "dirs": [
          "relevant/project/subdir",
          "/absolute/path/to/library"
        ]
      }
    }
  }
}

A few 'options' would always be present, like name and possibly debug (#6).