Bug 1505758 - Fix/enable ESLint 'object-shorthand'

https://eslint.org/docs/rules/object-shorthand
This commit is contained in:
Ed Morley 2018-11-05 15:47:05 +00:00
Родитель dd0165c0e0
Коммит 107b67bd69
15 изменённых файлов: 22 добавлений и 15 удалений

Просмотреть файл

@ -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,
},
};
};