fune/mobile/android/extensions/report-site-issue/.eslintrc.js
Victor Porof b5a4cb3848 Bug 1558517 - Pre 3.0: Remove conflicting eslint rules, and turn on "curly: all" everywhere, r=standard8
Differential Revision: https://phabricator.services.mozilla.com/D34535

--HG--
extra : source : 74ed7ee773393d305c4e948a57a1b1e32b1f12e8
extra : intermediate-source : 403d0757d61683e0a85d0bb07768eb39fbd0af72
2019-06-28 17:14:01 +02:00

69 lines
2 KiB
JavaScript

"use strict";
module.exports = {
"rules": {
// Rules from the mozilla plugin
"mozilla/balanced-listeners": "error",
"mozilla/no-aArgs": "error",
"mozilla/var-only-at-top-level": "error",
"valid-jsdoc": ["error", {
"prefer": {
"return": "returns",
},
"preferType": {
"Boolean": "boolean",
"Number": "number",
"String": "string",
"bool": "boolean",
},
"requireParamDescription": false,
"requireReturn": false,
"requireReturnDescription": false,
}],
// No expressions where a statement is expected
"no-unused-expressions": "error",
// No declaring variables that are never used
"no-unused-vars": "error",
// Disallow using variables outside the blocks they are defined (especially
// since only let and const are used, see "no-var").
"block-scoped-var": "error",
// Warn about cyclomatic complexity in functions.
"complexity": ["error", {"max": 26}],
// Maximum depth callbacks can be nested.
"max-nested-callbacks": ["error", 4],
// Allow the console API aside from console.log.
"no-console": ["error", {allow: ["error", "info", "trace", "warn"]}],
// Disallow fallthrough of case statements, except if there is a comment.
"no-fallthrough": "error",
// Disallow use of multiline strings (use template strings instead).
"no-multi-str": "error",
// Disallow usage of __proto__ property.
"no-proto": "error",
// Disallow use of assignment in return statement. It is preferable for a
// single line of code to have only one easily predictable effect.
"no-return-assign": "error",
// Require use of the second argument for parseInt().
"radix": "error",
// Require "use strict" to be defined globally in the script.
"strict": ["error", "global"],
// Disallow Yoda conditions (where literal value comes first).
"yoda": "error",
// Disallow function or variable declarations in nested blocks
"no-inner-declarations": "error",
},
};