mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
afb520e82a
Enable globally by default by blacklist directories outside of the ones we're enabling. Remove now unnecessary existing configurations. Differential Revision: https://phabricator.services.mozilla.com/D4440 --HG-- extra : moz-landing-system : lando
71 lines
1.8 KiB
JavaScript
71 lines
1.8 KiB
JavaScript
"use strict";
|
|
|
|
module.exports = {
|
|
rules: {
|
|
"mozilla/balanced-listeners": "error",
|
|
"mozilla/var-only-at-top-level": "error",
|
|
|
|
"array-bracket-spacing": ["error", "never"],
|
|
"block-scoped-var": "error",
|
|
complexity: ["error", {
|
|
max: 23,
|
|
}],
|
|
curly: ["error", "all"],
|
|
"dot-location": ["error", "property"],
|
|
"indent-legacy": ["error", 2, {
|
|
SwitchCase: 1,
|
|
CallExpression: {
|
|
arguments: "first",
|
|
},
|
|
FunctionExpression: {
|
|
parameters: "first",
|
|
},
|
|
FunctionDeclaration: {
|
|
parameters: "first",
|
|
},
|
|
// XXX: following line is used in eslint v4 to not throw an error when chaining methods
|
|
//MemberExpression: "off",
|
|
outerIIFEBody: 0,
|
|
}],
|
|
"max-len": ["error", 100],
|
|
"max-nested-callbacks": ["error", 4],
|
|
"new-parens": "error",
|
|
"no-console": "error",
|
|
"no-fallthrough": "error",
|
|
"no-multi-str": "error",
|
|
"no-multiple-empty-lines": ["error", {
|
|
max: 2,
|
|
}],
|
|
"no-proto": "error",
|
|
"no-throw-literal": "error",
|
|
"no-unused-expressions": "error",
|
|
"no-unused-vars": ["error", {
|
|
args: "none",
|
|
vars: "all",
|
|
}],
|
|
"no-use-before-define": ["error", {
|
|
functions: false,
|
|
}],
|
|
"padded-blocks": ["error", "never"],
|
|
radix: "error",
|
|
semi: ["error", "always"],
|
|
"semi-spacing": ["error", {"before": false, "after": true}],
|
|
"space-in-parens": ["error", "never"],
|
|
"valid-jsdoc": ["error", {
|
|
prefer: {
|
|
return: "returns",
|
|
},
|
|
preferType: {
|
|
Boolean: "boolean",
|
|
Number: "number",
|
|
String: "string",
|
|
bool: "boolean",
|
|
},
|
|
requireParamDescription: false,
|
|
requireReturn: false,
|
|
requireReturnDescription: false,
|
|
}],
|
|
yoda: "error",
|
|
},
|
|
};
|