eslint-plugin-arguments
eslint plugin to disallow calling method with inline literals as arguments
Supported Rules
no-literal-arguments
Methods array: array with the method names that you want to check.
When this rule is defined:
; \\ OK ; \\ OK ; \\ OK; \\OKbar; \\ OK ; \\ BAD ; \\ BAD ; \\ BADbar; \\ BAD
Common Usage: you need to block somthing like
props.getProp('id')
in order to use onlyprops.getProp(constants.ID)
Installation
npm i -D eslint eslint-plugin-arguments
Note: If you installed
eslint
globally (using the-g
flag) then you must also installeslint-plugin-arguments
globally.
Usage
Add arguments
to the plugins section of your .eslintrc.json
configuration file. (You can omit the eslint-plugin-
prefix):