2016-10-18 10:38:10 +03:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
module.exports = {
|
2017-04-25 22:12:21 +03:00
|
|
|
// New rules and configurations should generally be added in
|
|
|
|
// tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js to
|
|
|
|
// allow external repositories that use the plugin to pick them up as well.
|
|
|
|
"extends": [
|
|
|
|
"plugin:mozilla/recommended"
|
|
|
|
],
|
2015-09-30 16:44:48 +03:00
|
|
|
"plugins": [
|
|
|
|
"mozilla"
|
2015-11-30 14:42:25 +03:00
|
|
|
],
|
2017-05-08 12:29:47 +03:00
|
|
|
// The html plugin is enabled via a command line option on eslint. To avoid
|
|
|
|
// bad interactions with the xml preprocessor in eslint-plugin-mozilla, we
|
|
|
|
// turn off processing of the html plugin for .xml files.
|
|
|
|
"settings": {
|
|
|
|
"html/xml-extensions": [ ".xhtml" ]
|
|
|
|
},
|
2017-10-09 12:54:16 +03:00
|
|
|
|
|
|
|
"overrides": [{
|
|
|
|
// eslint-plugin-html handles eol-last slightly different - it applies to
|
|
|
|
// each set of script tags, so we turn it off here.
|
|
|
|
"files": "**/*.*html",
|
|
|
|
"rules": {
|
|
|
|
"eol-last": "off",
|
|
|
|
}
|
2017-11-28 22:24:12 +03:00
|
|
|
}, {
|
2018-02-07 19:02:25 +03:00
|
|
|
// These xbl bindings are assumed to be in the browser-window environment,
|
|
|
|
// we would mark it in the files, but ESLint made this more difficult with
|
|
|
|
// our xml processor, so we list them here. Bug 1397874 & co are working
|
|
|
|
// towards removing these files completely.
|
|
|
|
"files": [
|
|
|
|
"browser/base/content/tabbrowser.xml",
|
|
|
|
"browser/base/content/urlbarBindings.xml",
|
|
|
|
"browser/components/search/content/search.xml",
|
|
|
|
"browser/components/translation/translation-infobar.xml",
|
|
|
|
"toolkit/components/prompts/content/tabprompts.xml"
|
|
|
|
],
|
|
|
|
"env": {
|
|
|
|
"mozilla/browser-window": true
|
|
|
|
}
|
2018-02-07 01:40:12 +03:00
|
|
|
}, {
|
|
|
|
// XXX Bug 1436303. These directories are still being fixed, so turn off
|
|
|
|
// mozilla/no-cc-etc for now.
|
|
|
|
"files": [
|
|
|
|
"devtools/**"
|
|
|
|
],
|
|
|
|
"rules": {
|
|
|
|
"mozilla/no-define-cc-etc": "off",
|
|
|
|
}
|
2018-04-09 20:54:13 +03:00
|
|
|
}, {
|
|
|
|
// XXX Bug 1452706. These directories are still being fixed, so turn off
|
|
|
|
// mozilla/require-expected-throws-or-rejects for now.
|
|
|
|
"files": [
|
|
|
|
"browser/extensions/formautofill/test/unit/test_storage_tombstones.js",
|
|
|
|
"browser/modules/test/browser/**",
|
|
|
|
"browser/tools/mozscreenshots/browser_boundingbox.js",
|
|
|
|
"devtools/client/inspector/extensions/test/head_devtools_inspector_sidebar.js",
|
|
|
|
"services/**",
|
|
|
|
"storage/test/unit/**",
|
|
|
|
"testing/marionette/test/unit/**",
|
|
|
|
"toolkit/components/**",
|
|
|
|
"toolkit/modules/tests/xpcshell/**",
|
|
|
|
"toolkit/mozapps/extensions/test/xpcshell/**"
|
|
|
|
],
|
|
|
|
"rules": {
|
|
|
|
"mozilla/require-expected-throws-or-rejects": "off",
|
|
|
|
}
|
2018-05-16 23:04:13 +03:00
|
|
|
}, {
|
|
|
|
// XXX Bug 1452706. These directories are still being fixed, so turn off
|
|
|
|
// mozilla/require-expected-throws-or-rejects for now.
|
|
|
|
"files": [
|
|
|
|
"services/fxaccounts/**",
|
|
|
|
"toolkit/components/**",
|
|
|
|
],
|
|
|
|
"rules": {
|
|
|
|
"mozilla/rejects-requires-await": "off",
|
|
|
|
}
|
2017-10-09 12:54:16 +03:00
|
|
|
}]
|
2016-10-18 10:38:10 +03:00
|
|
|
};
|