Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path-style rule has bug #254

Open
hikyaru-suzuki opened this issue Jul 9, 2020 · 0 comments
Open

path-style rule has bug #254

hikyaru-suzuki opened this issue Jul 9, 2020 · 0 comments

Comments

@hikyaru-suzuki
Copy link

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}`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant