eslint-plugin-lodash
eslint-plugin-lodash copied to clipboard
`path-style` rule has bug
my code:
const obj = { a: { b: 1 }};
const a = 'a';
const b = 'b';
_.has(obj, [a, b])
I applied eslint with --fix option. path-style option is string.
That result is following.
expected:
_.has(obj, `${a}.${b}`)
actually:
_.has(obj, `${a}${b}`)
packages
- eslint: 7.4.0
- eslint-plugin-lodash: 7.1.0
I tried several case.
a is variable. b is string.
_.has(obj, [a, 'b']);
autofix result is
_.has(obj, `${a}.b`);
a is string. b is variable.
_.has(obj, ['a', b]);
autofix result is
_.has(obj, `a${b}`);