.eslintrc
author Dave Townsend <dtownsend@oxymoronical.com>
Fri, 05 Feb 2016 11:37:50 -0800
changeset 284502 ee408fd749cecb3eb67f11587ecb61a7025d559b
parent 284253 8bd1a25ac261cf03eb383264f69fb8606cabb470
permissions -rw-r--r--
Bug 1245916: Unify eslint global discovery rules. r=pbrosset While working on turning on no-undef I discovered that the various rules we have for defining globals are a little inconsistent in whether the files they load recurse through import-globals-from directives and none of them imported eslint globals directives. I think we're better off putting all this global parsing code in a single place rather than spread across multiple rules. Have one rule to turn it on for parsed files and one function to load globals from other files and make them share most of the code so we won't get inconsistent. If we find us needing to turn on/off individual features we can figure out a way to do that in the future. This patch does that, the globals.js file does all global parsing with a shared object that receives events from the AST, either through from an ESlint rule or from a simple AST walker using estraverse. MozReview-Commit-ID: 9KQZwsNNOUl

{
  // When adding items to this file please check for effects on sub-directories.
  "plugins": [
    "mozilla"
  ],
  "rules": {
    "mozilla/import-globals": 1,
  },
  "env": {
    "es6": true
  },
}