mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-05 23:07:31 +09:00
Fix unsafe "instanceof" negations
https://github.com/MoonchildProductions/Pale-Moon/pull/1173
This commit is contained in:
parent
a073130d31
commit
b56d147095
17 changed files with 19 additions and 28 deletions
|
|
@ -838,7 +838,7 @@
|
|||
* implementation.
|
||||
*/
|
||||
File.DirectoryIterator.Entry.toMsg = function toMsg(value) {
|
||||
if (!value instanceof File.DirectoryIterator.Entry) {
|
||||
if (!(value instanceof File.DirectoryIterator.Entry)) {
|
||||
throw new TypeError("parameter of " +
|
||||
"File.DirectoryIterator.Entry.toMsg must be a " +
|
||||
"File.DirectoryIterator.Entry");
|
||||
|
|
@ -905,7 +905,7 @@
|
|||
* is asymmetric and returns an object with a different implementation.
|
||||
*/
|
||||
File.Info.toMsg = function toMsg(stat) {
|
||||
if (!stat instanceof File.Info) {
|
||||
if (!(stat instanceof File.Info)) {
|
||||
throw new TypeError("parameter of File.Info.toMsg must be a File.Info");
|
||||
}
|
||||
let serialized = {};
|
||||
|
|
|
|||
|
|
@ -909,7 +909,7 @@
|
|||
* implementation.
|
||||
*/
|
||||
File.DirectoryIterator.Entry.toMsg = function toMsg(value) {
|
||||
if (!value instanceof File.DirectoryIterator.Entry) {
|
||||
if (!(value instanceof File.DirectoryIterator.Entry)) {
|
||||
throw new TypeError("parameter of " +
|
||||
"File.DirectoryIterator.Entry.toMsg must be a " +
|
||||
"File.DirectoryIterator.Entry");
|
||||
|
|
@ -958,7 +958,7 @@
|
|||
* is asymmetric and returns an object with a different implementation.
|
||||
*/
|
||||
File.Info.toMsg = function toMsg(stat) {
|
||||
if (!stat instanceof File.Info) {
|
||||
if (!(stat instanceof File.Info)) {
|
||||
throw new TypeError("parameter of File.Info.toMsg must be a File.Info");
|
||||
}
|
||||
let serialized = {};
|
||||
|
|
|
|||
|
|
@ -109,9 +109,6 @@ module.exports = {
|
|||
// No reassigning native JS objects
|
||||
"no-native-reassign": "error",
|
||||
|
||||
// No (!foo in bar)
|
||||
"no-negated-in-lhs": "error",
|
||||
|
||||
// Nested ternary statements are confusing
|
||||
"no-nested-ternary": "error",
|
||||
|
||||
|
|
|
|||
|
|
@ -173,9 +173,6 @@ module.exports = { // eslint-disable-line no-undef
|
|||
// No reassigning native JS objects
|
||||
"no-native-reassign": "error",
|
||||
|
||||
// No (!foo in bar)
|
||||
"no-negated-in-lhs": "error",
|
||||
|
||||
// Nested ternary statements are confusing
|
||||
"no-nested-ternary": "error",
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue