0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/tools/eslint/conf/environments.js
Rich Trott 05b566a5ef tools: update ESLint to 3.3.0 and enable rules
Update ESLint 3.3.0 and update .eslintrc:

* replace deprecated no-negated-in-lhs rule with no-unsafe-negation
  * http://eslint.org/docs/rules/no-negated-in-lhs
  * http://eslint.org/docs/rules/no-unsafe-negation
* enable no-template-curly-in-string
  * http://eslint.org/docs/rules/no-template-curly-in-string
* enable no-global-assign
  * http://eslint.org/docs/rules/no-global-assign
* enable func-call-spacing
  * http://eslint.org/docs/rules/func-call-spacing

PR-URL: https://github.com/nodejs/node/pull/8097
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-08-16 15:16:10 -07:00

108 lines
2.2 KiB
JavaScript

/**
* @fileoverview Defines environment settings and globals.
* @author Elan Shanker
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const globals = require("globals");
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
module.exports = {
builtin: globals.es5,
browser: {
globals: globals.browser
},
node: {
globals: globals.node,
parserOptions: {
ecmaFeatures: {
globalReturn: true
}
}
},
commonjs: {
globals: globals.commonjs,
parserOptions: {
ecmaFeatures: {
globalReturn: true
}
}
},
"shared-node-browser": {
globals: globals["shared-node-browser"]
},
worker: {
globals: globals.worker
},
amd: {
globals: globals.amd
},
mocha: {
globals: globals.mocha
},
jasmine: {
globals: globals.jasmine
},
jest: {
globals: globals.jest
},
phantomjs: {
globals: globals.phantomjs
},
jquery: {
globals: globals.jquery
},
qunit: {
globals: globals.qunit
},
prototypejs: {
globals: globals.prototypejs
},
shelljs: {
globals: globals.shelljs
},
meteor: {
globals: globals.meteor
},
mongo: {
globals: globals.mongo
},
protractor: {
globals: globals.protractor
},
applescript: {
globals: globals.applescript
},
nashorn: {
globals: globals.nashorn
},
serviceworker: {
globals: globals.serviceworker
},
atomtest: {
globals: globals.atomtest
},
embertest: {
globals: globals.embertest
},
webextensions: {
globals: globals.webextensions
},
es6: {
globals: globals.es6,
parserOptions: {
ecmaVersion: 6
}
},
greasemonkey: {
globals: globals.greasemonkey
}
};