eslint-plugin-jsxspacing

0.1.0 • Public • Published

eslint-plugin-jsxspacing

An eslint rule to line jsx things up vertically, so they look prettier to people who like that sort of thing ;p E.g. unreformed C++ programmers.

This plugin aims to implement a eslint rule like object-spacing, but for JSX properties.

It is currently a proof of concept that relies on the code already being sensibly formatted, e.g. by running prettier-eslint

Installation

This module is distributed via npm which is bundled with node and should be installed as one of your project's devDependencies.

Install Prettier-ESLint and this plugin:

npm install --save-dev prettier-eslint eslint-plugin-jsxspacing

## Configuration

This plugin must be added to the plugins section in the .eslintrc:

{
  "plugins": [
    "jsxspacing"
  ]
}

Use rules

This plugin contains one rule only, the jsx-prop-columns rule:

{
    "rules": {
        "jsxspacing/jsx-prop-columns": "error"
    }
}
 

Available rules

Package Sidebar

Install

npm i eslint-plugin-jsxspacing

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

14.6 kB

Total Files

8

Last publish

Collaborators

  • alexbird