Skip to content

Instantly share code, notes, and snippets.

@abiduzz420
Created February 9, 2018 15:47
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 abiduzz420/75d6f8b8508eb3d9fed8137c2ccefc20 to your computer and use it in GitHub Desktop.
Save abiduzz420/75d6f8b8508eb3d9fed8137c2ccefc20 to your computer and use it in GitHub Desktop.

Options

This rule has an object option:

  • "beforeColon": false (default) | true
    • false: disallows spaces between the key and the colon in object literals.
    • true: requires at least one space between the key and the colon in object literals.
  • "afterColon": true (default) | false
    • true: requires at least one space between the colon and the value in object literals.
    • false: disallows spaces between the colon and the value in object literals.
  • "mode": "strict" (default) | "miniumum"
    • "strict": enforces exactly one space before or after colons in object literals.
    • "minimum": enforces one or more spaces before or after colons in object literals.
  • "align": "value" | "colon"
    • "value": enforces horizontal alignment of values in object literals.
    • "colon" enforces horizontal alignment of both colons and values in object literals.
  • "align" with an object value allows for fine-grained spacing when values are being aligned in object literals.
  • "singleLine" specifies a spacing style for single-line object literals.
  • "multiLine" specifies a spacing style for multi-line object literals.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment