diff options
author | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-10-30 19:32:06 +0300 |
---|---|---|
committer | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-11-03 22:28:59 +0300 |
commit | efd7c88404fc58d0dc8cd495ba2e33b9e9034e0b (patch) | |
tree | e205a290de55033a33c6a67ef9267d478e16a697 | |
parent | 602e98aa32f82fd3b0c3d250c7cc1f8da971db24 (diff) | |
download | webui-vue-efd7c88404fc58d0dc8cd495ba2e33b9e9034e0b.tar.xz |
Fix eslint no-prototype-builtins errors
Made updates to TableToolbar, ModalAddRoleGroup, and ModalUploadCertificate
components.
https://eslint.org/docs/rules/no-prototype-builtins
Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: Ic143cd244b288bc089a9416699d7c3d4349a500c
-rw-r--r-- | .eslintrc.js | 1 | ||||
-rw-r--r-- | src/components/Global/TableToolbar.vue | 3 | ||||
-rw-r--r-- | src/views/AccessControl/Ldap/ModalAddRoleGroup.vue | 4 | ||||
-rw-r--r-- | src/views/AccessControl/SslCertificates/ModalUploadCertificate.vue | 3 |
4 files changed, 6 insertions, 5 deletions
diff --git a/.eslintrc.js b/.eslintrc.js index c404a6d5..3901f226 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,7 +5,6 @@ module.exports = { }, extends: ['plugin:vue/recommended', 'eslint:recommended', '@vue/prettier'], rules: { - 'no-prototype-builtins': 'warn', 'no-console': 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', 'prettier/prettier': [ diff --git a/src/components/Global/TableToolbar.vue b/src/components/Global/TableToolbar.vue index 6a856b44..cb6fa240 100644 --- a/src/components/Global/TableToolbar.vue +++ b/src/components/Global/TableToolbar.vue @@ -44,7 +44,8 @@ export default { validator: (prop) => { return prop.every((action) => { return ( - action.hasOwnProperty('value') && action.hasOwnProperty('label') + Object.prototype.hasOwnProperty.call(action, 'value') && + Object.prototype.hasOwnProperty.call(action, 'label') ); }); }, diff --git a/src/views/AccessControl/Ldap/ModalAddRoleGroup.vue b/src/views/AccessControl/Ldap/ModalAddRoleGroup.vue index b9b1f5aa..b485eadd 100644 --- a/src/views/AccessControl/Ldap/ModalAddRoleGroup.vue +++ b/src/views/AccessControl/Ldap/ModalAddRoleGroup.vue @@ -92,8 +92,8 @@ export default { validator: (prop) => { if (prop === null) return true; return ( - prop.hasOwnProperty('groupName') && - prop.hasOwnProperty('groupPrivilege') + Object.prototype.hasOwnProperty.call(prop, 'groupName') && + Object.prototype.hasOwnProperty.call(prop, 'groupPrivilege') ); }, }, diff --git a/src/views/AccessControl/SslCertificates/ModalUploadCertificate.vue b/src/views/AccessControl/SslCertificates/ModalUploadCertificate.vue index 070dd0dc..50df9a42 100644 --- a/src/views/AccessControl/SslCertificates/ModalUploadCertificate.vue +++ b/src/views/AccessControl/SslCertificates/ModalUploadCertificate.vue @@ -83,7 +83,8 @@ export default { validator: (prop) => { if (prop === null) return true; return ( - prop.hasOwnProperty('type') && prop.hasOwnProperty('certificate') + Object.prototype.hasOwnProperty.call(prop, 'type') && + Object.prototype.hasOwnProperty.call(prop, 'certificate') ); }, }, |