mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 23:35:34 +00:00
f1eb5aaa84
MozReview-Commit-ID: JOC1330iFnh --HG-- extra : rebase_source : 2afcb219d4a0d78f996bdc2c841456d2dccff605
74 lines
1.9 KiB
JavaScript
74 lines
1.9 KiB
JavaScript
"use strict";
|
|
|
|
module.exports = {
|
|
rules: {
|
|
"mozilla/balanced-listeners": "error",
|
|
"mozilla/no-cpows-in-tests": "error",
|
|
"mozilla/var-only-at-top-level": "error",
|
|
|
|
"array-bracket-spacing": ["error", "never"],
|
|
"block-scoped-var": "error",
|
|
"comma-dangle": ["error", "always-multiline"],
|
|
complexity: ["error", {
|
|
max: 20,
|
|
}],
|
|
curly: ["error", "all"],
|
|
"dot-location": ["error", "property"],
|
|
"generator-star-spacing": ["error", "after"],
|
|
indent: ["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",
|
|
varsIgnorePattern: "^(Cc|Ci|Cr|Cu|EXPORTED_SYMBOLS)$",
|
|
}],
|
|
"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",
|
|
},
|
|
};
|