Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save eugenesvk/c849d44a2deca360e715264334c10fb0 to your computer and use it in GitHub Desktop.
Save eugenesvk/c849d44a2deca360e715264334c10fb0 to your computer and use it in GitHub Desktop.
Sublime Linter User Settings
{
// JSHint Default Configuration File (as on JSHint website)
// See http://jshint.com/docs/ for more details
"maxerr" : 50, // {int} Maximum error before stopping
// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : false, // true: Identifiers must be in camelCase
"curly" : true, // true: Require {} for every new block or scope
"eqeqeq" : true, // true: Require triple equals (===) for comparison
"forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty()
"immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
"indent" : 4, // {int} Number of spaces to use for indentation
"latedef" : false, // true: Require variables/functions to be defined before being used
"newcap" : false, // true: Require capitalization of all constructor functions e.g. `new F()`
"noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee`
"noempty" : true, // true: Prohibit use of empty blocks
"nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment)
"plusplus" : false, // true: Prohibit use of `++` & `--`
"quotmark" : false, // Quotation mark consistency:
// false : do nothing (default)
// true : ensure whatever is used is consistent
// "single" : require single quotes
// "double" : require double quotes
"undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
"unused" : true, // true: Require all defined variables be used
"strict" : true, // true: Requires all functions run in ES5 Strict Mode
"trailing" : false, // true: Prohibit trailing whitespaces
"maxparams" : false, // {int} Max number of formal params allowed per function
"maxdepth" : false, // {int} Max depth of nested blocks (within functions)
"maxstatements" : false, // {int} Max number statements per function
"maxcomplexity" : false, // {int} Max cyclomatic complexity per function
"maxlen" : false, // {int} Max number of characters per line
// Relaxing
"asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
"boss" : false, // true: Tolerate assignments where comparisons would be expected
"debug" : false, // true: Allow debugger statements e.g. browser breakpoints.
"eqnull" : false, // true: Tolerate use of `== null`
"es5" : false, // true: Allow ES5 syntax (ex: getters and setters)
"esnext" : false, // true: Allow ES.next (ES6) syntax (ex: `const`)
"moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features)
// (ex: `for each`, multiple try/catch, function expression…)
"evil" : false, // true: Tolerate use of `eval` and `new Function()`
"expr" : false, // true: Tolerate `ExpressionStatement` as Programs
"funcscope" : false, // true: Tolerate defining variables inside control statements"
"globalstrict" : false, // true: Allow global "use strict" (also enables 'strict')
"iterator" : false, // true: Tolerate using the `__iterator__` property
"lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
"laxbreak" : false, // true: Tolerate possibly unsafe line breakings
"laxcomma" : false, // true: Tolerate comma-first style coding
"loopfunc" : false, // true: Tolerate functions being defined in loops
"multistr" : false, // true: Tolerate multi-line strings
"proto" : false, // true: Tolerate using the `__proto__` property
"scripturl" : false, // true: Tolerate script-targeted URLs
"smarttabs" : false, // true: Tolerate mixed tabs/spaces when used for alignment
"shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
"sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
"supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;`
"validthis" : false, // true: Tolerate using this in a non-constructor function
// Environments
"browser" : true, // Web Browser (window, document, etc)
"couch" : false, // CouchDB
"devel" : true, // Development/debugging (alert, confirm, etc)
"dojo" : false, // Dojo Toolkit
"jquery" : false, // jQuery
"mootools" : false, // MooTools
"node" : false, // Node.js
"nonstandard" : false, // Widely adopted globals (escape, unescape, etc)
"prototypejs" : false, // Prototype and Scriptaculous
"rhino" : false, // Rhino
"worker" : false, // Web Workers
"wsh" : false, // Windows Scripting Host
"yui" : false, // Yahoo User Interface
// Legacy
"nomen" : false, // true: Prohibit dangling `_` in variables
"onevar" : false, // true: Allow only one `var` statement per function
"passfail" : false, // true: Stop on first error
"white" : false, // true: Check against strict whitespace and indentation rules
// Custom Globals
"globals" : {} // additional predefined global variables
}
anon true, if the space may be omitted in anonymous function declarations
bitwise true, if bitwise operators should be allowed
browser true, if the standard browser globals should be predefined
cap true, if upper case HTML should be allowed
continue true, if the continuation statement should be tolerated
css true, if CSS workarounds should be tolerated
debug true, if debugger statements should be allowed
devel true, if logging should be allowed (console, alert, etc.)
eqeq true, if == should be allowed
es5 true, if ES5 syntax should be allowed
evil true, if eval should be allowed
forin true, if for in statements need not filter
fragment true, if HTML fragments should be allowed
indent the indentation factor
maxerr the maximum number of errors to allow
maxlen the maximum length of a source line
newcap true, if constructor names capitalization is ignored
node true, if Node.js globals should be predefined
nomen true, if names may have dangling _
on true, if HTML event handlers should be allowed
passfail true, if the scan should stop on first error
plusplus true, if increment/decrement should be allowed
properties true, if all property names must be declared with /*properties*/
regexp true, if the . should be allowed in regexp literals
rhino true, if the Rhino environment globals should be predefined
undef true, if variables can be declared out of order
unparam true, if unused parameters should be tolerated
sloppy true, if the 'use strict'; pragma is optional
stupid true, if really stupid practices are tolerated
sub true, if all forms of subscript notation are tolerated
todo true, if TODO comments are tolerated
vars true, if multiple var statements per function should be allowed
white true, if sloppy whitespace is tolerated
windows true, if MS Windows-specific globals should be predefined
{
"jshint_options": {
"adsafe": false,
"bitwise": false,
"newcap": true,
"eqeqeq": true,
"immed": true,
"nomen": false,
"onevar": true,
"plusplus": false,
"regexp": false,
"safe": false,
"strict": false,
"undef": true,
"white": true,
"cap": false,
"css": false,
"debug": false,
"es5": false,
"evil": false,
"forin": false,
"fragment": false,
"laxbreak": false,
"on": false,
"sub": false,
"maxlen": 160,
"indent": 4,
"maxerr": 100,
"passfail": false,
"predef": [
"$",
"jQuery",
"console",
"Class",
"Modernizr",
"History",
"RED",
"red",
"FB",
"Scroller"
],
"browser": true,
"rhino": false,
"windows": false,
"widget": false,
"devel": false,
"loopfunc": true,
"asi": false,
"boss": false,
"couch": true,
"curly": true,
"noarg": true,
"node": true,
"noempty": true,
"nonew": true
},
"jslint_options": {
"anon": true,
"browser": true,
"cap": true,
"continue": true,
"css": true,
"debug": true,
"devel": true,
"eqeq": true,
"es5": true,
"evil": true,
"forin": true,
"fragment": true,
"indent": 4,
"maxerr": 100,
"maxlen": 200,
"newcap": true,
"node": true,
"nomen": true,
"on": true,
"passfail": true,
"predef": [
"L",
"$",
"_"
],
"properties": true,
"regexp": true,
"rhino": true,
"undef": true,
"unparam": true,
"sloppy": true,
"stupid": true,
"sub": true,
"todo": true,
"vars": true,
"white": true,
"windows": true
}
}
/*
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.
*/
"sublimelinter": true,
/*
Maps linters to executables for non-built in linters. If the executable
is not in the default system path, or on posix systems in /usr/local/bin
or ~/bin, then you must specify the full path to the executable.
Linter names should be lowercase.
This is the effective default map; your mappings may override these.
"sublimelinter_executable_map":
{
"perl": "perl",
"php": "php",
"ruby": "ruby"
},
*/
"sublimelinter_executable_map":
{
},
/*
Maps syntax names to linters. This allows variations on a syntax
(for example "Python (Django)") to be linted. The key is
the base filename of the .tmLanguage syntax files, and the value
is the linter name (lowercase) the syntax maps to.
*/
"sublimelinter_syntax_map":
{
"Python Django": "python"
},
// 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": 0,
// If true, lines with errors or warnings will be filled in with the outline color.
"sublimelinter_fill_outlines": false,
// If true, lines with errors or warnings will have a gutter mark.
"sublimelinter_gutter_marks": false,
// 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 "jshint" to use the built in jshint linter.
"javascript_linter": "jshint",
// jshint: options for linting JavaScript. See http://jshint.com/#docs for more info.
// By deault, eval is allowed.
"jshint_options":
{
"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
],
// A list of pep8 error numbers to ignore. By default "line too long" errors are ignored.
// The list of error codes is in this file: https://github.com/jcrocholl/pep8/blob/master/pep8.py.
// Search for "Ennn:", where nnn is a 3-digit number.
"pep8_ignore":
[
"E501"
],
/*
If you use SublimeLinter for pyflakes checks, you can ignore some of the "undefined name xxx"
errors (comes in handy if you work with post-processors, globals/builtins available only at runtime, etc.).
You can control what names will be ignored with the user setting "pyflakes_ignore".
Example:
"pyflakes_ignore":
[
"some_custom_builtin_o_mine",
"A_GLOBAL_CONSTANT"
],
*/
"pyflakes_ignore":
[
],
/*
Ordinarily pyflakes will issue a warning when 'from foo import *' is used,
but it is ignored since the warning is not that helpful. If you want to see this warning,
set this option to false.
*/
"pyflakes_ignore_import_*": true,
// Objective-J: if true, non-ascii characters are flagged as an error.
"sublimelinter_objj_check_ascii": false,
// Set to true to highlight annotations
"sublimelinter_notes": false,
// 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