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 // Verify calls of super() in constructors.
13 "constructor-super": "error",
15 // Require default case in switch statements.
16 "default-case": "error",
18 // Disallow use of alert(), confirm(), and prompt().
21 // Disallow likely erroneous `switch` scoped lexical declarations in
22 // case/default clauses.
23 "no-case-declarations": "error",
25 // Disallow use of the console API.
26 "no-console": ["error", { allow: ["error"] }],
28 // Disallow constant expressions in conditions (except for loops).
29 "no-constant-condition": ["error", { checkLoops: false }],
31 // Disallow extending of native objects.
32 "no-extend-native": "error",
34 // Disallow use of assignment in return statement.
35 "no-return-assign": ["error", "always"],
37 // Disallow template literal placeholder syntax in regular strings.
38 "no-template-curly-in-string": "error",
40 // Disallow unmodified loop conditions.
41 "no-unmodified-loop-condition": "error",
43 // No expressions where a statement is expected
44 "no-unused-expressions": "error",
46 // Disallow unnecessary escape usage in strings and regular expressions.
47 "no-useless-escape": "error",
49 // Require "use strict" to be defined globally in the script.
50 strict: ["error", "global"],
52 // Disallow Yoda conditions.
53 yoda: ["error", "never"],