зеркало из https://github.com/mozilla/treeherder.git
Bug 1505758 - Fix/enable ESLint 'object-shorthand'
https://eslint.org/docs/rules/object-shorthand
This commit is contained in:
Родитель
dd0165c0e0
Коммит
107b67bd69
|
@ -37,7 +37,6 @@ module.exports = {
|
|||
'no-shadow': 'off',
|
||||
'no-underscore-dangle': 'off',
|
||||
'object-curly-newline': 'off',
|
||||
'object-shorthand': 'off',
|
||||
'operator-linebreak': 'off',
|
||||
'padded-blocks': 'off',
|
||||
'prefer-arrow-callback': 'off',
|
||||
|
|
|
@ -349,7 +349,7 @@ class ErrorLine extends React.Component {
|
|||
const data = {
|
||||
id: errorLine.id,
|
||||
type: option.type,
|
||||
classifiedFailureId: classifiedFailureId,
|
||||
classifiedFailureId,
|
||||
bugNumber: bug,
|
||||
};
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ export default class LineOptionModel {
|
|||
constructor(type, id, classifiedFailureId, bugNumber,
|
||||
bugSummary, bugResolution, matches) {
|
||||
extendProperties(this, {
|
||||
type: type,
|
||||
id: id,
|
||||
type,
|
||||
id,
|
||||
classifiedFailureId: classifiedFailureId || null,
|
||||
bugNumber: bugNumber || null,
|
||||
bugSummary: bugSummary || null,
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// Remove the eslint-disable when rewriting this file during the React conversion.
|
||||
/* eslint-disable object-shorthand */
|
||||
import treeherder from '../../treeherder';
|
||||
import compareTableTemplate from '../../../partials/perf/comparetable.html';
|
||||
import averageTemplate from '../../../partials/perf/average.html';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Remove the eslint-disable when rewriting this file during the React conversion.
|
||||
/* eslint-disable prefer-template, radix */
|
||||
/* eslint-disable object-shorthand, prefer-template, radix */
|
||||
import merge from 'lodash/merge';
|
||||
import defaults from 'lodash/defaults';
|
||||
import set from 'lodash/set';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Remove the eslint-disable when rewriting this file during the React conversion.
|
||||
/* eslint-disable prefer-template, radix */
|
||||
/* eslint-disable object-shorthand, prefer-template, radix */
|
||||
import isEqual from 'lodash/isEqual';
|
||||
import difference from 'lodash/difference';
|
||||
import metricsgraphics from 'metrics-graphics';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Remove the eslint-disable when rewriting this file during the React conversion.
|
||||
/* eslint-disable no-use-before-define, no-useless-escape, no-var, prefer-template, radix, vars-on-top */
|
||||
/* eslint-disable no-use-before-define, no-useless-escape, no-var, object-shorthand, prefer-template, radix, vars-on-top */
|
||||
// TODO: Vet/fix the use-before-defines to ensure switching var
|
||||
// to let/const won't break anything.
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import { getJobsUrl } from '../helpers/url';
|
|||
treeherder.filter('getRevisionUrl', function () {
|
||||
return function (revision, projectName) {
|
||||
if (revision) {
|
||||
return getJobsUrl({ repo: projectName, revision: revision });
|
||||
return getJobsUrl({ repo: projectName, revision });
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Remove the eslint-disable when rewriting this file during the React conversion.
|
||||
/* eslint-disable prefer-template */
|
||||
/* eslint-disable object-shorthand, prefer-template */
|
||||
import sortBy from 'lodash/sortBy';
|
||||
import padStart from 'lodash/padStart';
|
||||
import capitalize from 'lodash/capitalize';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// Remove the eslint-disable when rewriting this file during the React conversion.
|
||||
/* eslint-disable object-shorthand */
|
||||
import treeherder from '../../treeherder';
|
||||
import { getApiUrl } from '../../../helpers/url';
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// Remove the eslint-disable when rewriting this file during the React conversion.
|
||||
/* eslint-disable object-shorthand */
|
||||
import treeherder from '../../treeherder';
|
||||
import { getApiUrl } from '../../../helpers/url';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Remove the eslint-disable when rewriting this file during the React conversion.
|
||||
/* eslint-disable no-nested-ternary, prefer-template */
|
||||
/* eslint-disable no-nested-ternary, object-shorthand, prefer-template */
|
||||
import forIn from 'lodash/forIn';
|
||||
import chunk from 'lodash/chunk';
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// Remove the eslint-disable when rewriting this file during the React conversion.
|
||||
/* eslint-disable object-shorthand */
|
||||
import treeherder from '../../treeherder';
|
||||
|
||||
treeherder.factory('math', [
|
||||
|
|
|
@ -40,12 +40,12 @@ export const getSeriesSummary = function (projectName, signature, signatureProps
|
|||
testName: getTestName(signatureProps), // unadorned with platform/option info
|
||||
suite: signatureProps.suite,
|
||||
test: signatureProps.test || null,
|
||||
signature: signature,
|
||||
signature,
|
||||
hasSubtests: signatureProps.has_subtests || false,
|
||||
parentSignature: signatureProps.parent_signature || null,
|
||||
projectName: projectName,
|
||||
platform: platform,
|
||||
options: options,
|
||||
projectName,
|
||||
platform,
|
||||
options,
|
||||
frameworkId: signatureProps.framework_id,
|
||||
lowerIsBetter: (signatureProps.lower_is_better === undefined ||
|
||||
signatureProps.lower_is_better),
|
||||
|
|
|
@ -17,7 +17,7 @@ const mapStateToProps = ({ groups }) => {
|
|||
hideClassified: groups.hideClassified,
|
||||
push: {
|
||||
revision: revision && revision.substring(0, 12),
|
||||
author: author,
|
||||
author,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче