npm install eslint-plugin-financial --save-dev- no-float-calculation - Disallow floating point calculation.
- no-division - Disallow division.
Configure it in .eslintrc:
{
"extends": [
"plugin:financial/recommended"
]
}All the recommended rules will throw errors. If you just want to throw warning, you can configure it as follows:
{
"plugins": [
"financial"
],
"rules": {
"financial/no-float-calculation": "warn",
"financial/no-division": "warn"
}
}You'll need install @typescript-eslint/parser and @typescript-eslint/eslint-plugin first.
npm install @typescript-eslint/parser @typescript-eslint/eslint-plugin -DConfigure it in .eslintrc:
{
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:financial/recommended"
]
}- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
eslint-plugin-financial © ULIVZ, Released under the MIT License.