no-extend-native false positive
See original GitHub issueApplying 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:
- Created 6 years ago
- Comments:15 (12 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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).
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).