Bug 1370240 - Enable the ESLint no-control-regex rule across mozilla-central. r=mossop

MozReview-Commit-ID: IN7YMk7yhAO

--HG--
extra : rebase_source : be0a9cae6eae14d4f097eced2e231a96c89c9c47
This commit is contained in:
Mark Banner 2017-06-05 15:43:09 +01:00
Родитель 724180965f
Коммит c93c2a1504
8 изменённых файлов: 4 добавлений и 13 удалений

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

@ -38,7 +38,6 @@ module.exports = {
"no-console": "off",
"no-constant-condition": "off",
"no-continue": "off",
"no-control-regex": "error",
"no-div-regex": "off",
"no-extend-native": "error",
"no-extra-parens": "off",

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

@ -4085,7 +4085,7 @@ function addToUrlbarHistory(aUrlToAdd) {
if (!PrivateBrowsingUtils.isWindowPrivate(window) &&
aUrlToAdd &&
!aUrlToAdd.includes(" ") &&
!/[\x00-\x1F]/.test(aUrlToAdd))
!/[\x00-\x1F]/.test(aUrlToAdd)) // eslint-disable-line no-control-regex
PlacesUIUtils.markPageAsTyped(aUrlToAdd);
}

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

@ -14,7 +14,6 @@ module.exports = {
"indent": ["error", 2, {"SwitchCase": 1, "ArrayExpression": "first", "ObjectExpression": "first"}],
"max-nested-callbacks": ["error", 3],
"new-parens": "error",
"no-control-regex": "error",
"no-extend-native": "error",
"no-fallthrough": ["error", { "commentPattern": ".*[Ii]ntentional(?:ly)?\\s+fall(?:ing)?[\\s-]*through.*" }],
"no-multi-str": "error",

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

@ -98,9 +98,6 @@ module.exports = {
// Disallow using the console API.
"no-console": "error",
// Disallow control characters in regular expressions.
"no-control-regex": "error",
// Disallow fallthrough of case statements, except if there is a comment.
"no-fallthrough": "error",

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

@ -51,9 +51,6 @@ module.exports = {
// Disallow constant expressions in conditions (except for loops).
"no-constant-condition": ["error", { "checkLoops": false }],
// Disallow control characters in regular expressions.
"no-control-regex": "error",
// Disallow duplicate class members.
"no-dupe-class-members": "error",

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

@ -203,9 +203,6 @@ module.exports = {
// Allow use of the continue statement.
"no-continue": "off",
// Disallow control characters in regular expressions.
"no-control-regex": "error",
// Allow division operators explicitly at beginning of regular expression.
"no-div-regex": "off",

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

@ -23,7 +23,6 @@ module.exports = {
"max-nested-callbacks": ["error", 3],
"new-cap": ["error", {"capIsNew": false}],
"new-parens": "error",
"no-control-regex": "error",
"no-extend-native": "error",
"no-fallthrough": "error",
"no-inline-comments": "warn",

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

@ -146,6 +146,9 @@ module.exports = {
// Disallow assignment operators in conditional statements
"no-cond-assign": "error",
// Disallow control characters in regular expressions.
"no-control-regex": "error",
// Disallow the use of debugger
"no-debugger": "error",