build: update eslint + eslint plugins (#22777)
* build: run eslint --fix * chore: manually fix all hasOwnProperty errors * chore: manually fix all void 0 vs undefined errors * chore: manually fix all async-in-promise errors * chore: manually fix lexical declaration in case block
This commit is contained in:
parent
42f138282f
commit
b87b501161
62 changed files with 280 additions and 280 deletions
|
@ -254,7 +254,7 @@ const roles = {
|
|||
exports.roleList = roles
|
||||
|
||||
const canExecuteRole = (role) => {
|
||||
if (!roles.hasOwnProperty(role)) return false
|
||||
if (!Object.prototype.hasOwnProperty.call(roles, role)) return false
|
||||
if (!isMac) return true
|
||||
|
||||
// macOS handles all roles natively except for a few
|
||||
|
@ -262,20 +262,20 @@ const canExecuteRole = (role) => {
|
|||
}
|
||||
|
||||
exports.getDefaultLabel = (role) => {
|
||||
return roles.hasOwnProperty(role) ? roles[role].label : ''
|
||||
return Object.prototype.hasOwnProperty.call(roles, role) ? roles[role].label : ''
|
||||
}
|
||||
|
||||
exports.getDefaultAccelerator = (role) => {
|
||||
if (roles.hasOwnProperty(role)) return roles[role].accelerator
|
||||
if (Object.prototype.hasOwnProperty.call(roles, role)) return roles[role].accelerator
|
||||
}
|
||||
|
||||
exports.shouldRegisterAccelerator = (role) => {
|
||||
const hasRoleRegister = roles.hasOwnProperty(role) && roles[role].registerAccelerator !== undefined
|
||||
const hasRoleRegister = Object.prototype.hasOwnProperty.call(roles, role) && roles[role].registerAccelerator !== undefined
|
||||
return hasRoleRegister ? roles[role].registerAccelerator : true
|
||||
}
|
||||
|
||||
exports.getDefaultSubmenu = (role) => {
|
||||
if (!roles.hasOwnProperty(role)) return
|
||||
if (!Object.prototype.hasOwnProperty.call(roles, role)) return
|
||||
|
||||
let { submenu } = roles[role]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue