Sublime Forum

How do I use command parameters in a settings file with a project-relative path?

#1

I have some project settings where I would like to use the sublime linter. One of the arguments for the linter is a path that is project-relative. I would like to do something like this in the file:

  "SublimeLinter": {
    "linters": {
      "tslint": {
        "@disable": false,
        "args": [
            "--rules-dir",
            "${project_path}/tslint-rules"  // the rules-dir is always relative to the .sublime-project file
        ],
        "excludes": []
      }
    }
  }

Notice that the --rules-dir points to a directory that is project relative. The above does not work, but is there a way I can get this working without using a fully qualified, absolute path in the settings file?

1 Like