0.60.0 • Published 4 years ago
eslint-plugin-chetwoodfinancial v0.60.0
eslint-plugin-chetwoodfinancial
Custom Chetwood Financial ESLint rules
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-chetwoodfinancial
:
$ npm install eslint-plugin-chetwoodfinancial --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-chetwoodfinancial
globally.
Usage
Add chetwoodfinancial
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"chetwoodfinancial"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"chetwoodfinancial/rule-name": 2
}
}
Alternatively, add the following to the extends
array of your configuration to enable recommended rules:
{
"extends": [
"plugin:chetwoodfinancial/recommended"
]
}
Supported Rules
- chetwoodfinancial/use-currency-react-component: Enforces use of the
<Currency>
component for formatting monetary values