Closed gdh1995 closed 4 years ago
I think this might have been fixed with #114, which made it into version 3.1.1, that is in this repo but not published to npm. my bad!
version 3.1.1 should now be published on npm: https://www.npmjs.com/package/eslint-plugin-no-unsanitized
Let me know if it doesn't fix it and I'll be happy to look into your issue again.
Em, when will https://addons.mozilla.org/ update its node modules? I just took a new try but this issue is still there (same line number and column number).
Test file: vimium_c-1.83.1-firefox-3d3a232.zip
~@mostlygeek~ This issue still exists on https://addons.mozilla.org/ when I uploaded a new version of extensions today.
@gdh1995 I think you may have pinged the wrong person.
yeah, that's an issue with the code that is consuming this rule (https://github.com/mozilla/addons-linter). paging @rpl @EnTeQuAk
@mozfreddyb I just double-checked this locally, using an addons-linter build that is already using eslint-plugin-no-unsanitized version 3.1.1 (and so it is already including #114) but the linting errors are still being triggered.
It looks that we may have to special case this scenario in the plugin itself, and then update the addons-linter to use an updated version of eslint-plugin-no-unsanitized.
I took a look into it and it seems that the reason for the error is because of how the rule is handling a "CallExpression that has as callee an AssignmentExpression with a MemberExpression on the right", e.g. (e = this.n[n.i])(i, r)
, I just opened #127 with some changes I've been trying locally to handling this scenario (the PR also adds a couple of test cases, and I verified locally that the addons-linter linting error isn't trigger anymore in a build that includes #127).
I just filed mozilla/addons-linter#3202 to track this issue also on the addons-linter repo.
I'm using
terser
(https://github.com/terser/terser) to minify JS code of my own files and 3rd-party libraries, but today when I uploaded a new version of web-extension, the auto tests reported:But the code at that place is just:
I can not get what's wrong with this code part. Maybe this is a bug of this eslint plugin.
This is the zip file with such an error: vimium_c-1.83.0-firefox-b419664.zip . It's from https://github.com/gdh1995/vimium-c/commit/b4196642e6a17804eda4538d8a98e1f9dca7c94d and the building script is
npm run firefox
.