зеркало из https://github.com/mozilla/treeherder.git
Bug 1505758 - Fix/enable ESLint 'no-useless-escape'
https://eslint.org/docs/rules/no-useless-escape
This commit is contained in:
Родитель
4ea8abe421
Коммит
0e8406a4aa
|
@ -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',
|
||||
|
|
|
@ -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 !== '';
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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)}...`;
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче