gecko-dev/browser/.eslintrc.js
Chris Peterson c0d7dd79dd Bug 1358041 - Hoist some eslint rules from browser/ subdirectories to browser/.eslintrc. r=standard8
All of browser/ JS code passes these eslint rules, so we can hoist them from subdirectories' .eslintrc to the common browser/.eslintrc.

MozReview-Commit-ID: GMidHq0UIlH

--HG--
extra : rebase_source : 802631e372bbf6c256f5236deb275cb05fd73894
extra : histedit_source : a87b58345ff471b2504244d90c4ea1aa149a3c86
2017-04-19 16:53:43 -07:00

30 lines
799 B
JavaScript

"use strict";
module.exports = {
"extends": [
"plugin:mozilla/recommended"
],
"rules": {
// XXX Bug 1326071 - This should be reduced down - probably to 20 or to
// be removed & synced with the mozilla/recommended value.
"complexity": ["error", {"max": 40}],
// Disallow empty statements. This will report an error for:
// try { something(); } catch (e) {}
// but will not report it for:
// try { something(); } catch (e) { /* Silencing the error because ...*/ }
// which is a valid use case.
"no-empty": "error",
// Maximum depth callbacks can be nested.
"max-nested-callbacks": ["error", 8],
// Disallow adding to native types
"no-extend-native": "error",
"no-mixed-spaces-and-tabs": "error",
"no-shadow": "error",
}
};