Skip to content

Files

Latest commit

 

History

History
31 lines (20 loc) · 649 Bytes

colon_assignment_spacing.md

File metadata and controls

31 lines (20 loc) · 649 Bytes

Pattern: Malformed whitespace around :

Issue: -

Description

This rule checks to see that there is spacing before and after the colon in a colon assignment (i.e., classes, objects). The spacing amount is specified by spacing.left and spacing.right, respectively. A zero value means no spacing required.

Examples

#
# If spacing.left and spacing.right is 1
#


# Doesn't throw an error
object = {spacing : true}
class Dog
  canBark : true

  
# Throws an error
object = {spacing: true}
class Cat
  canBark: false

Further Reading