no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / security / .eslintrc.js
blob2fd5d86c28e3976b95df7645f5d9d87ec5bbe3b1
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 "use strict";
7 module.exports = {
8   rules: {
9     // Enforce return statements in callbacks of array methods.
10     "array-callback-return": "error",
12     // Require default case in switch statements.
13     "default-case": "error",
15     // Disallow use of alert(), confirm(), and prompt().
16     "no-alert": "error",
18     // Disallow likely erroneous `switch` scoped lexical declarations in
19     // case/default clauses.
20     "no-case-declarations": "error",
22     // Disallow use of the console API.
23     "no-console": ["error", { allow: ["error"] }],
25     // Disallow constant expressions in conditions (except for loops).
26     "no-constant-condition": ["error", { checkLoops: false }],
28     // Disallow extending of native objects.
29     "no-extend-native": "error",
31     // Disallow use of assignment in return statement.
32     "no-return-assign": ["error", "always"],
34     // Disallow template literal placeholder syntax in regular strings.
35     "no-template-curly-in-string": "error",
37     // Disallow unmodified loop conditions.
38     "no-unmodified-loop-condition": "error",
40     // No expressions where a statement is expected
41     "no-unused-expressions": "error",
43     // Disallow unnecessary escape usage in strings and regular expressions.
44     "no-useless-escape": "error",
46     // Require "use strict" to be defined globally in the script.
47     strict: ["error", "global"],
49     // Disallow Yoda conditions.
50     yoda: ["error", "never"],
51   },