1.0.3 • Published 9 months ago

eslint-plugin-eslint-wrap-params v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

/##### ESLINT Custom Rule to wrap paramters in arrow functions with parentheses and autofix it #######/

  • This is to specifically handle instances where you try to remove unused variables references in a single line without wrapping your arguments in parenthses.

  • Sample below:

  • Fixed a critical bug witht the autofix mapping over the Node Declarations

fn = e => { }

  • transforms to

fn => {}

  • when used with no-unused-vars

  • we wrap the function arguments to prevent this issue

npx eslint yourscript.js --fix

fn = (e) => {}