Skip to content

Instantly share code, notes, and snippets.

@kingsloi
Created May 5, 2016 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kingsloi/af28c29e7a5ea1d0c6efea855edff6f2 to your computer and use it in GitHub Desktop.
Save kingsloi/af28c29e7a5ea1d0c6efea855edff6f2 to your computer and use it in GitHub Desktop.
JsFormat.sublime-settings
{
/*
* ENVIRONMENTS
* =================
*/
"globals": {
"localStorage": false,
"document": false,
"confirm" :false,
"location": false,
"alert":false,
"window": false,
"navigator":false,
"console":false
},
// Define globals exposed by modern browsers.
"browser": true,
// Define globals exposed by jQuery.
"jquery": true,
// Define globals exposed by Node.js.
"node": true,
// Allow ES6.
"esversion": 6,
/*
* ENFORCING OPTIONS
* =================
*/
// Force all variable names to use either camelCase style or UPPER_CASE
// with underscores.
"camelcase": true,
// Prohibit use of == and != in favor of === and !==.
"eqeqeq": true,
// Enforce tab width of 2 spaces.
"indent": 2,
// Prohibit use of a variable before it is defined.
"latedef": true,
// Enforce line length to 100 characters
"maxlen": 100,
// Require capitalized names for constructor functions.
"newcap": true,
// Enforce use of single quotation marks for strings.
"quotmark": "single",
// Enforce placing 'use strict' at the top function scope
"strict": true,
// Prohibit use of explicitly undeclared variables.
"undef": true,
// Warn when variables are defined but never used.
"unused": true,
/*
* RELAXING OPTIONS
* =================
*/
// Suppress warnings about == null comparisons.
"eqnull": true
}
{
// exposed jsbeautifier options
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 4,
"space_in_paren": false,
"jslint_happy": true,
"brace_style": "collapse-preserve-inline",
"keep_array_indentation": false,
"keep_function_indentation": false,
"eval_code": false,
"unescape_strings": false,
"break_chained_methods": false,
"e4x": false,
"wrap_line_length": 0,
// jsformat options
"format_on_save": true,
"format_selection": true,
"jsbeautifyrc_files": true,
"ignore_sublime_settings": true,
"format_on_save_extensions": ["js", "json"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment