<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>tl;dr I've just landed <a moz-do-not-send="true"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=1415265">bug
1415265</a> which means you no longer need .eslintrc.js files
extending the configuration in commonly-named directories.</p>
<p>Since early in the ESLint days, we've needed extra configuration
files in our test directories to ensure that we have the right
environment and rules set up for them.</p>
<p>This is no more! Following <a moz-do-not-send="true"
href="https://github.com/eslint/eslint/issues/8813#issuecomment-456034732">a
hint</a> on the ESLint issue that was preventing this, we've
been able to work around the issue, and removed about 200 of the
.eslintrc.js files.<br>
</p>
<p>If your test directory is named matching one of regexps below,
then the configuration will be automatically applied:</p>
<ul>
<li>xpcshell:</li>
<ul>
<li>**/test*/unit*/</li>
<li>**/test*/xpcshell/</li>
</ul>
<li>Browser-chrome mochitest:</li>
<ul>
<li>**/test*/**/browser/</li>
</ul>
<li>Chrome mochitest:</li>
<ul>
<li>**/test*/chrome/</li>
</ul>
<li>Plain mochitest:</li>
<ul>
<li>**/test*/mochitest/</li>
</ul>
</ul>
<p>These can be found in the top-level .eslintrc.js file.</p>
<p>I've commented on revisions already in Phabricator where I know
they are now adding files unnecessarily. I'll keep an eye out for
any more.<br>
</p>
<p>For the next steps, I'm planning on making more of our
directories conform to this format where it makes sense. A lot of
the remaining cases either have no named subdirectory (e.g. just
test/) or are sharing multiple test types in one directory (this
latter case makes it very hard to get the ESLint configuration
right).<br>
</p>
<p>Mark<br>
</p>
</body>
</html>