eslint-plugin-proposal
v2.3.3
Published
some rules for ECMAScript proposal. eg: class property.
Downloads
2,403
Maintainers
Readme
eslint-plugin-proposal
some rules for ECMAScript proposal. eg: class property.
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-proposal
:
$ npm install eslint-plugin-proposal --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-proposal
globally.
Usage
Add proposal
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"proposal"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"proposal/class-property-space-infix-ops": "error"
}
}
List of supported rules
- proposal/class-property-space-infix-ops require or disallow spacing between operator '=' in class property.
- proposal/class-property-semi require or disallow semicolons instead of ASI in class property.
- proposal/class-property-no-extra-semi disallow unnecessary semicolons in class property.
- proposal/class-property-no-semi-spacing disallow spacing before semicolons in class property.
- proposal/class-property-no-dupe-property disallow duplicate class property.
- proposal/class-property-no-initialized disallow uninitialized class property.
- proposal/no-dynamic-import disallow use dynamic import syntax.
Shareable configurations
Recommended
This plugin exports a recommended configuration.
To enable this configuration use the extends property in your .eslintrc config file:
{
"extends": [
"plugin:proposal/recommended"
]
}
The rules enabled in this configuration are: