0.0.3 • Published 5 years ago
eslint-plugin-abcsize v0.0.3
eslint-plugin-abcsize
Calculate the Assignment/Branch/Condition Size Metric
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devNext, install eslint-plugin-abcsize:
$ npm install eslint-plugin-abcsize --save-devUsage
Add abcsize to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"abcsize"
]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"abcsize/rule-name": 2
}
}You can also extend the recommended configuration which will raise errors when the ABC Size of a function exceeds 15.
{
"extends": ["plugin:abcsize/recommended"]
}Supported Rules
abcsize
Validate against a maximum ABC size.