question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

id-blacklist doesn't warn when renaming properties to blacklisted identifiers in destructuring assignment.

See original GitHub issue

Tell us about your environment

  • ESLint Version: 7.0.0 (upcoming)
  • Node Version: 10.15.3
  • npm Version: 6.4.1

What parser (default, Babel-ESLint, etc.) are you using? default Please show your full configuration:

Configuration
id-blacklist: ["foo", "bar"] // Rule options

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

const {foo: bar} = baz

What did you expect to happen? ESLint should warn that bar is a blacklisted identifier, but not foo as it is a property from the original baz object.

What actually happened? Please include the actual, raw output from ESLint. There is no warning for either identifier.

Context for this: A recent PR bugfix removed the errant warning on properties that were being renamed (foo in the example above). In the course of this it ignores the following blacklisted bar identifier. This is a follow up to https://github.com/eslint/eslint/pull/12792.

Are you willing to submit a pull request to fix this bug? Yes

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
yeonjuancommented, Feb 16, 2020

If there is no one working on, I will try. : )

0reactions
kaicataldocommented, Feb 16, 2020

I don’t think so!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Destructuring assignment - JavaScript - MDN Web Docs
The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from ...
Read more >
Rule id-blacklist - ESLint - Pluggable JavaScript linter | Js中文网
This rule will catch blacklisted identifiers that are: variable declarations; function declarations; object properties. It will not catch blacklisted ...
Read more >
prefer-destructuring - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
Code Issues - Embold Help Center
When a system is expected to behave in a certain way and it fails to meet the result, the issue occurs. Similarly, any...
Read more >
IntelliJ IDEA 2018.3 EAP 183.2635.13 Release Notes
Feature IDEA‑196706 Multithread model for new SE Feature IDEA‑127245 Open all files from favorites list Feature IDEA‑190682 Support multi ip hosts in client‑api RpcUtils Bug IDEA‑113988...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found