Use this rule to control the number of spaces inside braces ({ and }).

Parameters

min-spaces-inside
Defines the minimal number of spaces required inside braces.
max-spaces-inside
Defines the maximal number of spaces allowed inside braces.
min-spaces-inside-empty
Defines the minimal number of spaces required inside empty braces.
max-spaces-inside-empty
Defines the maximal number of spaces allowed inside empty braces.

Examples

With min-spaces-inside = 0 and max-spaces-inside = 0 the following code snippet would PASS:

object: {key1: 4, key2: 8}

the following code snippet would FAIL:

object: { key1: 4, key2: 8 }

With min-spaces-inside = 1 and max-spaces-inside = 3 the following code snippet would PASS:

object: { key1: 4, key2: 8 }

the following code snippet would PASS:

object: { key1: 4, key2: 8   }

the following code snippet would FAIL:

object: {    key1: 4, key2: 8   }

the following code snippet would FAIL:

object: {key1: 4, key2: 8 }

With min-spaces-inside-empty = 0 and max-spaces-inside-empty = 0

the following code snippet would PASS:

object: {}

the following code snippet would FAIL:

object: { }

With min-spaces-inside-empty = 1 and max-spaces-inside-empty = -1

the following code snippet would PASS:

object: {         }

the following code snippet would FAIL:

object: {}