tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

.eslintrc.mjs (1487B)


      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/. */
      4 
      5 export default [
      6  {
      7    rules: {
      8      // Enforce return statements in callbacks of array methods.
      9      "array-callback-return": "error",
     10 
     11      // Require default case in switch statements.
     12      "default-case": "error",
     13 
     14      // Disallow use of alert(), confirm(), and prompt().
     15      "no-alert": "error",
     16 
     17      // Disallow likely erroneous `switch` scoped lexical declarations in
     18      // case/default clauses.
     19      "no-case-declarations": "error",
     20 
     21      // Disallow constant expressions in conditions (except for loops).
     22      "no-constant-condition": ["error", { checkLoops: false }],
     23 
     24      // Disallow extending of native objects.
     25      "no-extend-native": "error",
     26 
     27      // Disallow use of assignment in return statement.
     28      "no-return-assign": ["error", "always"],
     29 
     30      // Disallow template literal placeholder syntax in regular strings.
     31      "no-template-curly-in-string": "error",
     32 
     33      // Disallow unmodified loop conditions.
     34      "no-unmodified-loop-condition": "error",
     35 
     36      // No expressions where a statement is expected
     37      "no-unused-expressions": "error",
     38 
     39      // Require "use strict" to be defined globally in the script.
     40      strict: ["error", "global"],
     41 
     42      // Disallow Yoda conditions.
     43      yoda: ["error", "never"],
     44    },
     45  },
     46 ];