Bug 1395890 - Change all ESLint rules that are warnings to errors. r=standard8

MozReview-Commit-ID: LJS6m1GppiS

--HG--
extra : rebase_source : 4a14e3309b7d554d9a1aa0d26f464e26bec3291e
This commit is contained in:
Dan Banner 2017-09-18 19:07:17 +01:00
Родитель 634330e4c4
Коммит 14ad0fcb62
9 изменённых файлов: 39 добавлений и 38 удалений

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

@ -1,6 +1,7 @@
/* global browser */
"use strict";
/* eslint-disable mozilla/no-cpows-in-tests */
function frameScript() {
function getSelectedText() {
let frame = this.content.frames[0].frames[1];
@ -21,6 +22,7 @@ function frameScript() {
}
getSelectedText();
}
/* eslint-enable mozilla/no-cpows-in-tests */
function waitForMessage(messageManager, topic) {
return new Promise(resolve => {
@ -135,4 +137,3 @@ add_task(async function testDuplicatePinnedTab() {
is(message.data.rect.top, top, `rect.top: - Expected: ${message.data.rect.top}, Actual: ${top}`);
is(message.data.rect.left, left, `rect.left: - Expected: ${message.data.rect.left}, Actual: ${left}`);
});

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

@ -82,10 +82,10 @@ module.exports = {
"no-fallthrough": "error",
// Disallow use of multiline strings (use template strings instead).
"no-multi-str": "warn",
"no-multi-str": "error",
// Disallow multiple empty lines.
"no-multiple-empty-lines": ["warn", {"max": 2}],
"no-multiple-empty-lines": ["error", {"max": 2}],
// Disallow usage of __proto__ property.
"no-proto": "error",
@ -99,7 +99,7 @@ module.exports = {
"no-throw-literal": "error",
// Disallow padding within blocks.
"padded-blocks": ["warn", "never"],
"padded-blocks": ["error", "never"],
// Require use of the second argument for parseInt().
"radix": "error",

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

@ -39,7 +39,7 @@ module.exports = {
// devtools coding style.
// Rules from the mozilla plugin
"mozilla/no-aArgs": "warn",
"mozilla/no-aArgs": "error",
"mozilla/no-cpows-in-tests": "error",
"mozilla/no-single-arg-cu-import": "error",
// See bug 1224289.
@ -48,7 +48,7 @@ module.exports = {
// directory for details. We reject requires using explicit
// subdirectories of this directory.
"mozilla/reject-some-requires": ["error", "^devtools/shared/platform/(chome|content)/"],
"mozilla/var-only-at-top-level": "warn",
"mozilla/var-only-at-top-level": "error",
// Rules from the React plugin
"react/display-name": "error",
@ -57,7 +57,7 @@ module.exports = {
"react/no-did-update-set-state": "error",
"react/no-direct-mutation-state": "error",
"react/no-unknown-property": "error",
"react/prefer-es6-class": ["warn", "never"],
"react/prefer-es6-class": ["error", "never"],
"react/prop-types": "error",
"react/sort-comp": ["error", {
order: [

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

@ -23,8 +23,8 @@ module.exports = {
// Rules from the mozilla plugin
"mozilla/balanced-listeners": "error",
"mozilla/no-aArgs": "error",
"mozilla/no-cpows-in-tests": "warn",
"mozilla/var-only-at-top-level": "warn",
"mozilla/no-cpows-in-tests": "error",
"mozilla/var-only-at-top-level": "error",
"valid-jsdoc": ["error", {
"prefer": {
@ -75,7 +75,7 @@ module.exports = {
// Disallow use of multiple spaces (sometimes used to align const values,
// array or object items, etc.). It's hard to maintain and doesn't add that
// much benefit.
"no-multi-spaces": "warn",
"no-multi-spaces": "error",
// No expressions where a statement is expected
"no-unused-expressions": "error",
@ -93,7 +93,7 @@ module.exports = {
"space-before-function-paren": ["error", {"anonymous": "never", "named": "never"}],
// ++ and -- should not need spacing
"space-unary-ops": ["warn", {"nonwords": false, "words": true, "overrides": {"typeof": false}}],
"space-unary-ops": ["error", {"nonwords": false, "words": true, "overrides": {"typeof": false}}],
// Disallow using variables outside the blocks they are defined (especially
// since only let and const are used, see "no-var").
@ -188,7 +188,7 @@ module.exports = {
"no-labels": ["error", {"allowLoop": true}],
// Disallow use of multiline strings (use template strings instead).
"no-multi-str": "warn",
"no-multi-str": "error",
// Disallow multiple empty lines.
"no-multiple-empty-lines": [1, {"max": 2}],
@ -256,7 +256,7 @@ module.exports = {
"one-var": "off",
// Disallow padding within blocks.
"padded-blocks": ["warn", "never"],
"padded-blocks": ["error", "never"],
// Don't require quotes around object literal property names.
"quote-props": "off",

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

@ -2,37 +2,37 @@
module.exports = {
"rules": {
"mozilla/no-aArgs": "warn",
"mozilla/reject-importGlobalProperties": "warn",
"mozilla/var-only-at-top-level": "warn",
"mozilla/no-aArgs": "error",
"mozilla/reject-importGlobalProperties": "error",
"mozilla/var-only-at-top-level": "error",
"block-scoped-var": "error",
"camelcase": "warn",
"camelcase": "error",
"comma-dangle": "off",
"complexity": ["error", {"max": 20}],
"curly": "error",
"dot-location": ["warn", "property"],
"indent": ["warn", 2, {"SwitchCase": 1}],
"max-len": ["warn", 80, 2, {"ignoreUrls": true}],
"dot-location": ["error", "property"],
"indent": ["error", 2, {"SwitchCase": 1}],
"max-len": ["error", 80, 2, {"ignoreUrls": true}],
"max-nested-callbacks": ["error", 3],
"new-cap": ["error", {"capIsNew": false}],
"new-parens": "error",
"no-extend-native": "error",
"no-fallthrough": "error",
"no-inline-comments": "warn",
"no-inline-comments": "error",
"no-mixed-spaces-and-tabs": "error",
"no-multi-spaces": "warn",
"no-multi-str": "warn",
"no-multiple-empty-lines": ["warn", {"max": 1}],
"no-multi-spaces": "error",
"no-multi-str": "error",
"no-multiple-empty-lines": ["error", {"max": 1}],
"no-return-assign": "error",
"no-sequences": "error",
"no-shadow": "warn",
"no-shadow": "error",
"no-throw-literal": "error",
"no-unused-vars": "error",
"padded-blocks": ["warn", "never"],
"quotes": ["warn", "double", "avoid-escape"],
"semi": ["warn", "always"],
"semi-spacing": ["warn", {"before": false, "after": true}],
"space-in-parens": ["warn", "never"],
"padded-blocks": ["error", "never"],
"quotes": ["error", "double", "avoid-escape"],
"semi": ["error", "always"],
"semi-spacing": ["error", {"before": false, "after": true}],
"space-in-parens": ["error", "never"],
"strict": ["error", "global"],
"yoda": "error"
}

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

@ -59,8 +59,8 @@ module.exports = {
"rules": {
"mozilla/import-content-task-globals": "error",
"mozilla/import-headjs-globals": "warn",
"mozilla/mark-test-function-used": "warn",
"mozilla/import-headjs-globals": "error",
"mozilla/mark-test-function-used": "error",
"mozilla/no-arbitrary-setTimeout": "error"
}
};

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

@ -49,7 +49,7 @@ module.exports = {
rules: {
"mozilla/import-content-task-globals": "error",
"mozilla/import-headjs-globals": "warn",
"mozilla/mark-test-function-used": "warn"
"mozilla/import-headjs-globals": "error",
"mozilla/mark-test-function-used": "error"
}
};

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

@ -45,8 +45,8 @@ module.exports = {
"rules": {
"mozilla/import-content-task-globals": "error",
"mozilla/import-headjs-globals": "warn",
"mozilla/mark-test-function-used": "warn",
"mozilla/import-headjs-globals": "error",
"mozilla/mark-test-function-used": "error",
"no-shadow": "error"
}
};

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

@ -67,8 +67,8 @@ module.exports = {
},
rules: {
"mozilla/import-headjs-globals": "warn",
"mozilla/mark-test-function-used": "warn",
"mozilla/import-headjs-globals": "error",
"mozilla/mark-test-function-used": "error",
"mozilla/no-arbitrary-setTimeout": "error",
"mozilla/no-useless-run-test": "error",
"no-shadow": "error"