Blame .eslintrc.js

Packit f0b94e
"use strict";
Packit f0b94e
Packit f0b94e
module.exports = {
Packit f0b94e
  // New rules and configurations should generally be added in
Packit f0b94e
  // tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js to
Packit f0b94e
  // allow external repositories that use the plugin to pick them up as well.
Packit f0b94e
  "extends": [
Packit f0b94e
    "plugin:mozilla/recommended"
Packit f0b94e
  ],
Packit f0b94e
  "plugins": [
Packit f0b94e
    "mozilla"
Packit f0b94e
  ],
Packit f0b94e
  // The html plugin is enabled via a command line option on eslint. To avoid
Packit f0b94e
  // bad interactions with the xml preprocessor in eslint-plugin-mozilla, we
Packit f0b94e
  // turn off processing of the html plugin for .xml files.
Packit f0b94e
  "settings": {
Packit f0b94e
    "html/xml-extensions": [ ".xhtml" ]
Packit f0b94e
  },
Packit f0b94e
Packit f0b94e
  "overrides": [{
Packit f0b94e
    // eslint-plugin-html handles eol-last slightly different - it applies to
Packit f0b94e
    // each set of script tags, so we turn it off here.
Packit f0b94e
    "files": "**/*.*html",
Packit f0b94e
    "rules": {
Packit f0b94e
      "eol-last": "off",
Packit f0b94e
    }
Packit f0b94e
  }, {
Packit f0b94e
    // These xbl bindings are assumed to be in the browser-window environment,
Packit f0b94e
    // we would mark it in the files, but ESLint made this more difficult with
Packit f0b94e
    // our xml processor, so we list them here. Bug 1397874 & co are working
Packit f0b94e
    // towards removing these files completely.
Packit f0b94e
    "files": [
Packit f0b94e
      "browser/base/content/tabbrowser.xml",
Packit f0b94e
      "browser/base/content/urlbarBindings.xml",
Packit f0b94e
      "browser/components/search/content/search.xml",
Packit f0b94e
      "browser/components/translation/translation-infobar.xml",
Packit f0b94e
      "toolkit/components/prompts/content/tabprompts.xml"
Packit f0b94e
    ],
Packit f0b94e
    "env": {
Packit f0b94e
      "mozilla/browser-window": true
Packit f0b94e
    }
Packit f0b94e
  },{
Packit f0b94e
    // XXX Bug 1421969. These files/directories are still being fixed,
Packit f0b94e
    // so turn off mozilla/use-services for them for now.
Packit f0b94e
    "files": [
Packit f0b94e
      "extensions/pref/**",
Packit f0b94e
    ],
Packit f0b94e
    "rules": {
Packit f0b94e
      "mozilla/use-services": "off",
Packit f0b94e
    }
Packit f0b94e
  }, {
Packit f0b94e
    // XXX Bug 1436303. These directories are still being fixed, so turn off
Packit f0b94e
    // mozilla/no-cc-etc for now.
Packit f0b94e
    "files": [
Packit f0b94e
      "devtools/**"
Packit f0b94e
    ],
Packit f0b94e
    "rules": {
Packit f0b94e
      "mozilla/no-define-cc-etc": "off",
Packit f0b94e
    }
Packit f0b94e
  }]
Packit f0b94e
};