gecko-dev/toolkit/components/satchel/.eslintrc.js
Mark Banner afb520e82a Bug 1486739 - Enable ESLint rule comma-dangle for browser/, services/, taskcluster/ and toolkit/ directories. r=mossop
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
2018-08-31 06:06:08 +00:00

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",
},
};