From 6718749c97676eb3710e88156b59121328343550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Wed, 7 Sep 2016 09:45:42 -0400 Subject: [PATCH] Docs: Clarify that `es6` env also sets `ecmaVersion` to 6 (#7067) 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. --- docs/user-guide/configuring.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guide/configuring.md b/docs/user-guide/configuring.md index d530f5761fa..3dce91de328 100644 --- a/docs/user-guide/configuring.md +++ b/docs/user-guide/configuring.md @@ -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.