Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-class-property

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-class-property

Enforces semicolon after class properties

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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'
}

Keywords

FAQs

Package last updated on 31 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc