mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
a32bc883e7
MozReview-Commit-ID: ERT1Fili25d --HG-- extra : rebase_source : c62ad4e97fc5da7c59cbb03ba08928f7bbe5be6b
62 lines
1.9 KiB
JavaScript
62 lines
1.9 KiB
JavaScript
"use strict";
|
|
|
|
module.exports = {
|
|
// 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"
|
|
],
|
|
"plugins": [
|
|
"mozilla"
|
|
],
|
|
// 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" ]
|
|
},
|
|
|
|
"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",
|
|
}
|
|
}, {
|
|
// 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
|
|
}
|
|
},{
|
|
// XXX Bug 1421969. These files/directories are still being fixed,
|
|
// so turn off mozilla/use-services for them for now.
|
|
"files": [
|
|
"extensions/pref/**",
|
|
],
|
|
"rules": {
|
|
"mozilla/use-services": "off",
|
|
}
|
|
}, {
|
|
// 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",
|
|
}
|
|
}]
|
|
};
|