Skip to content

jiangfengming/eslint-plugin-ext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-plugin-ext

eslint extended rules

Install

npm i eslint-plugin-ext -D

Edit .eslintrc.json:

{
  "plugins": [
    "ext"
  ],

  "rules": {
    "ext/lines-between-object-properties": ["error", "always", { "exceptBetweenSingleLines": true }]
  }
}

Rules

lines-between-object-properties

require or disallow an empty line between object properties.

Modified from lines-between-class-members.

It has same options as lines-between-class-members, and one extra option exceptBetweenSingleLines.

/* eslint ext/lines-between-object-properties: ["error", "always", { "exceptBetweenSingleLines": true }] */

// bad
const foo = {
  a: 1,
  b: 2,
  c() {
  },
  d() {
  }
}

// good
const foo = {
  a: 1,
  b: 2,

  c() {
  },

  d() {
  }
}

License

MIT

About

eslint extended rules

Resources

License

Stars

Watchers

Forks

Packages

No packages published