Bug 1588872 - Enable ESLint rule mozilla/prefer-boolean-length-check by default, disable for failing locations. r=Mardak

Differential Revision: https://phabricator.services.mozilla.com/D49437

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mark Banner 2019-10-16 20:11:31 +00:00
Родитель e928de6825
Коммит dcfbcb56d7
4 изменённых файлов: 25 добавлений и 5 удалений

Просмотреть файл

@ -357,11 +357,30 @@ module.exports = {
}
}, {
"files": [
"toolkit/**",
"browser/**",
"accessible/**",
"devtools/**",
"dom/**",
"docshell/**",
"editor/libeditor/tests/**",
"editor/spellchecker/tests/test_bug338427.html",
"gfx/**",
"image/test/browser/browser_image.js",
"js/src/builtin/**",
"layout/**",
"mobile/android/**",
"modules/**",
"netwerk/**",
"remote/**",
"security/manager/**",
"services/**",
"storage/test/unit/test_vacuum.js",
"taskcluster/docker/periodic-updates/scripts/**",
"testing/**",
"tools/**",
"widget/tests/test_assign_event_data.html",
],
"rules": {
"mozilla/prefer-boolean-length-check": "error",
"mozilla/prefer-boolean-length-check": "off",
}
}]
};

Просмотреть файл

@ -134,6 +134,7 @@ module.exports = {
"mozilla/no-define-cc-etc": "error",
"mozilla/no-useless-parameters": "error",
"mozilla/no-useless-removeEventListener": "error",
"mozilla/prefer-boolean-length-check": "error",
"mozilla/reject-importGlobalProperties": ["error", "allownonwebidl"],
"mozilla/rejects-requires-await": "error",
"mozilla/use-cc-etc": "error",

Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "eslint-plugin-mozilla",
"version": "2.1.0",
"version": "2.2.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "eslint-plugin-mozilla",
"version": "2.1.0",
"version": "2.2.0",
"description": "A collection of rules that help enforce JavaScript coding standard in the Mozilla project.",
"keywords": [
"eslint",