Bug 1486725 [wpt PR 12717] - HTML: test legend and display: none, a=testonly
[gecko.git] / .eslintrc.js
blobbf45f137959c3d1740d00933c4ba6b749960232a
1 "use strict";
3 module.exports = {
4   // New rules and configurations should generally be added in
5   // tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js to
6   // allow external repositories that use the plugin to pick them up as well.
7   "extends": [
8     "plugin:mozilla/recommended"
9   ],
10   "plugins": [
11     "mozilla"
12   ],
13   // The html plugin is enabled via a command line option on eslint. To avoid
14   // bad interactions with the xml preprocessor in eslint-plugin-mozilla, we
15   // turn off processing of the html plugin for .xml files.
16   "settings": {
17     "html/xml-extensions": [ ".xhtml" ]
18   },
20   "overrides": [{
21     // eslint-plugin-html handles eol-last slightly different - it applies to
22     // each set of script tags, so we turn it off here.
23     "files": "**/*.*html",
24     "rules": {
25       "eol-last": "off",
26     }
27   }, {
28     // These xbl bindings are assumed to be in the browser-window environment,
29     // we would mark it in the files, but ESLint made this more difficult with
30     // our xml processor, so we list them here. Bug 1397874 & co are working
31     // towards removing these files completely.
32     "files": [
33       "browser/base/content/tabbrowser.xml",
34       "browser/base/content/urlbarBindings.xml",
35       "browser/components/search/content/search.xml",
36       "browser/components/translation/translation-infobar.xml",
37       "toolkit/components/prompts/content/tabprompts.xml"
38     ],
39     "env": {
40       "mozilla/browser-window": true
41     }
42   }, {
43     // XXX Bug 1486741 - We've not rolled out comma-dangle to these directories
44     // yet, so turn it off for now.
45     "files": [
46       "accessible/**",
47       "caps/**",
48       "chrome/**",
49       "devtools/**",
50       "dom/**",
51       "extensions/**",
52       "intl/**",
53       "js/**",
54       "mobile/**",
55       "security/**",
56       "storage/**",
57       "testing/**",
58       "tools/**",
59       "xpcom/**",
60     ],
61     "rules": {
62       "comma-dangle": "off",
63     }
64   }]