Skip to content

Instantly share code, notes, and snippets.

@dohzya
Created August 13, 2013 20:35
Show Gist options
  • Select an option

  • Save dohzya/6225417 to your computer and use it in GitHub Desktop.

Select an option

Save dohzya/6225417 to your computer and use it in GitHub Desktop.
/*
SublimeLinter default settings
*/
{
/*
Sets the mode in which SublimeLinter runs:
true - Linting occurs in the background as you type (the default).
false - Linting only occurs when you initiate it.
"load-save" - Linting occurs only when a file is loaded and saved.
"save-only" - Linting occurs only when a file is saved.
*/
"sublimelinter": true,
/*
Maps language names **as listed at the beginning of the README** (but all lowercase)
to executables for non-built in linters. If the executable is not in the default system path,
or on posix systems is not in /usr/local/bin or ~/bin, then you must specify
the full path to the executable. Note that paths in Windows must use double
backslashes, for example "C:\\Program Files (x86)\\nodejs\\node.exe".
Please note that the map _keys_ do not always match the name of the
executable, but rather the language syntax for the executable to lint.
This is the effective default map; your mappings may override these.
"sublimelinter_executable_map":
{
"perl": "perl",
"php": "php",
"ruby": "ruby"
},
*/
"sublimelinter_executable_map":
{
"ruby": "/Users/evo/.rvm/rubies/ruby-2.0.0-p0/bin/ruby"
},
/*
Maps syntax names to linters. This allows variations on a syntax
(for example "Python (Django)") to be linted. The key is
the name of the syntax **as it appears in the syntax list
at the bottom right of the window**, and the value
is the linter name **as listed in the README** (all lowercase)
that the syntax maps to.
*/
"sublimelinter_syntax_map":
{
"Python Django": "python",
"Ruby on Rails": "ruby",
"C++": "c"
},
// An array of linter names to disable. Names should be lowercase.
"sublimelinter_disable":
[
],
/*
The minimum delay in seconds (fractional seconds are okay) before
a linter is run when the "sublimelinter" setting is true. This allows
you to have background linting active, but defer the actual linting
until you are idle. When this value is greater than the built in linting delay,
errors are erased when the file is modified, since the assumption is
you don't want to see errors while you type.
*/
"sublimelinter_delay": 2,
/*
Selects the way the lines with errors or warnings are marked; "outline" draws
outline boxes around the lines, "fill" fills the lines with the outline color,
and "none" (default) disables all outline styles.
*/
"sublimelinter_mark_style": "outline",
// If true, lines with errors or warnings will have a gutter mark.
"sublimelinter_gutter_marks": false,
/*
Choose the theme for gutter marks; available built-in options are:
"alpha", "bright", "dark", "hard" and "simple"
Anything else will be treated as a path to a set of images.
For instance, setting the value to "../User/my-awesome-theme"
would cause SublimeLinter to look for the images:
"../User/my-awesome-theme-illegal.png",
"../User/my-awesome-theme-violation.png",
"../User/my-awesome-theme-warning.png"
These images should all be approximately 32x32px.
*/
"sublimelinter_gutter_marks_theme": "simple",
// If true, the find next/previous error commands will wrap.
"sublimelinter_wrap_find": true,
// If true, when the file is saved any errors will appear in a popup list
"sublimelinter_popup_errors_on_save": false,
// JavaScript linter: "gjslint" to use the closure javascript linter (if available),
// or either "jshint" or "jslint" to use a built in linter.
"javascript_linter": "jslint",
"jslint_options": {
"ass": false, // Tolerate assignment expressions
// true if assignment should be allowed outside of statement position.
"bitwise": false, // Tolerate bitwise operators
// true if bitwise operators should be allowed. (more)
"browser": true, // Assume a browser
// true if the standard browser globals should be predefined. (more)
"closure": true, // Tolerate Google Closure idioms
// true if Google Closure annotations should be allowed.
"continue": false, // Tolerate continue
// true if the continue statement should be allowed.
"couch": false, // Assume CouchDB
// true if Couch DB globals should be predefined.
"debug": false, // Tolerate debugger statements
// true if debugger statements should be allowed.
// Set this option to false before going into production.
"devel": true, // Assume console, alert, ...
// true if browser globals that are useful in development should be predefined. (more)
"eqeq": true, // Tolerate == and !=
// true if the == and != operators should be tolerated. (more)
"es5": false, // Tolerate ES5 syntax
// true if ES5 syntax should be allowed.
// It is likely that programs using this option will produce syntax errors on ES3 systems.
"evil": false, // Tolerate eval
// true if eval should be allowed. (more)
"forin": false, // Tolerate unfiltered for in
// true if unfiltered for in statements should be allowed. (more)
"indent": 2, // Strict white space indentation
// The number of spaces used for indentation (default is 4).
"maxerr": 50, // Maximum number of errors
// The maximum number of warnings reported. (default is 50)
"maxlen": 120, // Maximum line length
// The maximum number of characters in a line.
"newcap": false, // Tolerate uncapitalized constructors
// true if Initial Caps with constructor functions is optional. (more)
"node": false, // Assume Node.js
// true if Node.js globals should be predefined. (more)
"nomen": true, // Tolerate dangling _ in identifiers
// true if names should not be checked for initial or trailing underbars.
"passfail": false, // Stop on first error
// true if the scan should stop on first error.
"plusplus": true, // Tolerate ++ and --
// true if ++ and -- should be allowed. (more)
"predef": [], // Predefined
// An array of strings, the names of predefined global variables,
// or an object whose keys are global variable names,
// and whose values are booleans that determine if each variable is assignable (also see global).
// predef is used with the option object, but not with the /*jslint*/ directive.
// You can also use the var statement to declare global variables in a script file.
"regexp": true, // Tolerate . and [^...]. in /RegExp/
// true if . and [^...] should be allowed in RegExp literals.
// They match more material than might be expected, allowing attackers to confuse applications.
// These forms should not be used when validating in secure applications.
"rhino": false, // Assume Rhino
// true if the Rhino environment globals should be predefined. (more)
"sloppy": false, // Tolerate missing 'use strict' pragma
// true if the ES5 'use strict'; pragma is not required. Do not use this pragma unless you know what you are doing.
"stupid": false, // Tolerate stupidity
// true if blocking ('...Sync') methods can be used.
"sub": false, // Tolerate inefficient subscripting
// true if subscript notation may be used for expressions better expressed in dot notation.
"todo": true, // Tolerate TODO comments
// true if comments starting with TODO should be allowed.
"unparam": false, // Tolerate unused parameters
// true if warnings should not be given for unused parameters.
"vars": true, // Tolerate many var statements per function
// true if multiple var statement per function should be allowed. (more)
"white": false, // Tolerate messy white space
// true if strict whitespace rules should be ignored.
},
// jshint: options for linting JavaScript. See http://www.jshint.com/docs/#options for more info.
// By deault, eval is allowed.
"jshint_options":
{
// To fix column positions for JSHint errors you may want to add `"indent": 1` to your
// **User** "jshint_options". This issue affects users with tabs for indentation.
// This fix was reverted due to a conflict with using the `"white": true` option.
// "indent": 1,
"evil": true,
"regexdash": true,
"browser": true,
"wsh": true,
"trailing": true,
"sub": true
},
// A list of command line options to send to gjslint. --nobeep is always sent.
"gjslint_options":
[
],
// A list of gjslint error numbers to ignore. The list of error codes is here:
// http://closure-linter.googlecode.com/svn/trunk/closure_linter/errors.py
"gjslint_ignore":
[
110 // line too long
],
// CSSLint options:
// Each rule can have three values: error|warning|true|false
// false => rule is disabled.
// true => alias to 'error'
// All rules are enabled by default.
// Currently the only difference between warnings and errors is in the prefix of the message in the Sublime status bar.
"csslint_options":
{
"adjoining-classes": "warning",
"box-model": true,
"box-sizing": "warning",
"compatible-vendor-prefixes": "warning",
"display-property-grouping": true,
"duplicate-background-images": "warning",
"duplicate-properties": true,
"empty-rules": true,
"errors": true,
"fallback-colors": "warning",
"floats": "warning",
"font-faces": "warning",
"font-sizes": "warning",
"gradients": "warning",
"ids": "warning",
"import": "warning",
"important": "warning",
"known-properties": true,
"outline-none": "warning",
"overqualified-elements": "warning",
"qualified-headings": "warning",
"regex-selectors": "warning",
"rules-count": "warning",
"shorthand": "warning",
"star-property-hack": "warning",
"text-indent": "warning",
"underscore-property-hack": "warning",
"unique-headings": "warning",
"universal-selector": "warning",
"vendor-prefix": true,
"zero-units": "warning"
},
// Set to true to highlight annotations
"sublimelinter_notes": true,
// The set of annotation phrases to highlight
"annotations": ["TODO", "README", "FIXME"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment