Граф коммитов

217 Коммитов

Автор SHA1 Сообщение Дата
Chris Peterson 7b85322694 Bug 1358949 - Lower eslint cyclomatic complexity threshold in some directories. r=standard8
We can lower the eslint cyclomatic complexity threshold in some directories without adding eslint suppression comments in any .js source files. We need to specify the complexity rule in accessible/.eslintrc because it doesn't inherit the mozilla/recommended rules. eslint's default complexity threshold is 20.

Also bump the eslint-plugin-mozilla version because we modified the mozilla/recommended rules.

MozReview-Commit-ID: 57T4gAjPH7z

--HG--
extra : rebase_source : 4565abfa722b9459cfb4e006e843da13ed7cffd4
extra : intermediate-source : 658588564c08c9fd5e60633d1457f24087de8570
extra : source : 7e0526e3b943419a80c0cd2fa462cabbf8925eb1
2017-04-23 19:23:18 -07:00
Chris Peterson 893e00d283 Bug 1358947 - Make eslint "max-nested-callbacks" rule an error. r=standard8
eslint's default max-nested-callbacks threshold is 10, but now we make it an error. We could further lower the max-nested-callbacks threshold globally to 8, like browser/.eslintrc.js, but that would require adding suppression comments in (two) more .js test files. 10 seems good enough for now since it's the eslint default.

We need to specify max-nested-callbacks in accessible/.eslintrc because it doesn't inherit the mozilla/recommended rules.

Also bump the eslint-plugin-mozilla version because we modified the mozilla/recommended rules.

MozReview-Commit-ID: JA41vsi4U7j

--HG--
extra : rebase_source : 2dd211ebd3b8cf83f67f26cac5244bec8978f0e2
extra : intermediate-source : 6f5e75502be394038543029e3cfd474c5b1c2e98
extra : source : a13437d73c97fabd073ab8a6f93e85a5084b7405
2017-04-21 23:00:26 -07:00
Dan Banner cbf1ee25cc Bug 1351099 - Remove unused AddonLogging.jsm file r=rhelmer
MozReview-Commit-ID: B1mxqNZhpB

--HG--
extra : rebase_source : 02abddd18ec98fdd2d74eda053d161625fd96d3e
2017-04-19 16:28:41 +01:00
Frederik Braun 777b70a929 Bug 1358050: Add no-implied-eval rule to eslint config r=standard8
MozReview-Commit-ID: KdmpXq2rg1q

--HG--
extra : rebase_source : fc89233a590604e1035be4aebfee9cda894ee07e
2017-04-20 10:33:22 +02:00
Mark Banner fbd29db04b Bug 1357702 - Make eslint-plugin-spidermonkey-js handle paths correct on Windows to avoid Unexpected character issues on ESLint. r=mossop
MozReview-Commit-ID: LsQCgBOgceY

--HG--
extra : rebase_source : 337037ad78c223139a3531a8ca9a68b13dbcb013
2017-04-19 12:17:14 +01:00
Mark Banner 6419084416 Bug 1357502 - Change eslint-plugin-mozilla tests to use the mocha test harness to improve the output. r=mossop
MozReview-Commit-ID: 1xI0tBpbSgM

--HG--
extra : rebase_source : 227dc315767083e88ec88219771d66fade3072b2
2017-04-18 20:06:02 +01:00
Mark Banner 58e3fafe78 Bug 1357546 - Fix how relative paths are handled in Windows for the ESLint import-browser-window-globals rule. r=mossop
MozReview-Commit-ID: Q8YcLRSpkQ
2017-04-18 22:11:54 +01:00
Mark Banner 2e1696e256 Bug 1357393 - Correct getting the rootDir in createExports - used for publishing eslint-plugin-mozilla. r=mossop
Bump the version number to match what is currently published.

MozReview-Commit-ID: 8r8otQQBqBo

--HG--
extra : rebase_source : 1b7daac6b2852117ae08927fd5a09b2a7650d683
2017-04-18 13:56:19 +01:00
Sebastian Hengst a7334b2896 Bug 1347709 and Bug 1356569 - Bump eslint plugin version to resolve conflict. r=instruction-by-florian a=bustage-fix
MozReview-Commit-ID: 2zp9hXqxT26

--HG--
extra : amend_source : 465b881899a40cf29d0f3d7dbdd883d8a61edb2c
2017-04-15 20:05:51 +02:00
Sebastian Hengst 8bd051237a merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: JpAhOPjgvkF
2017-04-15 19:59:24 +02:00
Mark Banner f515ecdff3 Bug 1347709 - Allow modules.json to be loaded from a local version for out-of-tree uses of eslint-plugin-mozilla. r=mossop
MozReview-Commit-ID: 7RzAUqNJQ15

--HG--
extra : rebase_source : c71873fd9864032345fb48047f2c272c2703a210
2017-04-13 12:03:30 +01:00
Mark Banner 4ef57a002d Bug 1347709 - Add a prepublish script to save the current globals for the published version of eslint-plugin-mozilla, and use that when not in mozilla-central. r=mossop
MozReview-Commit-ID: GHD7GQ0Pjnp

--HG--
extra : rebase_source : 8a8deeb0544799426baa820fa91a22eb9e1d3526
2017-04-12 18:02:53 +01:00
Mark Banner b624a1a95b Bug 1347709 - Add a .npmignore file to stop publishing unnecessary files for eslint-plugin-mozilla. r=mossop
MozReview-Commit-ID: BcZBIFM1Ugu

--HG--
extra : rebase_source : ca8cbc2e04cb96e98da5febdd82d8ac7393ebc8b
2017-04-06 12:04:52 +01:00
Mark Banner d12d56b126 Bug 1355778 - Manual fix of ESLint issues in eslint-plugin-* due to the rule changes. r=mossop
MozReview-Commit-ID: Ieh4qkSORjW

--HG--
extra : rebase_source : 9ad2b0257d578eac6106ee16b97394b4f69d1ef3
2017-04-12 12:19:14 +01:00
Mark Banner c8c632d328 Bug 1355778 - Autofix ESLint issues in eslint-plugin-* due to the rule changes. r=mossop
MozReview-Commit-ID: AGnEkeNuxhx

--HG--
extra : rebase_source : 668e5f11679c909b25d15da08c32ce8a1d05fef2
2017-04-12 12:15:13 +01:00
Mark Banner 6bf4da0caf Bug 1355778 - Unify some of the eslint-plugin-* rules to match the Mozilla recommended configuration. r=mossop
MozReview-Commit-ID: IyLtlZCtMtH

--HG--
extra : rebase_source : cb7beeea5d6e59a4cb6503c3d80c65a206679315
2017-04-12 12:14:43 +01:00
Mark Banner 3dd96b34b3 Bug 1355776 - Upgrade ESLint to version 3.19.0 to pick up autofix improvements and other fixes. r=mossop
Pick up autofix improvements in 3.19.0. Upgrade eslint-plugin-react. Also fix issues with the package.json file and the ESLint node_modules upload script.

MozReview-Commit-ID: IDZ1n4qTTuv

--HG--
extra : rebase_source : aa97cd6f314ce10d16d12446e50a27d6f994a9f1
2017-04-12 12:07:01 +01:00
Florian Queze 457e21bc53 Bug 1356569 - Update the no-useless-parameters eslint rule to report trailing optional parameters for addObserver, appendElement and notifyObservers, r=jaws. 2017-04-14 21:51:40 +02:00
Sebastian Hengst 608dc9589d Backed out changeset c724e1485608 (bug 1356569) 2017-04-14 23:39:15 +02:00
Florian Queze 9b6b71947a Bug 1356569 - Update the no-useless-parameters eslint rule to report trailing optional parameters for addObserver, appendElement and notifyObservers, r=jaws. 2017-04-14 21:51:40 +02:00
Mark Banner 92c422a2d6 Bug 1342459 - Add a rule to automatically detect ContentTask.spawn and inject the relevant globals. r=mossop
This reduces the amount of places where we need to specify the mozilla/frame-script environment. It does have
the side effect of allowing those globals in the whole file, but that is what specifying the environment would
do, and this is also for mochitest test files only.

MozReview-Commit-ID: 1LLFbn6fFJR

--HG--
extra : rebase_source : 82a6934d90bbbbd25f91b7b06bf4f9354e38865a
2017-04-05 10:00:25 +01:00
Mark Banner 427e3b23dc Bug 1342459 - Fix various no-undef issues in browser/base. r=mossop
MozReview-Commit-ID: CRYxu7copKb

--HG--
extra : rebase_source : bc176c5e6890ffc6a4e26cb9bc9d441d9486ce7b
2017-04-04 13:42:33 +01:00
Andrew McCreight 2f83bee3a7 Bug 1353174, part 1 - Turn ContentObservers.jsm into a process script. r=Gijs
This retains the advantage of running only once per process, while
avoiding the per-process overhead of a jsm.

MozReview-Commit-ID: 1N53MvRwUpg

--HG--
rename : browser/modules/ContentObservers.jsm => browser/modules/ContentObservers.js
extra : rebase_source : 6a502cff26fcb55526f97385274bbae871f5cc6c
2017-04-04 11:21:48 -07:00
Mark Banner 9f564cd9e1 Bug 1352969 - Improve ESLint environment browser-window globals list, and automatically inject it into browser-window scripts. r=mossop
MozReview-Commit-ID: 3lv0K1unAc

--HG--
extra : rebase_source : 4e4ef0f40f377298013dc17ca0f077890d32669c
2017-03-09 17:17:26 +00:00
Mark Banner 1087fc1884 Bug 1352969 - Fix various ESLint no-undef issues in browser/base (no-undef is not enabled yet). r=mossop
MozReview-Commit-ID: BuTyJAfUoWR

--HG--
extra : rebase_source : 482bdc039362347f35aec9fd15e07a143dccb860
2017-02-22 17:02:59 +00:00
Mark Banner 2cc135d612 Bug 1353385 - Make './mach eslint --setup' a little quieter and fix the reported location of the eslint binary. r=mossop
MozReview-Commit-ID: 3ucPJP5JXV8

--HG--
extra : rebase_source : ba9f2f1b79e6bbdbf20884ec01d095bd40f8c3c3
2017-04-04 16:06:14 +01:00
Mark Banner b8e9cadef9 Bug 1305023 - Move ESLint's package.json and node_modules to the top level to improve editor integration. r=gps
Editors generally look for configurations at the top level of a project. For ESLint, they also look for the specific binary in node_modules before defaulting to the system binary. Whilst you can override the location, generally it doesn't work well when switching between projects.

The custom in-tree libraries make setup of a system ESLint more difficult as well.

Therefore to make it simple for developers to pick up the ESLint integrations with Editors, by moving the package.json and associated node_modules to the top-level directory.

MozReview-Commit-ID: 1pQpd7hTQ61

--HG--
rename : tools/lint/eslint/npm-shrinkwrap.json => npm-shrinkwrap.json
rename : tools/lint/eslint/package.json => package.json
extra : rebase_source : 9d69d791f86b5c55b1fcd5f6449f0ab84e56b05c
2017-03-22 12:27:00 +01:00
Edouard Oger d09f746bfb Bug 1345955 - Update FxA profile when push notification received. r=markh
MozReview-Commit-ID: 4LL6F5Qnnj4

--HG--
extra : rebase_source : 00bc6a445d22fdfb626e7af6ad62fb750f444460
2017-03-16 17:15:18 -04:00
Mark Banner 314a1804e2 Bug 1350298 - Enable ESLint of nsContextMenu.js, fixing the last issues. Also enable it for finding globals for the browser-window environment. r=jaws
MozReview-Commit-ID: Cl8AFvzR6o8

--HG--
extra : rebase_source : 8ad57d20d53def238bbe214aa2f33f6948e49809
2017-03-24 12:04:36 +00:00
Andreas Tolfsen 869b1b932a Bug 1344748 - Rename and register Marionette prefs; r=maja_zf
This change renames the following Marionette preferences:

    	marionette.defaultPrefs.enabled	marionette.enabled
    	marionette.defaultPrefs.port	marionette.port
    	marionette.force-local		marionette.forcelocal
    	marionette.logging		marionette.log.level

The old preference names are still usable, but are henceforth considered
deprecated.  They will be removed when Firefox 55 ships.

It also registers these preferences in Firefox so that they are
discoverable through about:config.

This patch also refactors testing/marionette/components/marionette.js.

MozReview-Commit-ID: 1dAMQS2e0og

--HG--
extra : rebase_source : e59a9e656442d8e8cebeaf5e741dc8306436bc22
2017-03-09 11:12:53 +00:00
Andreas Tolfsen 55ec9308b0 Bug 1344748 - Make testing/marionette/server.js a class; r=maja_zf,whimboo
No functional changes apart from class'ifying the file and harmonising
the export symbol with the rest of the Marionette code base by renaming
the MarionetteServer class to server.TCPListener.

MozReview-Commit-ID: 8WJKoprGGvr

--HG--
extra : rebase_source : 1f706a0f5e4c9fdccac90bfc14f767763ec85257
2017-03-06 17:09:07 +00:00
Mark Banner 0eb1f2ca26 Bug 1349203 - Upgrade ESLint to version 3.18.0 to pick up performance and other fixes. Also update other dependencies for ESLint. r=mossop
MozReview-Commit-ID: C1oB0pQ3fev

--HG--
extra : rebase_source : 93e63db48f815e173b80611ae592806e4ef43fae
2017-03-21 14:50:45 +01:00
Jared Wein a54eda04ca Bug 1348068 - Enable the key-spacing rule for eslint and fix the related issues. r=standard8
Running eslint with --fix didn't fix many of the issues. The majority here had to be fixed by hand but a significant majority of the issues were related to a few files that I was able to use find-and-replace with. I regret not making this in to separate commits of the hand-fixes and the fixes from --fix but I don't recall --fix fixing any of the issues.

MozReview-Commit-ID: ANyg2qfo3Qx

--HG--
extra : rebase_source : 61d2aa91bf9474af3d72a5dea41b25dca442c1b7
2017-03-21 14:29:43 -04:00
Carsten "Tomcat" Book 62f6c37109 merge mozilla-inbound to mozilla-central a=merge 2017-03-22 14:26:27 +01:00
Mark Banner c225eb9884 Bug 1347712 - Add the tree-wide rules and config to the recommended eslint-plugin-mozilla config, to make it easier for outside projects. r=jaws
MozReview-Commit-ID: K7X57ZNppkE

--HG--
extra : rebase_source : 697cdbcbbc732a7ae5b538112f3c603943e86692
2017-03-21 15:40:33 +01:00
Mark Banner d7d8be9285 Bug 1347712 - Move toolkit/.eslintrc.js rules into a 'recommended' set within eslint-plugin-mozilla. r=jaws
MozReview-Commit-ID: Jy4apKnmWcV

--HG--
rename : toolkit/.eslintrc.js => tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
extra : rebase_source : ae0c740c1c2a9cf620c1ac34024622ade12e6fd4
2017-03-22 10:43:00 +01:00
Mark Banner d4822994da Bug 1347712 - Change the testing configurations into ESLint configurations within eslint-plugin-mozilla - structural changes. r=jaws
MozReview-Commit-ID: HmNYrVyNiMr

--HG--
rename : testing/mochitest/browser.eslintrc.js => tools/lint/eslint/eslint-plugin-mozilla/lib/configs/browser-test.js
rename : testing/mochitest/chrome.eslintrc.js => tools/lint/eslint/eslint-plugin-mozilla/lib/configs/chrome-test.js
rename : testing/mochitest/mochitest.eslintrc.js => tools/lint/eslint/eslint-plugin-mozilla/lib/configs/mochitest-test.js
rename : testing/xpcshell/xpcshell.eslintrc.js => tools/lint/eslint/eslint-plugin-mozilla/lib/configs/xpcshell-test.js
extra : rebase_source : 21380c13600e54e5fe86ef2d85518272b8a75de6
2017-03-21 16:43:01 +01:00
Geoff Brown df122d5bfa Bug 1340584 - Remove devicemanagerSUT and references to sutagent; r=wlach
sutagent is no longer built or used; devicemanagerSUT is completely
unused. After this change, devicemanagerADB is the only implementation of
devicemanager, and test harness options like --dm_trans are eliminated.
2017-03-21 12:20:01 -06:00
Mark Banner 644825e657 Bug 1344932 - Separate out the ESLint spidermonkey preprocessor to avoid breaking './mach eslint --fix' on the whole tree.' r=jryans
This doesn't allow --fix to run on the whole tree in one go, but does allow it to be run on individual directories. This
is due to an ESLint issue, where once the processor is loaded, it applies to the rest of the files.

MozReview-Commit-ID: Fqg5yK22Dhu

--HG--
rename : tools/lint/eslint/eslint-plugin-mozilla/.eslintrc.js => tools/lint/eslint/.eslintrc.js
rename : tools/lint/eslint/eslint-plugin-mozilla/lib/processors/self-hosted.js => tools/lint/eslint/eslint-plugin-spidermonkey-js/lib/processors/self-hosted.js
extra : rebase_source : 9913f929985016f4a22ff78641051dc025df14f2
2017-03-19 18:35:17 +00:00
Florian Quèze be00c3b9e8 Bug 1345294 - add an eslint rule to reject usage of {get,set}ComplexValue for nsISupportsString and suggest {get,set}StringPref instead, and make it pass, r=Mossop. 2017-03-16 19:26:02 +01:00
Florian Quèze 2ce3d7d34a Bug 1347947 - Move static checking browser mochitests to their own folder, r=Gijs.
--HG--
rename : browser/base/content/test/general/browser_misused_characters_in_strings.js => browser/base/content/test/static/browser_misused_characters_in_strings.js
rename : browser/base/content/test/general/browser_parsable_css.js => browser/base/content/test/static/browser_parsable_css.js
rename : browser/base/content/test/general/browser_parsable_script.js => browser/base/content/test/static/browser_parsable_script.js
rename : browser/base/content/test/general/bug1262648_string_with_newlines.dtd => browser/base/content/test/static/bug1262648_string_with_newlines.dtd
rename : browser/base/content/test/general/dummy_page.html => browser/base/content/test/static/dummy_page.html
rename : browser/base/content/test/general/parsingTestHelpers.jsm => browser/base/content/test/static/head.js
2017-03-16 19:26:01 +01:00
Wes Kocher efcef12931 Backed out changeset e73241bcb49a (bug 1340584) for Windows build failures a=backout CLOSED TREE
MozReview-Commit-ID: 22csfCgl7Wb
2017-03-16 10:25:15 -07:00
Geoff Brown ecc9668072 Bug 1340584 - Remove devicemanagerSUT and references to sutagent; r=wlach
sutagent is no longer built or usedr; devicemanagerSUT is completely
unused. After this change, devicemanagerADB is the only implementation of
devicemanager, and the --dmTrans and similar options have been removed
from test harnesses and mach commands.
2017-03-16 10:44:44 -06:00
Mark Banner 9500176490 Bug 1346167 - Make the eslint-plugin-mozilla environments more flexible for when they are used outside of mozilla-central. r=mossop
For now, we return virtually no globals for browser-window/places-overlay/simpletest as they aren't able to load the m-c files. Later we may want to find a way of enabling this to work for outside repositories.

MozReview-Commit-ID: 8SFVuQuEqfL

--HG--
extra : rebase_source : ff773796d14ef27b47f25b0b8503ae3f093bfb9e
2017-03-10 11:44:35 +00:00
Dave Townsend 15bd196ab5 Bug 1346014: Update the minimum required version of node to 6.9.1. r=jaws
MozReview-Commit-ID: Ex0HiKWHfwK

--HG--
extra : rebase_source : 2af12fc6b9c4153ed1b3c6d5b46ecda68c478dc2
2017-03-09 13:57:20 -08:00
Mark Banner 5420828c24 Bug 1314405 - Provide a readme for eslint-plugin-mozilla, and add some more details to its package.json. r=mossop
MozReview-Commit-ID: DdzWwWEFvf6

--HG--
extra : rebase_source : 6d1825b1007b56cd99567b46e735740ac0414757
2017-03-09 11:45:04 +00:00
Florian Quèze 9d62681259 Bug 1345253 - Use element.firstChild.remove() instead of element.removeChild(element.firstChild), r=jaws. 2017-03-08 10:17:52 +01:00
Florian Quèze e2b53c13ce Bug 1344711 - Add an eslint rule to report an error when a get*Pref call is the only instruction in a try block, r=jaws.
--HG--
extra : rebase_source : b98fc9c75089c3eeb2f1317623b08ee9cd4d1541
2017-03-07 15:29:47 +01:00
Carsten "Tomcat" Book 087da3f0d9 merge mozilla-inbound to mozilla-central a=merge 2017-03-07 15:13:31 +01:00
djmdev 9ac2a16551 Bug 1332651 - Enabled python code linting in Telemetry. r=Dexter
Enabled python code linting in Telemetry and created a new .flake8 file in
toolkit/components/telemetry.
2017-03-03 23:47:04 +05:30