зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
724180965f
Коммит
c93c2a1504
|
@ -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",
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче