Skip to content

martin-pettersson/eslint-plugin-spacing-rules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spacing Rules

Provides a set of augmented spacing rules.

Rules

array-bracket-spacing

Behaves exactly like array-bracket-spacing but adds an option to invert the rule for destructuring assignments.

The following line is valid with the following configuration:

const [ one, two, three ] = [1, 2, 3];

{
    "plugins": [
        "@martin-pettersson/spacing-rules"
    ],
    "rules": {
        "@martin-pettersson/spacing-rules/array-bracket-spacing": [
            "error",
            "never",
            {
                "destructuringAssignments": true
            }
        ]
    }
}

object-curly-spacing

Behaves exactly like object-curly-spacing but adds an option to invert the rule for destructuring assignments.

The following line is valid with the following configuration:

const { one, two, three } = {one: 1, two: 2, three: 3};

{
    "plugins": [
        "@martin-pettersson/spacing-rules"
    ],
    "rules": {
        "@martin-pettersson/spacing-rules/object-curly-spacing": [
            "error",
            "never",
            {
                "destructuringAssignments": true
            }
        ]
    }
}

About

A set of augmented spacing rules.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published