зеркало из https://github.com/mozilla/treeherder.git
Bug 1505758 - Fix/enable ESLint 'no-prototype-builtins'
https://eslint.org/docs/rules/no-prototype-builtins
This commit is contained in:
Родитель
0e8406a4aa
Коммит
6d18047fd6
|
@ -36,7 +36,6 @@ module.exports = {
|
|||
'no-nested-ternary': 'off',
|
||||
'no-param-reassign': 'off',
|
||||
'no-plusplus': 'off',
|
||||
'no-prototype-builtins': 'off',
|
||||
'no-restricted-globals': 'off',
|
||||
'no-restricted-syntax': 'off',
|
||||
'no-shadow': 'off',
|
||||
|
|
|
@ -33,7 +33,7 @@ export const stringOverlap = function (str1, str2) {
|
|||
|
||||
const overlap = Object.keys(tokenCounts[0])
|
||||
.reduce(function (overlap, x) {
|
||||
if (tokenCounts[1].hasOwnProperty(x)) {
|
||||
if (Object.prototype.hasOwnProperty.call(tokenCounts[1], x)) {
|
||||
overlap += 2 * Math.min(tokenCounts[0][x], tokenCounts[1][x]);
|
||||
}
|
||||
return overlap;
|
||||
|
|
|
@ -3,7 +3,7 @@ export const extendProperties = function extendProperties(dest, src) {
|
|||
/* Version of _.extend that works with property descriptors */
|
||||
if (dest !== src) {
|
||||
for (const key in src) {
|
||||
if (!src.hasOwnProperty(key)) {
|
||||
if (!Object.prototype.hasOwnProperty.call(src, key)) {
|
||||
continue;
|
||||
}
|
||||
const descriptor = Object.getOwnPropertyDescriptor(src, key);
|
||||
|
|
|
@ -77,7 +77,7 @@ class ActionBar extends React.PureComponent {
|
|||
TaskclusterModel.load(decisionTaskId, selectedJob).then((results) => {
|
||||
const geckoprofile = results.actions.find(result => result.name === 'geckoprofile');
|
||||
|
||||
if (geckoprofile === undefined || !geckoprofile.hasOwnProperty('kind')) {
|
||||
if (geckoprofile === undefined || !Object.prototype.hasOwnProperty.call(geckoprofile, 'kind')) {
|
||||
return notify('Job was scheduled without taskcluster support for GeckoProfiles');
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче