Extending .jshintrc configurations

Extending .jshintrc configurations

Since version 2.5.1 of jshint it is possible to extend your own .jshintrc configuration from another .jshintrc config file. This allows you to extend a common configuration and add project specific options (e.g. custom global variable names) to a local configuration file. This way you do not end up with the pain of keeping multiple configurations in sync. It`s fairly trivial to use. In your .jshintrc configuration file add an extends field which points to the configuration you are extending from:

{
  "extends": "config/cs-standard.json",
  "globals": {
    "$": true,
    "Modernizr": true
  }
}


This will instruct jshint to load the settings in config/cs-standard.json first and overwrite them with the settings defined in the local file.


Eintrag von Stephan Hochdörfer am 09.03.2015

Tags: Javascript, jshint

Diese Webseite verwendet Cookies, um die Bedienfreundlichkeit zu erhöhen. Mit der Nutzung unserer Webseite wird das Einverständnis erklärt, dass wir Cookies verwenden. Weitere Informationen.