Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lint] Remove no-prototype-builtins #1259

Merged
merged 2 commits into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"semi": "off",
"no-extra-semi": "warn",
"no-case-declarations": "warn",
"no-useless-escape" : "warn"
"no-useless-escape" : "warn",
"no-prototype-builtins": "warn"
}
}
4 changes: 2 additions & 2 deletions media/CircleGraph/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ view.View = class {
this._clearSelection();

// set new selection
if (selection.hasOwnProperty('names')) {
if (Object.prototype.hasOwnProperty.call(selection, 'names')) {
// selection is by names
const names = selection.names;
let scrollToSelects = []; // elements to make visible by scroll to
Expand Down Expand Up @@ -643,7 +643,7 @@ view.View = class {
// (3) interate all graph nodes and set if exist in opname, clear if not.
// here, (3) is implemented

if (!message.hasOwnProperty('partition')) {
if (!Object.prototype.hasOwnProperty.call(message, 'partition')) {
return;
}
const partition = message.partition;
Expand Down
4 changes: 2 additions & 2 deletions media/PartEditor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ editor.Editor = class {
this.clearOperatorsCode();

for (let name in this.partition.OPNAME) {
if (this.partition.OPNAME.hasOwnProperty(name)) {
if (Object.prototype.hasOwnProperty.call(this.partition.OPNAME, name)) {
let backend = this.partition.OPNAME[name];
let beCode = this.backendCode(backend);
if (beCode !== -1) {
Expand Down Expand Up @@ -430,7 +430,7 @@ editor.Editor = class {
backendCode(value) {
if (typeof value === 'string') {
value = value.toUpperCase();
if (this.beToCode.hasOwnProperty(value)) {
if (Object.prototype.hasOwnProperty.call(this.beToCode, value)) {
return this.beToCode[value];
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/PartEditor/PartEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,11 @@ class PartEditor implements PartGraphEvent {
partContent['partition'] = this.makeDefaultPartiton();
}

if (message.hasOwnProperty('opname')) {
if (Object.prototype.hasOwnProperty.call(message, 'opname')) {
partContent.OPNAME = message.opname;
}
if (message.hasOwnProperty('partition')) {

if (Object.prototype.hasOwnProperty.call(message, 'partition')) {
partContent.partition = message.partition;
}

Expand Down