eslint-plugin-class-property

enforces semicolon after clas properties

please use eslint-plugin-babel and babel/semi
Last updated 9 years ago by marudor .
MIT · Original npm · Tarball · package.json
$ npm install eslint-plugin-class-property 
SYNC missed versions from official npm registry.

eslint-plugin-class-property

DEPRECATED

Please use babel-plugin-eslint with the babel/semi rule!

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-class-property:

$ npm install eslint-plugin-class-property --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-class-property globally.

Usage

Add class-property to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "class-property"
    ]
}

Supported Rules

class-property/class-property-semicolon

This rule enforces consistent use of semicolons for class properties.

Options

This rule has a single string optio:

  • "always" (default) requires semicolons at the end of a class property
  • "never" disallows semicolons as the end of a class property

always

Examples of incorrect code for this rule with the default "always" option:

/*eslint class-property/class-property-semicolon: ["error", "always"]*/

class MyClass {
    classProperty = 'foo'
}

Examples of correct code for this rule with the default "always" option:

/*eslint class-property/class-property-semicolon: ["error", "always"]*/

class MyClass {
    classProperty = 'foo';
}

never

Examples of incorrect code for this rule with the "never" option:

/*eslint class-property/class-property-semicolon: ["error", "never"]*/

class MyClass {
    classProperty = 'foo';
}

Examples of correct code for this rule with the "never" option:

/*eslint class-property/class-property-semicolon: ["error", "never"]*/

class MyClass {
    classProperty = 'foo'
}

Current Tags

  • 1.1.0                                ...           latest (7 years ago)

11 Versions

  • 1.1.0 [deprecated]           ...           7 years ago
  • 1.0.6 [deprecated]           ...           8 years ago
  • 1.0.5 [deprecated]           ...           8 years ago
  • 1.0.4 [deprecated]           ...           8 years ago
  • 1.0.3 [deprecated]           ...           8 years ago
  • 1.0.2 [deprecated]           ...           8 years ago
  • 1.0.1 [deprecated]           ...           8 years ago
  • 1.0.0 [deprecated]           ...           8 years ago
  • 0.0.3 [deprecated]           ...           9 years ago
  • 0.0.2 [deprecated]           ...           9 years ago
  • 0.0.1 [deprecated]           ...           9 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (3)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE