mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 17:25:36 +00:00
c0d7dd79dd
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
30 lines
799 B
JavaScript
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",
|
|
}
|
|
};
|