mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
97 lines
No EOL
2.9 KiB
JSON
97 lines
No EOL
2.9 KiB
JSON
/*
|
|
Options files live in your home directory or project repository, and can be
|
|
written in JSON or YAML. They can be used not just by JSLintMate, but also by
|
|
teammates' lint tools in other editors, continuous integration systems,
|
|
automated testing systems, and more. This is great for helping your team use
|
|
the same coding standards everywhere.
|
|
|
|
To use this file, save a copy as `~/.jslintrc`. JSLintMate reads JSLint
|
|
options from this path by default, and detects whether it contains JSON or
|
|
YAML. If you want to change this path:
|
|
|
|
1. Save a copy of this file where you'd like it. For example:
|
|
|
|
* If you want to keep a personal set of options, save it outside
|
|
of your project's directory, e.g., `~/Documents/jslint.json`.
|
|
* If you want to share an options file with project collaborators,
|
|
save it in your project's directory, e.g., `config/jslint.json`.
|
|
|
|
2. In TextMate's "Bundles" menu, select "Bundle Editor" >
|
|
"Show Bundle Editor" > "JavaScript JSLintMate" > "Options Files".
|
|
|
|
3. Change the value for `TM_JSLINTMATE_JSLINT_OPTIONS_FILE` to the path
|
|
for your options file.
|
|
|
|
If your options file is within your project, the value should start
|
|
with the variable `$TM_PROJECT_DIRECTORY`, e.g.,
|
|
`$TM_PROJECT_DIRECTORY/config/jslint.json`.
|
|
|
|
4. Close the "Bundle Editor" window.
|
|
|
|
Tweak the options in your new options file, and you're done!
|
|
|
|
NOTE: Not all JSON parsers tolerate comments. If you use this options file with
|
|
tools other than JSLintMate, you might need to remove these comments.
|
|
|
|
More info:
|
|
- JSLint options: http://www.jslint.com/lint.html#options
|
|
- JSLintMate: http://rondevera.github.com/jslintmate/
|
|
*/
|
|
|
|
|
|
{
|
|
/*** Globals ***/
|
|
// To ignore any custom global variables, enable the `predef` option and list
|
|
// your variables within it.
|
|
/*
|
|
"predef": [
|
|
"NEWSBLUR",
|
|
"$"
|
|
],
|
|
*/
|
|
|
|
/*** Enforcing options ***/
|
|
// Set these to `true` to enforce, or `false` to relax.
|
|
"adsafe": false,
|
|
"safe": false,
|
|
|
|
/*** Relaxing options ***/
|
|
// Set these to `true` to relax, or `false` to enforce.
|
|
"bitwise": false,
|
|
"cap": false,
|
|
"confusion": true,
|
|
"continue": true,
|
|
"css": true,
|
|
"debug": false,
|
|
"eqeq": false,
|
|
"es5": true,
|
|
"evil": false,
|
|
"forin": false,
|
|
"fragment": true,
|
|
"newcap": false,
|
|
"nomen": true,
|
|
"on": false,
|
|
"plusplus": true,
|
|
"regexp": true,
|
|
"sloppy": true,
|
|
"sub": false,
|
|
"undef": false,
|
|
"unparam": false,
|
|
"vars": true,
|
|
"white": true,
|
|
|
|
/*** Environments ***/
|
|
// Set each environment that you're using to `true`.
|
|
"browser": true,
|
|
"devel": false,
|
|
"node": false,
|
|
"rhino": false,
|
|
"widget": false,
|
|
"windows": false,
|
|
|
|
/*** Miscellaneous ***/
|
|
"indent": 4,
|
|
"maxerr": 50,
|
|
// "maxlen": 80,
|
|
"passfail": false
|
|
} |