Skip to content

Commit

Permalink
Docs: Clarify that es6 env also sets ecmaVersion to 6 (#7067)
Browse files Browse the repository at this point in the history
Reading the docs, it is not clear why ESLint's parser will stop complaining about ES6 specifics when `es6` env is set and `ecmaVersion: 6` is omitted.
It is actually done [on purpose](https://github.com/eslint/eslint/blob/e1187285f137d685bcfc9e2a771fa059ef9637a9/conf/environments.js#L98-L103), but the documentation didn't mention this at all.
  • Loading branch information
astorije authored and ilyavolodin committed Sep 7, 2016
1 parent e118728 commit 6718749
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/user-guide/configuring.md
Expand Up @@ -84,7 +84,7 @@ An environment defines global variables that are predefined. The available envir
* `node` - Node.js global variables and Node.js scoping.
* `commonjs` - CommonJS global variables and CommonJS scoping (use this for browser-only code that uses Browserify/WebPack).
* `shared-node-browser` - Globals common to both Node and Browser.
* `es6` - enable all ECMAScript 6 features except for modules.
* `es6` - enable all ECMAScript 6 features except for modules (this automatically sets the `ecmaVersion` parser option to 6).
* `worker` - web workers global variables.
* `amd` - defines `require()` and `define()` as global variables as per the [amd](https://github.com/amdjs/amdjs-api/wiki/AMD) spec.
* `mocha` - adds all of the Mocha testing global variables.
Expand Down

0 comments on commit 6718749

Please sign in to comment.