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

8 Коммитов

Автор SHA1 Сообщение Дата
Henrik Skupin 4fed76fc97 Bug 1420577 - Add template literals to eslint max-len ignore list. r=ato
MozReview-Commit-ID: 8e7v7nbMgOk

--HG--
extra : rebase_source : 0eed9c4c391846cb33b900b803282b3b9e34b23b
2017-12-05 08:06:17 +01:00
Mark Banner c62d0c64f8 Bug 1371293 - Upgrade ESLint to version 4.8.0, configuration changes. r=mossop
MozReview-Commit-ID: 2YHYOLTtqxu

--HG--
extra : rebase_source : 7bbc673bb72d546e1fca63227d54b6607a4ab33e
2017-10-09 10:54:16 +01:00
Andreas Tolfsen 31adf07368 Bug 1405279 - Lint for unused variables. r=whimboo
MozReview-Commit-ID: 6hUMzC21Tl

--HG--
extra : rebase_source : 64943c3d934674066abf385035db1949c1a71891
2017-10-03 14:36:09 +01:00
Andreas Tolfsen 3e05362c6a Bug 1395176 - Add eslint rule that forbids use of var. r=automatedtester
MozReview-Commit-ID: GvuSbH6EHea

--HG--
extra : rebase_source : 4093bf49449a6537ed0b428d93767bf6906ba8ee
2017-08-30 17:36:56 +01:00
Andreas Tolfsen cfe89162b6 Bug 1391952 - Introduce camel case lint rule. r=automatedtester
The Firefox remote protocol in testing/marionette predominantly uses
camel casing in naming properties and variables.  To enforce consistency
with this practice, this patch adds an eslint rule to enforce camel case.

There are a few exceptions where we use snake case in response output.
We can disable the lint rule on an individual basis in this handful
of cases.

MozReview-Commit-ID: DL7msdriFil

--HG--
extra : rebase_source : 737791b59002027f7501e7c46bd31d7a368a9b66
2017-08-19 14:18:51 +01:00
Andreas Tolfsen 802a866314 Bug 1391699 - Disallow fallthrough case statements. r=automatedtester
We recently had a serious bug in Marionette (https://bugzil.la/1254136)
due to a case statement that fell through due to a missing "break"
statement.  This patch introduces a lint rule to prevent similar episodes
in the future.

When you do want a case to fall through, it is possible to add a comment
like this:

	switch (foo) {
	  case 1:
	    doSomething();
	    // fall through

	  case 2:
	    doSomething();
	    break;
	}

MozReview-Commit-ID: Gu8cFGsdne2

--HG--
extra : rebase_source : 8b29c663167783770d0eb0a32b7a7c2cb83a529e
2017-08-18 18:55:56 +01:00
Andreas Tolfsen cf3f40c311 Bug 1385547 - Tighten eslint rules on semicolons and init to undefined. r=automatedtester
Under testing/marionette, we always use semicolons for consistency and we
never initialise scoped variables to undefined becuase it is the default
value.  We also indent continued call expressions by four characters.

Disallowed:

	let foo = undefined;
	return foo

Allowed:

	const foo = undefined;
	let bar;
	return bar;

MozReview-Commit-ID: LgVPMqnFqNk
2017-07-31 16:01:12 +01:00
Andreas Tolfsen ee355d1fd3 Bug 1376128 - Add eslint rules for testing/marionette; r=automatedtester,standard8
The eslint rules are based on the default, non-opinionated eslint rules
used throughout mozilla-central.  The testing/marionette eslint rules
are a specialisation of these based on the current coding style used.
These should not be contradictory to the overall JS code style that can
be inferred from the existing code base.

MozReview-Commit-ID: 2rKabgXXnu4

--HG--
extra : rebase_source : 724544b60b71db7c7b093a1ed51ebc77bc66482d
2017-06-24 19:01:04 +01:00