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.

no-extend-native false positive

See original GitHub issue

Applying standard@10.0.1 to the npm package migrate and it has a constructor called Set. Obviously it might not be the best name since it is a native constructor now, but eslint should probably recognize that it is not actually modifying the native.

Projects/node-migrate/lib/set.js:52:1: Set prototype is read only, properties should not be added.
function Set (path) {}
Set.prototype.addMigration = function (title, up, down) {}

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
platinumazurecommented, Apr 14, 2017

I’ve only had a chance to skim the rule source, but I think I agree this is a bug. The rule is looking at built-in global names without using scope analysis to determine if a global scope reference is even being modified (which it clearly isn’t in the example case).

0reactions
not-an-aardvarkcommented, May 1, 2017

Thanks @wesleytodd. I’ll reopen this for tracking purposes just in case the PR ends up getting delayed/blocked for some reason (which I don’t think will happen, but it’s probably worth keeping the issue open anyway).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Array prototype is read only, properties should not be added ...
js Line 8: Array prototype is read only, properties should not be added no-extend-native Search for the keywords to learn more about each...
Read more >
no-extend-native - 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 >
Enforce Return After Callback (callback-return) - ESLint - Breword ...
false positives when this rule reports incorrect code, but the program calls the callback only one time (which is correct behavior). Passing the...
Read more >
LeakSurvivor: Towards Safely Tolerating Memory Leaks for ...
LeakSurvivor is safe because it swaps in the swapped-out objects to the memory upon future accesses to them if they are falsely identified...
Read more >
False contrast errors on comment form lables? - WordPress.org
It is possible that is a false positive. With backend testing (rather than testing on the front end of a webpage like WAVE...
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