Repository: eslint/eslint
Pull request #11655 (2019-04-26 13:06:42)

Docs: replace `var` with `const` in code examples
<!--
    ESLint adheres to the [JS Foundation Code of Conduct](https://js.foundation/community/code-of-conduct).
-->

**What is the purpose of this pull request? (put an "X" next to item)**

[X ] Documentation update
[ ] Bug fix ([template](https://raw.githubusercontent.com/eslint/eslint/master/templates/bug-report.md))
[ ] New rule ([template](https://raw.githubusercontent.com/eslint/eslint/master/templates/rule-proposal.md))
[ ] Changes an existing rule ([template](https://raw.githubusercontent.com/eslint/eslint/master/templates/rule-change-proposal.md))
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

<!--
    If the item you've checked above has a template, please paste the template questions below and answer them. (If this pull request is addressing an issue, you can just paste a link to the issue here instead.)
-->

<!--
    Please ensure your pull request is ready:

    - Read the pull request guide (https://eslint.org/docs/developer-guide/contributing/pull-requests)
    - Include tests for this change
    - Update documentation for this change (if appropriate)
-->

<!--
    The following is required for all pull requests:
-->

**What changes did you make? (Give an overview)**


**Is there anything you'd like reviewers to focus on?**




jsf-clabot: [![CLA assistant check](https://cla.js.foundation/pull/badge/not_signed)](https://cla.js.foundation/eslint/eslint?pullRequest=11655) <br/>Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our [Contributor License Agreement](https://cla.js.foundation/eslint/eslint?pullRequest=11655) before we can accept your contribution.<br/>

Patch:
diff --git a/README.md b/README.md
index 1cd33338d..e9f99834c 100644
--- a/README.md
+++ b/README.md
@@ -247,7 +247,7 @@ The following companies, organizations, and individuals support ESLint's ongoing
 <h3>Gold Sponsors</h3>
 <p><a href="https://www.gitkraken.com/"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Flogo.clearbit.com%2Fgitkraken.com&height=96" alt="GitKraken" height="96"></a> <a href="https://code.facebook.com/projects/"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Fres.cloudinary.com%2Fopencollective%2Fimage%2Fupload%2Fv1508519428%2FS9gk78AS_400x400_fulq2l.jpg&height=96" alt="Facebook Open Source" height="96"></a> <a href="https://badoo.com/team?utm_source=eslint"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Fopencollective-production.s3-us-west-1.amazonaws.com%2Fbbdb9cc0-3b5d-11e9-9537-ad85092287b8.png&height=96" alt="Badoo" height="96"></a> <a href="http://salesforce.com"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Flogo.clearbit.com%2Fsalesforce.com&height=96" alt="Salesforce" height="96"></a></p><h3>Silver Sponsors</h3>
 <p><a href="https://www.ampproject.org/"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Fopencollective-production.s3-us-west-1.amazonaws.com%2F68ed8b70-ebf2-11e6-9958-cb7e79408c56.png&height=96" alt="AMP Project" height="64"></a></p><h3>Bronze Sponsors</h3>
-<p><a href="http://faithlife.com/ref/about"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Flogo.clearbit.com%2Ffaithlife.com&height=96" alt="Faithlife" height="32"></a> <a href="https://jsheroes.io/"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Flogo.clearbit.com%2Fjsheroes.io&height=96" alt="JSHeroes " height="32"></a> <a href="http://www.firesticktricks.com"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Flogo.clearbit.com%2Ffiresticktricks.com&height=96" alt="Fire Stick Tricks" height="32"></a> <a href="https://www.marfeel.com/"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Fopencollective-production.s3-us-west-1.amazonaws.com%2F431b60c0-6062-11e9-b486-e1bb2d3f0d94.png&height=96" alt="Marfeel" height="32"></a> <a href="https://usave.co.uk/utilities/broadband/"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Flogo.clearbit.com%2Fusave.co.uk&height=96" alt="Usave" height="32"></a> <a href="https://tekhattan.com"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Fopencollective-production.s3-us-west-1.amazonaws.com%2F31835450-5a98-11e9-adb1-e17fccd4c65e.png&height=96" alt="TekHattan" height="32"></a> <a href="https://themeisle.com"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Flogo.clearbit.com%2Fthemeisle.com&height=96" alt="ThemeIsle" height="32"></a></p>
+<p><a href="https://faithlife.com/ref/about"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Flogo.clearbit.com%2Ffaithlife.com&height=96" alt="Faithlife" height="32"></a> <a href="https://jsheroes.io/"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Flogo.clearbit.com%2Fjsheroes.io&height=96" alt="JSHeroes " height="32"></a> <a href="http://www.firesticktricks.com"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Flogo.clearbit.com%2Ffiresticktricks.com&height=96" alt="Fire Stick Tricks" height="32"></a> <a href="https://www.marfeel.com/"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Fopencollective-production.s3-us-west-1.amazonaws.com%2F431b60c0-6062-11e9-b486-e1bb2d3f0d94.png&height=96" alt="Marfeel" height="32"></a> <a href="https://usave.co.uk/utilities/broadband/"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Flogo.clearbit.com%2Fusave.co.uk&height=96" alt="Usave" height="32"></a> <a href="https://tekhattan.com"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Fopencollective-production.s3-us-west-1.amazonaws.com%2F31835450-5a98-11e9-adb1-e17fccd4c65e.png&height=96" alt="TekHattan" height="32"></a> <a href="https://themeisle.com"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Flogo.clearbit.com%2Fthemeisle.com&height=96" alt="ThemeIsle" height="32"></a></p>
 <!--sponsorsend-->
 
 ## Technology Sponsors
diff --git a/docs/developer-guide/nodejs-api.md b/docs/developer-guide/nodejs-api.md
index 6907e03c4..74b4796e9 100644
--- a/docs/developer-guide/nodejs-api.md
+++ b/docs/developer-guide/nodejs-api.md
@@ -38,9 +38,9 @@ While ESLint is designed to be run on the command line, it's possible to use ESL
 The `SourceCode` type represents the parsed source code that ESLint executes on. It's used internally in ESLint and is also available so that already-parsed code can be used. You can create a new instance of `SourceCode` by passing in the text string representing the code and an abstract syntax tree (AST) in [ESTree](https://github.com/estree/estree) format (including location information, range information, comments, and tokens):
 
 ```js
-var SourceCode = require("eslint").SourceCode;
+const SourceCode = require("eslint").SourceCode;
 
-var code = new SourceCode("var foo = bar;", ast);
+const code = new SourceCode("var foo = bar;", ast);
 ```
 
 The `SourceCode` constructor throws an error if the AST is missing any of the required information.
@@ -49,9 +49,9 @@ The `SourceCode` constructor strips Unicode BOM.
 Please note the AST also should be parsed from stripped text.
 
 ```js
-var SourceCode = require("eslint").SourceCode;
+const SourceCode = require("eslint").SourceCode;
 
-var code = new SourceCode("\uFEFFvar foo = bar;", ast);
+const code = new SourceCode("\uFEFFvar foo = bar;", ast);
 
 assert(code.hasBOM === true);
 assert(code.text === "var foo = bar;");
@@ -62,12 +62,12 @@ assert(code.text === "var foo = bar;");
 This is a static function on `SourceCode` that is used to split the source code text into an array of lines.
 
 ```js
-var SourceCode = require("eslint").SourceCode;
+const SourceCode = require("eslint").SourceCode;
 
-var code = "var a = 1;\nvar b = 2;"
+const code = "var a = 1;\nvar b = 2;"
 
 // split code into an array
-var codeLines = SourceCode.splitLines(code);
+const codeLines = SourceCode.splitLines(code);
 
 /*
     Value of codeLines will be
@@ -83,8 +83,8 @@ var codeLines = SourceCode.splitLines(code);
 The `Linter` object does the actual evaluation of the JavaScript code. It doesn't do any filesystem operations, it simply parses and reports on the code. In particular, the `Linter` object does not process configuration objects or files. You can retrieve instances of `Linter` like this:
 
 ```js
-var Linter = require("eslint").Linter;
-var linter = new Linter();
+const Linter = require("eslint").Linter;
+const linter = new Linter();
 ```
 
 ### Linter#verify
@@ -106,10 +106,10 @@ If the third argument is a string, it is interpreted as the `filename`.
 You can call `verify()` like this:
 
 ```js
-var Linter = require("eslint").Linter;
-var linter = new Linter();
+const Linter = require("eslint").Linter;
+const linter = new Linter();
 
-var messages = linter.verify("var foo;", {
+const messages = linter.verify("var foo;", {
     rules: {
         semi: 2
     }
@@ -117,13 +117,13 @@ var messages = linter.verify("var foo;", {
 
 // or using SourceCode
 
-var Linter = require("eslint").Linter,
+const Linter = require("eslint").Linter,
     linter = new Linter(),
     SourceCode = require("eslint").SourceCode;
 
-var code = new SourceCode("var foo = bar;", ast);
+const code = new SourceCode("var foo = bar;", ast);
 
-var messages = linter.verify(code, {
+const messages = linter.verify(code, {
     rules: {
         semi: 2
     }
@@ -165,16 +165,16 @@ Linting message objects have a deprecated `source` property. This property **wil
 You can also get an instance of the `SourceCode` object used inside of `linter` by using the `getSourceCode()` method:
 
 ```js
-var Linter = require("eslint").Linter;
-var linter = new Linter();
+const Linter = require("eslint").Linter;
+const linter = new Linter();
 
-var messages = linter.verify("var foo = bar;", {
+const messages = linter.verify("var foo = bar;", {
     rules: {
         semi: 2
     }
 }, { filename: "foo.js" });
 
-var code = linter.getSourceCode();
+const code = linter.getSourceCode();
 
 console.log(code.text);     // "var foo = bar;"
 ```
@@ -186,10 +186,10 @@ In this way, you can retrieve the text and AST used for the last run of `linter.
 This method is similar to verify except that it also runs autofixing logic, similar to the `--fix` flag on the command line. The result object will contain the autofixed code, along with any remaining linting messages for the code that were not autofixed.
 
 ```js
-var Linter = require("eslint").Linter;
-var linter = new Linter();
+const Linter = require("eslint").Linter;
+const linter = new Linter();
 
-var messages = linter.verifyAndFix("var foo", {
+const messages = linter.verifyAndFix("var foo", {
     rules: {
         semi: 2
     }
@@ -313,9 +313,9 @@ Linter.version; // => '4.5.0'
 The `eslint.linter` object (deprecated) is an instance of the `Linter` class as defined [above](#linter). `eslint.linter` exists for backwards compatibility, but we do not recommend using it because any mutations to it are shared among every module that uses `eslint`. Instead, please create your own instance of `eslint.Linter`.
 
 ```js
-var linter = require("eslint").linter;
+const linter = require("eslint").linter;
 
-var messages = linter.verify("var foo;", {
+const messages = linter.verify("var foo;", {
     rules: {
         semi: 2
     }
@@ -331,7 +331,7 @@ The primary Node.js API is `CLIEngine`, which is the underlying utility that run
 You can get a reference to the `CLIEngine` by doing the following:
 
 ```js
-var CLIEngine = require("eslint").CLIEngine;
+const CLIEngine = require("eslint").CLIEngine;
 ```
 
 The `CLIEngine` is a constructor, and you can create a new instance by passing in the options you want to use. The available options are:
@@ -366,9 +366,9 @@ To programmatically set `.eslintrc.*` options not supported above (such as `exte
 For example:
 
 ```js
-var CLIEngine = require("eslint").CLIEngine;
+const CLIEngine = require("eslint").CLIEngine;
 
-var cli = new CLIEngine({
+const cli = new CLIEngine({
     baseConfig: {
         extends: ["eslint-config-shared"],
         settings: {
@@ -396,9 +396,9 @@ Note: Currently `CLIEngine` does not validate options passed to it, but may star
 If you want to lint one or more files, use the `executeOnFiles()` method. This method accepts a single argument, which is an array of files and/or directories to traverse for files. You can pass the same values as you would using the ESLint command line interface, such as `"."` to search all JavaScript files in the current directory. Here's an example:
 
 ```js
-var CLIEngine = require("eslint").CLIEngine;
+const CLIEngine = require("eslint").CLIEngine;
 
-var cli = new CLIEngine({
+const cli = new CLIEngine({
     envs: ["browser", "mocha"],
     useEslintrc: false,
     rules: {
@@ -407,7 +407,7 @@ var cli = new CLIEngine({
 });
 
 // lint myfile.js and all files in lib/
-var report = cli.executeOnFiles(["myfile.js", "lib/"]);
+const report = cli.executeOnFiles(["myfile.js", "lib/"]);
 ```
 
 The return value is an object containing the results of the linting operation. Here's an example of a report object:
@@ -444,9 +444,9 @@ The return value is an object containing the results of the linting operation. H
 You can also pass `fix: true` when instantiating the `CLIEngine` in order to have it figure out what fixes can be applied.
 
 ```js
-var CLIEngine = require("eslint").CLIEngine;
+const CLIEngine = require("eslint").CLIEngine;
 
-var cli = new CLIEngine({
+const cli = new CLIEngine({
     envs: ["browser", "mocha"],
     fix: true, // difference from last example
     useEslintrc: false,
@@ -457,7 +457,7 @@ var cli = new CLIEngine({
 });
 
 // lint myfile.js and all files in lib/
-var report = cli.executeOnFiles(["myfile.js", "lib/"]);
+const report = cli.executeOnFiles(["myfile.js", "lib/"]);
 ```
 
 ```js
@@ -551,13 +551,13 @@ Once you get a report object, it's up to you to determine how to output the resu
 You can pass filesystem-style or glob patterns to ESLint and have it function properly. In order to achieve this, ESLint must resolve non-glob patterns into glob patterns before determining which files to execute on. The `resolveFileGlobPatterns()` methods uses the current settings from `CLIEngine` to resolve non-glob patterns into glob patterns. Pass an array of patterns that might be passed to the ESLint CLI and it will return an array of glob patterns that mean the same thing. Here's an example:
 
 ```js
-var CLIEngine = require("eslint").CLIEngine;
+const CLIEngine = require("eslint").CLIEngine;
 
-var cli = new CLIEngine({
+const cli = new CLIEngine({
 });
 
 // pass an array of patterns
-var globPatterns = cli.resolveFileGlobPatterns(["."]);
+const globPatterns = cli.resolveFileGlobPatterns(["."]);
 console.log(globPatterns[i]);       // ["**/*.js"]
 ```
 
@@ -566,9 +566,9 @@ console.log(globPatterns[i]);       // ["**/*.js"]
 If you want to retrieve a configuration object for a given file, use the `getConfigForFile()` method. This method accepts one argument, a file path, and returns an object represented the calculated configuration of the file. Here's an example:
 
 ```js
-var CLIEngine = require("eslint").CLIEngine;
+const CLIEngine = require("eslint").CLIEngine;
 
-var cli = new CLIEngine({
+const cli = new CLIEngine({
     envs: ["browser", "mocha"],
     useEslintrc: false,
     rules: {
@@ -576,16 +576,16 @@ var cli = new CLIEngine({
     }
 });
 
-var config = cli.getConfigForFile("myfile.js");
+const config = cli.getConfigForFile("myfile.js");
 ```
 
 Once you have the configuration information, you can pass it into the `linter` object:
 
 ```js
-var CLIEngine = require("eslint").CLIEngine,
+const CLIEngine = require("eslint").CLIEngine,
     linter = require("eslint").linter;
 
-var cli = new CLIEngine({
+const cli = new CLIEngine({
     envs: ["browser", "mocha"],
     useEslintrc: false,
     rules: {
@@ -593,9 +593,9 @@ var cli = new CLIEngine({
     }
 });
 
-var config = cli.getConfigForFile("myfile.js");
+const config = cli.getConfigForFile("myfile.js");
 
-var messages = linter.verify('var foo;', config);
+const messages = linter.verify('var foo;', config);
 ```
 
 ### CLIEngine#executeOnText()
@@ -603,9 +603,9 @@ var messages = linter.verify('var foo;', config);
 If you already have some text to lint, then you can use the `executeOnText()` method to lint that text. The linter will assume that the text is a file in the current working directory, and so will still obey any `.eslintrc` and `.eslintignore` files that may be present. Here's an example:
 
 ```js
-var CLIEngine = require("eslint").CLIEngine;
+const CLIEngine = require("eslint").CLIEngine;
 
-var cli = new CLIEngine({
+const cli = new CLIEngine({
     envs: ["browser", "mocha"],
     useEslintrc: false,
     rules: {
@@ -615,7 +615,7 @@ var cli = new CLIEngine({
 
 // lint the supplied text and optionally set
 // a filename that is displayed in the report
-var report = cli.executeOnText("var foo = 'bar';", "foo.js");
+const report = cli.executeOnText("var foo = 'bar';", "foo.js");
 ```
 
 The `report` returned from `executeOnText()` is in the same format as from `executeOnFiles()`, but there is only ever one result in `report.results`.
@@ -627,8 +627,8 @@ If a filename in the optional second parameter matches a file that is configured
 Loads a plugin from configuration object with specified name. Name can include plugin prefix ("eslint-plugin-")
 
 ```js
-var CLIEngine = require("eslint").CLIEngine;
-var cli = new CLIEngine({
+const CLIEngine = require("eslint").CLIEngine;
+const cli = new CLIEngine({
     ignore: true
 });
 cli.addPlugin("eslint-plugin-processor", {
@@ -650,14 +650,14 @@ cli.addPlugin("eslint-plugin-processor", {
 Checks if a given path is ignored by ESLint.
 
 ```js
-var CLIEngine = require("eslint").CLIEngine;
+const CLIEngine = require("eslint").CLIEngine;
 
-var cli = new CLIEngine({
+const cli = new CLIEngine({
     ignore: true,
     ignorePath: ".customIgnoreFile"
 });
 
-var isIgnored = cli.isPathIgnored("foo/bar.js");
+const isIgnored = cli.isPathIgnored("foo/bar.js");
 ```
 
 ### CLIEngine#getFormatter()
@@ -680,9 +680,9 @@ Retrieves a formatter, which you can then use to format a report object. The arg
 or the full path to a JavaScript file containing a custom formatter. You can also omit the argument to retrieve the default formatter.
 
 ```js
-var CLIEngine = require("eslint").CLIEngine;
+const CLIEngine = require("eslint").CLIEngine;
 
-var cli = new CLIEngine({
+const cli = new CLIEngine({
     envs: ["browser", "mocha"],
     useEslintrc: false,
     rules: {
@@ -691,14 +691,14 @@ var cli = new CLIEngine({
 });
 
 // lint myfile.js and all files in lib/
-var report = cli.executeOnFiles(["myfile.js", "lib/"]);
+const report = cli.executeOnFiles(["myfile.js", "lib/"]);
 
 // get the default formatter
-var formatter = cli.getFormatter();
+const formatter = cli.getFormatter();
 
 // Also could do...
-// var formatter = cli.getFormatter("compact");
-// var formatter = cli.getFormatter("./my/formatter.js");
+// const formatter = cli.getFormatter("compact");
+// const formatter = cli.getFormatter("./my/formatter.js");
 
 // output to console
 console.log(formatter(report.results));
@@ -708,7 +708,7 @@ console.log(formatter(report.results));
 
 ```js
 // get the default formatter by calling the static function
-var formatter = CLIEngine.getFormatter();
+const formatter = CLIEngine.getFormatter();
 ```
 
 **Important:** You must pass in the `results` property of the report. Passing in `report` directly will result in an error.
@@ -718,9 +718,9 @@ var formatter = CLIEngine.getFormatter();
 This is a static function on `CLIEngine`. It can be used to filter out all the non error messages from the report object.
 
 ```js
-var CLIEngine = require("eslint").CLIEngine;
+const CLIEngine = require("eslint").CLIEngine;
 
-var cli = new CLIEngine({
+const cli = new CLIEngine({
     envs: ["browser", "mocha"],
     useEslintrc: false,
     rules: {
@@ -729,10 +729,10 @@ var cli = new CLIEngine({
 });
 
 // lint myfile.js and all files in lib/
-var report = cli.executeOnFiles(["myfile.js", "lib/"]);
+const report = cli.executeOnFiles(["myfile.js", "lib/"]);
 
 // only get the error messages
-var errorReport = CLIEngine.getErrorResults(report.results)
+const errorReport = CLIEngine.getErrorResults(report.results)
 ```
 
 **Important:** You must pass in the `results` property of the report. Passing in `report` directly will result in an error.
@@ -742,9 +742,9 @@ var errorReport = CLIEngine.getErrorResults(report.results)
 This is a static function on `CLIEngine` that is used to output fixes from `report` to disk. It does by looking for files that have an `output` property in their results. Here's an example:
 
 ```js
-var CLIEngine = require("eslint").CLIEngine;
+const CLIEngine = require("eslint").CLIEngine;
 
-var cli = new CLIEngine({
+const cli = new CLIEngine({
     envs: ["browser", "mocha"],
     fix: true,
     useEslintrc: false,
@@ -754,7 +754,7 @@ var cli = new CLIEngine({
 });
 
 // lint myfile.js and all files in lib/
-var report = cli.executeOnFiles(["myfile.js", "lib/"]);
+const report = cli.executeOnFiles(["myfile.js", "lib/"]);
 
 // output fixes to disk
 CLIEngine.outputFixes(report);
diff --git a/docs/user-guide/migrating-to-6.0.0.md b/docs/user-guide/migrating-to-6.0.0.md
index 775d19e7e..e3436de10 100644
--- a/docs/user-guide/migrating-to-6.0.0.md
+++ b/docs/user-guide/migrating-to-6.0.0.md
@@ -34,7 +34,7 @@ The lists below are ordered roughly by the number of users each change is expect
 
 ## <a name="drop-node-6"></a> Node.js 6 is no longer supported
 
-As of April 2018, Node.js 6 will be at EOL and will no longer be receiving security updates. As a result, we have decided to drop support for it in ESLint v6. We now support the following versions of Node.js:
+As of April 2019, Node.js 6 will be at EOL and will no longer be receiving security updates. As a result, we have decided to drop support for it in ESLint v6. We now support the following versions of Node.js:
 
 * Node.js 8 (8.10.0 and above)
 * Node.js 10 (10.13.0 and above)
@@ -46,14 +46,11 @@ As of April 2018, Node.js 6 will be at EOL and will no longer be receiving secur
 
 ## <a name="eslint-recommended-changes"/> `eslint:recommended` has been updated
 
-**Note:** This update is planned, but has not been implemented in the latest alpha release yet.
-
 The following rules have been added to the [`eslint:recommended`](https://eslint.org/docs/user-guide/configuring#using-eslintrecommended) config:
 
-<!-- FIXME: this list is not final yet, see https://github.com/eslint/eslint/issues/10768 -->
-
 * [`no-async-promise-executor`](https://eslint.org/docs/rules/no-async-promise-executor) disallows using an `async` function as the argument to the `Promise` constructor, which is usually a bug.
 * [`no-misleading-character-class`](https://eslint.org/docs/rules/no-misleading-character-class) reports character classes in regular expressions that might not behave as expected.
+* [`no-prototype-builtins`](https://eslint.org/docs/rules/no-prototype-builtins) reports method calls like `foo.hasOwnProperty("bar")` (which are a frequent source of bugs), and suggests that they be replaced with `Object.prototype.hasOwnProperty.call(foo, "bar")` instead.
 * [`no-shadow-restricted-names`](https://eslint.org/docs/rules/no-shadow-restricted-names) disallows shadowing variables like `undefined` (e.g. with code like `let undefined = 5;`), since is likely to confuse readers.
 * [`no-useless-catch`](https://eslint.org/docs/rules/no-useless-catch) reports `catch` clauses that are redundant and can be removed from the code without changing its behavior.
 * [`no-with`](https://eslint.org/docs/rules/no-with) disallows use of the [`with` statement](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/with), which can make code difficult to understand and cause compatibility problems.
@@ -115,8 +112,6 @@ As a rule of thumb: With ESLint v6, plugins should always be installed locally,
 
 ## <a name="no-redeclare-updates"></a> The `no-redeclare` rule is now more strict by default
 
-**Note:** This update is planned, but has not been implemented in the latest alpha release yet.
-
 The default options for the [`no-redeclare`](https://eslint.org/docs/rules/no-redeclare) rule have changed from `{ builtinGlobals: false }` to `{ builtinGlobals: true }`. Additionally, the `no-redeclare` rule will now report an error for globals enabled by comments like `/* global foo */` if those globals were already enabled through configuration anyway.
 
 **To address:**
@@ -292,8 +287,6 @@ In some cases, rule schemas can use the `default` keyword to automatically speci
 
 ## <a name="eslintExplicitGlobalComment"></a> The `eslintExplicitGlobalComment` scope analysis property has been removed
 
-**Note:** This update is planned, but has not been implemented in the latest alpha release yet.
-
 Previously, ESLint would add an `eslintExplicitGlobalComment` property to `Variable` objects in scope analysis to indicate that a variable was introduced as a result of a `/* global */` comment. This property was undocumented, and the ESLint team was unable to find any usage of the property outside of ESLint core. The property has been removed in ESLint v6, and replaced with the `eslintExplicitGlobalComments` property, which can contain a list of all `/* global */` comments if a variable was declared with more than one of them.
 
 **To address:** If you maintain a rule that uses the `eslintExplicitGlobalComment` property, update it to use the `eslintExplicitGlobalComments` property as a list instead.
diff --git a/lib/rules/no-cond-assign.js b/lib/rules/no-cond-assign.js
index aed3e4a7a..62a73a6b1 100644
--- a/lib/rules/no-cond-assign.js
+++ b/lib/rules/no-cond-assign.js
@@ -86,7 +86,7 @@ module.exports = {
                 nextToken = sourceCode.getTokenAfter(node, 1);
 
             return astUtils.isParenthesised(sourceCode, node) &&
-                astUtils.isOpeningParenToken(previousToken) && previousToken.range[1] <= node.range[0] &&
+                previousToken && astUtils.isOpeningParenToken(previousToken) && previousToken.range[1] <= node.range[0] &&
                 astUtils.isClosingParenToken(nextToken) && nextToken.range[0] >= node.range[1];
         }
 
diff --git a/lib/rules/no-throw-literal.js b/lib/rules/no-throw-literal.js
index c4a6b86bf..bf1692702 100644
--- a/lib/rules/no-throw-literal.js
+++ b/lib/rules/no-throw-literal.js
@@ -22,7 +22,12 @@ module.exports = {
             url: "https://eslint.org/docs/rules/no-throw-literal"
         },
 
-        schema: []
+        schema: [],
+
+        messages: {
+            object: "Expected an error object to be thrown.",
+            undef: "Do not throw undefined."
+        }
     },
 
     create(context) {
@@ -31,10 +36,10 @@ module.exports = {
 
             ThrowStatement(node) {
                 if (!astUtils.couldBeError(node.argument)) {
-                    context.report({ node, message: "Expected an object to be thrown." });
+                    context.report({ node, messageId: "object" });
                 } else if (node.argument.type === "Identifier") {
                     if (node.argument.name === "undefined") {
-                        context.report({ node, message: "Do not throw undefined." });
+                        context.report({ node, messageId: "undef" });
                     }
                 }
 
diff --git a/lib/rules/object-curly-spacing.js b/lib/rules/object-curly-spacing.js
index bde4f1425..c4f2077f6 100644
--- a/lib/rules/object-curly-spacing.js
+++ b/lib/rules/object-curly-spacing.js
@@ -82,7 +82,7 @@ module.exports = {
                     token: token.value
                 },
                 fix(fixer) {
-                    const nextToken = context.getSourceCode().getTokenAfter(token);
+                    const nextToken = context.getSourceCode().getTokenAfter(token, { includeComments: true });
 
                     return fixer.removeRange([token.range[1], nextToken.range[0]]);
                 }
@@ -104,7 +104,7 @@ module.exports = {
                     token: token.value
                 },
                 fix(fixer) {
-                    const previousToken = context.getSourceCode().getTokenBefore(token);
+                    const previousToken = context.getSourceCode().getTokenBefore(token, { includeComments: true });
 
                     return fixer.removeRange([previousToken.range[1], token.range[0]]);
                 }
@@ -225,8 +225,8 @@ module.exports = {
 
             const first = sourceCode.getFirstToken(node),
                 last = getClosingBraceOfObject(node),
-                second = sourceCode.getTokenAfter(first),
-                penultimate = sourceCode.getTokenBefore(last);
+                second = sourceCode.getTokenAfter(first, { includeComments: true }),
+                penultimate = sourceCode.getTokenBefore(last, { includeComments: true });
 
             validateBraceSpacing(node, first, second, penultimate, last);
         }
@@ -253,8 +253,8 @@ module.exports = {
 
             const first = sourceCode.getTokenBefore(firstSpecifier),
                 last = sourceCode.getTokenAfter(lastSpecifier, astUtils.isNotCommaToken),
-                second = sourceCode.getTokenAfter(first),
-                penultimate = sourceCode.getTokenBefore(last);
+                second = sourceCode.getTokenAfter(first, { includeComments: true }),
+                penultimate = sourceCode.getTokenBefore(last, { includeComments: true });
 
             validateBraceSpacing(node, first, second, penultimate, last);
         }
@@ -273,8 +273,8 @@ module.exports = {
                 lastSpecifier = node.specifiers[node.specifiers.length - 1],
                 first = sourceCode.getTokenBefore(firstSpecifier),
                 last = sourceCode.getTokenAfter(lastSpecifier, astUtils.isNotCommaToken),
-                second = sourceCode.getTokenAfter(first),
-                penultimate = sourceCode.getTokenBefore(last);
+                second = sourceCode.getTokenAfter(first, { includeComments: true }),
+                penultimate = sourceCode.getTokenBefore(last, { includeComments: true });
 
             validateBraceSpacing(node, first, second, penultimate, last);
         }
diff --git a/package.json b/package.json
index c99b1559f..016f4e057 100644
--- a/package.json
+++ b/package.json
@@ -28,7 +28,7 @@
   },
   "lint-staged": {
     "*.js": [
-      "node ./bin/eslint.js --fix",
+      "eslint --fix",
       "git add"
     ],
     "*.md": "markdownlint"
@@ -95,10 +95,11 @@
     "coveralls": "^3.0.3",
     "dateformat": "^3.0.3",
     "ejs": "^2.6.1",
+    "eslint": "file:.",
     "eslint-config-eslint": "file:packages/eslint-config-eslint",
     "eslint-plugin-eslint-plugin": "^2.0.1",
     "eslint-plugin-internal-rules": "file:tools/internal-rules",
-    "eslint-plugin-node": "^8.0.0",
+    "eslint-plugin-node": "^9.0.0",
     "eslint-release": "^1.2.0",
     "eslump": "^2.0.0",
     "esprima": "^4.0.1",
@@ -112,6 +113,7 @@
     "lint-staged": "^8.1.5",
     "load-perf": "^0.2.0",
     "markdownlint": "^0.13.0",
+    "markdownlint-cli": "^0.15.0",
     "mocha": "^6.1.2",
     "mock-fs": "^4.8.0",
     "npm-license": "^0.3.3",


Test patch:
diff --git a/tests/lib/rules/no-cond-assign.js b/tests/lib/rules/no-cond-assign.js
index 8b8e1ae56..f6fb77b32 100644
--- a/tests/lib/rules/no-cond-assign.js
+++ b/tests/lib/rules/no-cond-assign.js
@@ -61,6 +61,7 @@ ruleTester.run("no-cond-assign", rule, {
         { code: "while ((x = 0)) { }", options: ["always"], errors: [{ messageId: "unexpected", data: { type: "a 'while' statement" }, type: "WhileStatement" }] },
         { code: "do { } while ((x = x + 1));", options: ["always"], errors: [{ messageId: "unexpected", data: { type: "a 'do...while' statement" }, type: "DoWhileStatement" }] },
         { code: "for(; (x = y); ) { }", options: ["always"], errors: [{ messageId: "unexpected", data: { type: "a 'for' statement" }, type: "ForStatement" }] },
-        { code: "var x; var b = (x = 0) ? 1 : 0;", errors: [{ messageId: "missing", type: "ConditionalExpression" }] }
+        { code: "var x; var b = (x = 0) ? 1 : 0;", errors: [{ messageId: "missing", type: "ConditionalExpression" }] },
+        { code: "(((3496.29)).bkufyydt = 2e308) ? foo : bar;", errors: [{ messageId: "missing", type: "ConditionalExpression" }] }
     ]
 });
diff --git a/tests/lib/rules/no-throw-literal.js b/tests/lib/rules/no-throw-literal.js
index 45e1ec658..d27e7c7c5 100644
--- a/tests/lib/rules/no-throw-literal.js
+++ b/tests/lib/rules/no-throw-literal.js
@@ -44,35 +44,42 @@ ruleTester.run("no-throw-literal", rule, {
         {
             code: "throw 'error';",
             errors: [{
-                message: "Expected an object to be thrown.",
+                messageId: "object",
                 type: "ThrowStatement"
             }]
         },
         {
             code: "throw 0;",
             errors: [{
-                message: "Expected an object to be thrown.",
+                messageId: "object",
                 type: "ThrowStatement"
             }]
         },
         {
             code: "throw false;",
             errors: [{
-                message: "Expected an object to be thrown.",
+                messageId: "object",
                 type: "ThrowStatement"
             }]
         },
         {
             code: "throw null;",
             errors: [{
-                message: "Expected an object to be thrown.",
+                messageId: "object",
+                type: "ThrowStatement"
+            }]
+        },
+        {
+            code: "throw {};",
+            errors: [{
+                messageId: "object",
                 type: "ThrowStatement"
             }]
         },
         {
             code: "throw undefined;",
             errors: [{
-                message: "Do not throw undefined.",
+                messageId: "undef",
                 type: "ThrowStatement"
             }]
         },
@@ -81,14 +88,14 @@ ruleTester.run("no-throw-literal", rule, {
         {
             code: "throw 'a' + 'b';",
             errors: [{
-                message: "Expected an object to be thrown.",
+                messageId: "object",
                 type: "ThrowStatement"
             }]
         },
         {
             code: "var b = new Error(); throw 'a' + b;",
             errors: [{
-                message: "Expected an object to be thrown.",
+                messageId: "object",
                 type: "ThrowStatement"
             }]
         },
@@ -97,7 +104,7 @@ ruleTester.run("no-throw-literal", rule, {
         {
             code: "throw foo = 'error';",
             errors: [{
-                message: "Expected an object to be thrown.",
+                messageId: "object",
                 type: "ThrowStatement"
             }]
         },
@@ -106,7 +113,7 @@ ruleTester.run("no-throw-literal", rule, {
         {
             code: "throw new Error(), 1, 2, 3;",
             errors: [{
-                message: "Expected an object to be thrown.",
+                messageId: "object",
                 type: "ThrowStatement"
             }]
         },
@@ -115,7 +122,7 @@ ruleTester.run("no-throw-literal", rule, {
         {
             code: "throw 'literal' && 'not an Error';",
             errors: [{
-                message: "Expected an object to be thrown.",
+                messageId: "object",
                 type: "ThrowStatement"
             }]
         },
@@ -124,7 +131,7 @@ ruleTester.run("no-throw-literal", rule, {
         {
             code: "throw foo ? 'not an Error' : 'literal';",
             errors: [{
-                message: "Expected an object to be thrown.",
+                messageId: "object",
                 type: "ThrowStatement"
             }]
         },
@@ -134,7 +141,7 @@ ruleTester.run("no-throw-literal", rule, {
             code: "throw `${err}`;",
             parserOptions: { ecmaVersion: 6 },
             errors: [{
-                message: "Expected an object to be thrown.",
+                messageId: "object",
                 type: "ThrowStatement"
 
             }]
diff --git a/tests/lib/rules/object-curly-spacing.js b/tests/lib/rules/object-curly-spacing.js
index 3595ff6b5..d7e7d061b 100644
--- a/tests/lib/rules/object-curly-spacing.js
+++ b/tests/lib/rules/object-curly-spacing.js
@@ -84,6 +84,8 @@ ruleTester.run("object-curly-spacing", rule, {
         { code: "var obj = {foo: {\nbar: quxx}, baz: qux\n};", options: ["never"] },
         { code: "var obj = {foo: {\nbar: quxx\n}, baz: qux};", options: ["never"] },
         { code: "var obj = {\nfoo: bar,\nbaz: qux\n};", options: ["never"] },
+        { code: "var obj = {foo: bar, baz: qux /* */};", options: ["never"] },
+        { code: "var obj = {/* */ foo: bar, baz: qux};", options: ["never"] },
 
         // never - destructuring
         { code: "var {x} = y", options: ["never"], parserOptions: { ecmaVersion: 6 } },
@@ -97,12 +99,18 @@ ruleTester.run("object-curly-spacing", rule, {
         { code: "var {\ny,\n} = x", options: ["never"], parserOptions: { ecmaVersion: 6 } },
         { code: "var {y,} = x", options: ["never"], parserOptions: { ecmaVersion: 6 } },
         { code: "var {y:x} = x", options: ["never"], parserOptions: { ecmaVersion: 6 } },
+        { code: "var {/* */ y} = x", options: ["never"], parserOptions: { ecmaVersion: 6 } },
+        { code: "var {y /* */} = x", options: ["never"], parserOptions: { ecmaVersion: 6 } },
 
         // never - import / export
         { code: "import door from 'room'", options: ["never"], parserOptions: { sourceType: "module" } },
         { code: "import * as door from 'room'", options: ["never"], parserOptions: { sourceType: "module" } },
         { code: "import {door} from 'room'", options: ["never"], parserOptions: { sourceType: "module" } },
         { code: "export {door} from 'room'", options: ["never"], parserOptions: { sourceType: "module" } },
+        { code: "import {/* */ door} from 'room'", options: ["never"], parserOptions: { sourceType: "module" } },
+        { code: "export {/* */ door} from 'room'", options: ["never"], parserOptions: { sourceType: "module" } },
+        { code: "import {door /* */} from 'room'", options: ["never"], parserOptions: { sourceType: "module" } },
+        { code: "export {door /* */} from 'room'", options: ["never"], parserOptions: { sourceType: "module" } },
         { code: "import {\ndoor} from 'room'", options: ["never"], parserOptions: { sourceType: "module" } },
         { code: "export {\ndoor\n} from 'room'", options: ["never"], parserOptions: { sourceType: "module" } },
         { code: "import {house,mouse} from 'caravan'", options: ["never"], parserOptions: { sourceType: "module" } },
@@ -235,6 +243,34 @@ ruleTester.run("object-curly-spacing", rule, {
 
             ]
         },
+        {
+            code: "import x, { bar/* */} from 'foo';",
+            output: "import x, { bar/* */ } from 'foo';",
+            options: ["always"],
+            parserOptions: { sourceType: "module" },
+            errors: [
+                {
+                    message: "A space is required before '}'.",
+                    type: "ImportDeclaration",
+                    line: 1,
+                    column: 21
+                }
+            ]
+        },
+        {
+            code: "import x, {/* */bar } from 'foo';",
+            output: "import x, { /* */bar } from 'foo';",
+            options: ["always"],
+            parserOptions: { sourceType: "module" },
+            errors: [
+                {
+                    message: "A space is required after '{'.",
+                    type: "ImportDeclaration",
+                    line: 1,
+                    column: 11
+                }
+            ]
+        },
         {
             code: "import x, { bar, baz} from 'foo';",
             output: "import x, { bar, baz } from 'foo';",
@@ -332,6 +368,26 @@ ruleTester.run("object-curly-spacing", rule, {
                 }
             ]
         },
+        {
+            code: "import { /* */ bar, /* */ } from 'foo';",
+            output: "import {/* */ bar, /* */} from 'foo';",
+            options: ["never"],
+            parserOptions: { sourceType: "module" },
+            errors: [
+                {
+                    message: "There should be no space after '{'.",
+                    type: "ImportDeclaration",
+                    line: 1,
+                    column: 8
+                },
+                {
+                    message: "There should be no space before '}'.",
+                    type: "ImportDeclaration",
+                    line: 1,
+                    column: 27
+                }
+            ]
+        },
         {
             code: "var bar = 0;\nexport {bar};",
             output: "var bar = 0;\nexport { bar };",
@@ -352,6 +408,26 @@ ruleTester.run("object-curly-spacing", rule, {
                 }
             ]
         },
+        {
+            code: "var bar = 0;\nexport { /* */ bar /* */ };",
+            output: "var bar = 0;\nexport {/* */ bar /* */};",
+            options: ["never"],
+            parserOptions: { sourceType: "module" },
+            errors: [
+                {
+                    message: "There should be no space after '{'.",
+                    type: "ExportNamedDeclaration",
+                    line: 2,
+                    column: 8
+                },
+                {
+                    message: "There should be no space before '}'.",
+                    type: "ExportNamedDeclaration",
+                    line: 2,
+                    column: 26
+                }
+            ]
+        },
 
         // always - arraysInObjects
         {
@@ -530,6 +606,19 @@ ruleTester.run("object-curly-spacing", rule, {
                 }
             ]
         },
+        {
+            code: "var obj = {/* */foo: bar, baz: qux };",
+            output: "var obj = { /* */foo: bar, baz: qux };",
+            options: ["always"],
+            errors: [
+                {
+                    message: "A space is required after '{'.",
+                    type: "ObjectExpression",
+                    line: 1,
+                    column: 11
+                }
+            ]
+        },
         {
             code: "var obj = { foo: bar, baz: qux};",
             output: "var obj = { foo: bar, baz: qux };",
@@ -543,6 +632,19 @@ ruleTester.run("object-curly-spacing", rule, {
                 }
             ]
         },
+        {
+            code: "var obj = { foo: bar, baz: qux/* */};",
+            output: "var obj = { foo: bar, baz: qux/* */ };",
+            options: ["always"],
+            errors: [
+                {
+                    message: "A space is required before '}'.",
+                    type: "ObjectExpression",
+                    line: 1,
+                    column: 36
+                }
+            ]
+        },
         {
             code: "var obj = { foo: bar, baz: qux };",
             output: "var obj = {foo: bar, baz: qux};",
@@ -575,6 +677,19 @@ ruleTester.run("object-curly-spacing", rule, {
                 }
             ]
         },
+        {
+            code: "var obj = {foo: bar, baz: qux /* */ };",
+            output: "var obj = {foo: bar, baz: qux /* */};",
+            options: ["never"],
+            errors: [
+                {
+                    message: "There should be no space before '}'.",
+                    type: "ObjectExpression",
+                    line: 1,
+                    column: 37
+                }
+            ]
+        },
         {
             code: "var obj = { foo: bar, baz: qux};",
             output: "var obj = {foo: bar, baz: qux};",
@@ -588,6 +703,19 @@ ruleTester.run("object-curly-spacing", rule, {
                 }
             ]
         },
+        {
+            code: "var obj = { /* */ foo: bar, baz: qux};",
+            output: "var obj = {/* */ foo: bar, baz: qux};",
+            options: ["never"],
+            errors: [
+                {
+                    message: "There should be no space after '{'.",
+                    type: "ObjectExpression",
+                    line: 1,
+                    column: 11
+                }
+            ]
+        },
         {
             code: "var obj = { foo: { bar: quxx}, baz: qux};",
             output: "var obj = {foo: {bar: quxx}, baz: qux};",
@@ -676,6 +804,34 @@ ruleTester.run("object-curly-spacing", rule, {
                 }
             ]
         },
+        {
+            code: "var { x, y/* */} = y",
+            output: "var { x, y/* */ } = y",
+            options: ["always"],
+            parserOptions: { ecmaVersion: 6 },
+            errors: [
+                {
+                    message: "A space is required before '}'.",
+                    type: "ObjectPattern",
+                    line: 1,
+                    column: 16
+                }
+            ]
+        },
+        {
+            code: "var {/* */x, y } = y",
+            output: "var { /* */x, y } = y",
+            options: ["always"],
+            parserOptions: { ecmaVersion: 6 },
+            errors: [
+                {
+                    message: "A space is required after '{'.",
+                    type: "ObjectPattern",
+                    line: 1,
+                    column: 5
+                }
+            ]
+        },
         {
             code: "var { x, y } = y",
             output: "var {x, y} = y",
@@ -710,6 +866,34 @@ ruleTester.run("object-curly-spacing", rule, {
                 }
             ]
         },
+        {
+            code: "var {x, y/* */ } = y",
+            output: "var {x, y/* */} = y",
+            options: ["never"],
+            parserOptions: { ecmaVersion: 6 },
+            errors: [
+                {
+                    message: "There should be no space before '}'.",
+                    type: "ObjectPattern",
+                    line: 1,
+                    column: 16
+                }
+            ]
+        },
+        {
+            code: "var { /* */x, y} = y",
+            output: "var {/* */x, y} = y",
+            options: ["never"],
+            parserOptions: { ecmaVersion: 6 },
+            errors: [
+                {
+                    message: "There should be no space after '{'.",
+                    type: "ObjectPattern",
+                    line: 1,
+                    column: 5
+                }
+            ]
+        },
         {
             code: "var { x=10} = y",
             output: "var { x=10 } = y",