eslint-plugin-destructuring
eslint-plugin-destructuring copied to clipboard
docs: in-params: changed not valid assignment to arrow function
This code is not valid:
const t2 = (b, {a}) = a;
Sometimes because of a typo such valid code can be written as well:
const createRegExp = (a) = RegExp(a, 'g');
You can handle such cases in js and readme files using putout super linter with help of @putout/plugin-convert-assignment-to-arrow-function.
It will fix it to:
const createRegExp = (a) => RegExp(a, 'g');