gecko-dev/.eslintrc.js
Mark Banner 3cdde49426 Bug 1421379 - Finish enabling ESLint's mozilla/use-services in browser/. r=mossop
MozReview-Commit-ID: HHhik24haPT

--HG--
extra : rebase_source : 31f44525daf8998bc4eb08ba3b87f473e980581e
2018-02-01 10:48:00 +00:00

59 lines
1.7 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",
}
}, {
// XXX Bug 1421969. These files/directories are still being fixed,
// so turn off mozilla/use-services for them for now.
"files": [
"devtools/**",
"extensions/pref/**",
"mobile/android/**",
"testing/**",
],
"rules": {
"mozilla/use-services": "off",
}
}, {
// XXX Bug 1434446. These directories have jsm files still being fixed, so
// turn off global no-unused-vars checking for them.
"files": [
"accessible/**/*.jsm",
"browser/components/**/*.jsm",
"browser/extensions/**/*.jsm",
"services/sync/**/*.jsm",
"toolkit/**/*.jsm",
],
"rules": {
"mozilla/mark-exported-symbols-as-used": "error",
"no-unused-vars": ["error", {
"args": "none",
"vars": "local",
"varsIgnorePattern": "^Cc|Ci|Cu|Cr|EXPORTED_SYMBOLS"
}]
}
}]
};