@n7e/eslint-plugin-spacing-rules

0.1.0 • Public • Published

Spacing Rules

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": [
        "@n7e/spacing-rules"
    ],
    "rules": {
        "@n7e/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 as well as exports.

The following line is valid with the following configuration:

const { one, two, three } = {one: 1, two: 2, three: 3};
{
    "plugins": [
        "@n7e/spacing-rules"
    ],
    "rules": {
        "@n7e/spacing-rules/object-curly-spacing": [
            "error",
            "never",
            {
                "destructuringAssignments": true
            }
        ]
    }
}

And the following line is valid with the following configuration:

export { one, two, three };
{
    "plugins": [
        "@n7e/spacing-rules"
    ],
    "rules": {
        "@n7e/spacing-rules/object-curly-spacing": [
            "error",
            "never",
            {
                "exports": true
            }
        ]
    }
}

Package Sidebar

Install

npm i @n7e/eslint-plugin-spacing-rules

Weekly Downloads

9

Version

0.1.0

License

MIT

Unpacked Size

17.7 kB

Total Files

15

Last publish

Collaborators

  • martin-n7e