Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save captainkovalsky/84a4f4d42501e2f6ba6bd4fb2ddd07f1 to your computer and use it in GitHub Desktop.
Save captainkovalsky/84a4f4d42501e2f6ba6bd4fb2ddd07f1 to your computer and use it in GitHub Desktop.
{
// autoformat on save
"autoformat": true,
// array of extensions for autoformat
"extensions": ["js", "sublime-settings", "jsx"],
// options for jsfmt
"options": {
"preset": "jquery",
"indent": {
"value": " "
},
// plugins included
"plugins": [
"esformatter-jsx"
// "esformatter-quotes",
// "esformatter-semicolons",
// "esformatter-braces",
// "esformatter-dot-notation"
],
"jsx": {
"formatJSX": true, //Duh! that's the default
"attrsOnSameLineAsTag": false, // move each attribute to its own line
"maxAttrsOnTag": 3, // if lower or equal than 3 attributes, they will be kept on a single line
"firstAttributeOnSameLine": true, // keep the first attribute in the same line as the tag
"formatJSXExpressions": true, // default true, if false jsxExpressions won't be recursively formatted
"JSXExpressionsSingleLine": true, // default true, if false the JSXExpressions might span several lines
"alignWithFirstAttribute": true, // do not align attributes with the first tag
"spaceInJSXExpressionContainers": " ", // default to one space. Make it empty if you don't like spaces between JSXExpressionContainers
"removeSpaceBeforeClosingJSX": false, // default false. if true <React.Something /> => <React.Something/>
"htmlOptions": {
// put here the options for js-beautify.html
}
}
},
"options-JSON": {
"plugins": [
"esformatter-quotes"
],
"quotes": {
"type": "double"
}
},
"node-path": "node",
"alert-errors": true,
"ignore-selection": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment