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/. */
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().
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 // Require "use strict" to be defined globally in the script.
44 strict: ["error", "global"],
46 // Disallow Yoda conditions.
47 yoda: ["error", "never"],