Skip to content

Commit

Permalink
Bug 1505758 - Fix/enable ESLint 'no-useless-escape'
Browse files Browse the repository at this point in the history
  • Loading branch information
edmorley committed Nov 8, 2018
1 parent 4ea8abe commit 0e8406a
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Expand Up @@ -41,7 +41,6 @@ module.exports = {
'no-restricted-syntax': 'off',
'no-shadow': 'off',
'no-underscore-dangle': 'off',
'no-useless-escape': 'off',
'object-curly-newline': 'off',
'object-shorthand': 'off',
'operator-linebreak': 'off',
Expand Down
2 changes: 1 addition & 1 deletion ui/helpers/autoclassify.jsx
Expand Up @@ -16,7 +16,7 @@ export const stringOverlap = function (str1, str2) {
})
.map(function (str) {
// Split into tokens on whitespace / , and |
return str.split(/[\s\/\,|]+/).filter(function (x) {
return str.split(/[\s/,|]+/).filter(function (x) {
return x !== '';
});
});
Expand Down
2 changes: 1 addition & 1 deletion ui/helpers/revision.js
Expand Up @@ -23,7 +23,7 @@ export const getRevisionTitle = function getRevisionTitle(revisions) {
title = title.replace(/\btry: .*/, '');
title = title.replace(/\b(r|sr|f|a)=.*/, '');
title = title.replace(/(imported patch|\[mq\]:) /, '');
title = title.replace(/[;,\-\. ]+$/, '').trim();
title = title.replace(/[;,\-. ]+$/, '').trim();
if (title) {
if (title.length > thTitleSuffixLimit) {
title = `${title.substr(0, thTitleSuffixLimit - 3)}...`;
Expand Down
2 changes: 1 addition & 1 deletion ui/job-view/pushes/PushHeader.jsx
Expand Up @@ -18,7 +18,7 @@ const SKIPPED_LINK_PARAMS = [
];

function Author(props) {
const authorMatch = props.author.match(/\<(.*?)\>+/);
const authorMatch = props.author.match(/<(.*?)>+/);
const authorEmail = authorMatch ? authorMatch[1] : props.author;

return (
Expand Down
2 changes: 1 addition & 1 deletion ui/js/controllers/perf/graphs.js
@@ -1,5 +1,5 @@
// Remove the eslint-disable when rewriting this file during the React conversion.
/* eslint-disable no-use-before-define, no-var, prefer-template, radix, vars-on-top */
/* eslint-disable no-use-before-define, no-useless-escape, no-var, prefer-template, radix, vars-on-top */
// TODO: Vet/fix the use-before-defines to ensure switching var
// to let/const won't break anything.

Expand Down

0 comments on commit 0e8406a

Please sign in to comment.