@fuelrats/eslint-plugin
Companion rules for @fuelrats/eslint-config
Installation
We'll assume you already have ESLint installed. If not, go get started!
You should also setup babel as most of these rules only work with @babel/eslint-parser
. If you haven't, go here.
If you are using @fuelrats/eslint-config
, all of this setup should be done already.
Now, lets install the plugin
$ npm install --save-dev @fuelrats/eslint-plugin
# or
$ yarn add --dev @fuelrats/eslint-plugin
And thats it! See Usage below on how to activate this plugin.
Usage
@fuelrats/eslint-config
With There is an optional plugin ruleset within the config package. Add it to your extends
array to activate it:
{
"extends": [
"@fuelrats/eslint-config",
"@fuelrats/eslint-config/plugins/fuelrats"
]
}
@fuelrats/eslint-config
Without Add @fuelrats
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"@fuelrats"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"@fuelrats/no-mixed-access-class-members": "error"
}
}
Rules
✅ = Recommended rule
🔧 = Auto-fixable with "--fix"
💭 = provides suggestions to fix the issue
-
@fuelrats/no-mixed-access-class-members
: Disallow public class members to share names with private members (✅ |💭 )