Disallow generic declarations/assignments
You'll first need to install ESLint:
Yarn
$ yarn add eslint --dev
NPM
$ npm install eslint --save-dev
Next, install eslint-plugin-no-generic-identifier:
Yarn
$ yarn add eslint-plugin-no-generic-identifier --dev
NPM
$ npm install eslint-plugin-no-generic-identifier --save-dev
Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-no-generic-identifier globally.
Add no-generic-identifier to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"no-generic-identifier"
]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"no-generic-identifier/presentation": 2
}
}Bad
const Presentation = () => {}Good
const WhatActuallyThisMethodDoes = () => {}