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.

Conformance check fails to apply on destructuring assignment

See original GitHub issue

The conformance config looks as following:

requirement: {
  type: BANNED_PROPERTY
  value: 'Document.prototype.head'
}

This check catches this code:

const head = document.head;

But fails to catch:

const {head} = document;

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dvoytenkocommented, Nov 18, 2019

To mention, the same issue is destructuring in arguments. E.g. the compiler fails to catch the use of a banner property in this case:

/**
 * @param {!Document} doc
 */
function x({head}) {
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

getting error when I use destructuring assignment to simplify ...
Possible solutions​​ The solution being to add removePlayer in the destructured parameters.
Read more >
Destructuring JavaScript Arrays Object(ively) - codeburst
This syntax makes it possible to break down complex JavaScript values like objects into simpler parts that can be assigned to local variables....
Read more >
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 >
How to check if Node.js supports ES6 language feature
What about string templates or destructuring assignment? ... the ES conformance test tells us that much of #811 tests are skipped or failing....
Read more >
spec Guide - Clojure
If you don't want to use the conformed value or check for ... :acct/email) ;; spec: :acct/person ;; Fails attribute conformance (s/explain :acct/person ......
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