Detect hard coded strings.
You'll first need to install ESLint:
$ npm i eslint --save-dev
or if you use yarn
$ yarn add eslint -D
Next, install eslint-plugin-detect-hard-code
:
$ npm install eslint-plugin-detect-hard-code --save-dev
or
$ yarn add eslint-plugin-detect-hard-code -D
Add detect-hard-code
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["detect-hard-code"],
"rules": {
"detect-hard-code/detect-hard-code": "error"
}
}