ESLint rules for DNB Eufemia
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install @eufemia/eslint-plugin
:
$ npm install @eufemia/eslint-plugin --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install @eufemia/eslint-plugin
globally.
Add @eufemia
to the plugins section of your .eslintrc
configuration file. You can omit /eslint-plugin
:
{
"plugins": ["@eufemia"]
}
Then configure the rules you want to use under the rules section:
{
"rules": {
"@eufemia/calc-arguments": [
"error",
{ "calcMethodName": "optionalOtherName" }
]
}
}
The option calcMethodName
defaults to calc
.
- calc-arguments (optional)