Repository: eslint/eslint
Pull request #9769 (2017-12-25 07:34:57)

Update: More detailed assert message for rule-tester
<!--
    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)**

[ ] 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
[X] 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)**
The assert message now is a little bit confused. It only tells you "`Output is incorrect.`", but doesn't specificly show the received value and the expected value.

This change is to make the assert message more detailed.

**Is there anything you'd like reviewers to focus on?**
Not yet.



not-an-aardvark: Thanks for the pull request!

This was actually proposed before in https://github.com/eslint/eslint/issues/8173. I think the reason you're seeing confusing error messages is because you're using `RuleTester` without a test runner. For example, when using `mocha`, the error message looks like this:

![](https://i.gyazo.com/fa89f8b93046ca9083becbdc95c40929.png)

This is because `mocha` creates a diff based on the `actual` and `expected` properties of the `AssertionError` objects.

I don't think it would make sense to have the error message change for people using `mocha`, since it already ends up fairly descriptive. However, I agree that it would be a good idea to improve the error message in the case where no test runner is being used (by looking at the `actual` and `expected` properties like `mocha` does). Would you be able to update this PR to just change that case instead?

[This function](https://github.com/eslint/eslint/blob/cbf0fb9b209dd2d3efe69510925805da5fa8e29f/lib/testers/rule-tester.js#L133-L142) gets called when no test runner is active. (The first argument is the name of the test case, and the second argument is a function that may or may not throw an `AssertionError`.) I think this could be fixed by adding a `try`-`catch` to that function, and rethrowing any thrown `AssertionError` with a more descriptive message.
starkwang: @not-an-aardvark Thanks for your comment!
I've just updated this PR to address comment.
starkwang: @platinumazure Thanks for review.

This change is only for the case where no test runner is being used. But our unit tests seem based on some runners (hope I don't miss something), so it actually doesn't break any unit tests now.

Are there any tests for the no-test-runner case to add in?
platinumazure: Are there any tests for RuleTester.describe and RuleTester.it now, with them being called directly rather than overwritten? If so, it seems like those would be a good place to test. If there aren't tests (possible since the default behavior is to proxy into the method passed in), we should add some.
not-an-aardvark: @platinumazure I agree that it would be good to have tests like that, although I don't know how we would actually create them. `RuleTester` selects a behavior based on the presence of `describe` and `it` globals, and those globals are already present when we are running our tests.
j-f1: You could remove the globals, require `RuleTester`, then reinstate them.
starkwang: Pushed commit to address comment.
@not-an-aardvark @platinumazure Please take another review : )
starkwang: Actually I have another idea to implement this (I think this is better):

This is the code we using now:
```js
assert.equal(fixResult.output, item.output, "Output is incorrect.");
```

We can change it into:

```js
const errMsg = "Output is incorrect."
const inTestRunner = typeof describe === "function" || typeof it === "function"
if (!inTestRunner) {
    // if not using test runner, the error message should be appended by diff message.
    errMsg += ` Expected: ${item.output} Received: ${fixResult.output}`
}
assert.equal(fixResult.output, item.output, errMsg);
```

@not-an-aardvark What do you think about this? : )
platinumazure: I think a flag (maybe even a symbol property?) would be better here. If I
develop a plugin and choose to use a test framework that doesn't export
those globals (and I overwrite RuleTester.describe and RuleTester.it), then
the latest suggestion would incorrectly infer I'm never in a test
environment.

Thanks for bearing with us as we keep working towards a solution. I really
appreciate your patience and persistence.

On Dec 26, 2017 8:13 PM, "Weijia Wang" <notifications@github.com> wrote:

> Actually I have another idea to implement this (I think this is better):
>
> This is the code we using now:
>
> assert.equal(fixResult.output, item.output, "Output is incorrect.");
>
> We can change it into:
>
> const errMsg = "Output is incorrect."const inTestRunner = typeof describe === "function" || typeof it === "function"if (!inTestRunner) {
>     // if not using test runner, the error message should be appended by diff message.
>     errMsg += ` Expected: ${item.output} Received: ${fixResult.output}`
> }assert.equal(fixResult.output, item.output, errMsg);
>
> @not-an-aardvark <https://github.com/not-an-aardvark> What do you think
> about this? : )
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/eslint/eslint/pull/9769#issuecomment-354038084>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AARWerYekjDKrEH3mmfjuEalA5zSx3Shks5tEae4gaJpZM4RMKX_>
> .
>

starkwang: Updated PR to address comment. Please take another look. 😀

Patch:
diff --git a/README.md b/README.md
index 8644d8a18..c333edd83 100644
--- a/README.md
+++ b/README.md
@@ -156,7 +156,7 @@ Before filing an issue, please be sure to read the guidelines for what you're re
 
 ## Semantic Versioning Policy
 
-ESLint follows [semantic versioning](http://semver.org). However, due to the nature of ESLint as a code quality tool, it's not always clear when a minor or major version bump occurs. To help clarify this for everyone, we've defined the following semantic versioning policy for ESLint:
+ESLint follows [semantic versioning](https://semver.org). However, due to the nature of ESLint as a code quality tool, it's not always clear when a minor or major version bump occurs. To help clarify this for everyone, we've defined the following semantic versioning policy for ESLint:
 
 * Patch release (intended to not break your lint build)
     * A bug fix in a rule that results in ESLint reporting fewer errors.
diff --git a/docs/about/index.md b/docs/about/index.md
index 9acd9b6d5..a9c5acb46 100644
--- a/docs/about/index.md
+++ b/docs/about/index.md
@@ -8,8 +8,8 @@ The primary reason ESLint was created was to allow developers to create their ow
 
 ESLint is written using Node.js to provide a fast runtime environment and easy installation via [npm][].
 
-[linting]: http://en.wikipedia.org/wiki/Lint_(software)
-[npm]: http://npmjs.org/
+[linting]: https://en.wikipedia.org/wiki/Lint_(software)
+[npm]: https://npmjs.org/
 
 ## Philosophy
 
diff --git a/docs/developer-guide/code-conventions.md b/docs/developer-guide/code-conventions.md
index 59f56a47a..610be23b2 100644
--- a/docs/developer-guide/code-conventions.md
+++ b/docs/developer-guide/code-conventions.md
@@ -1,6 +1,6 @@
 # Code Conventions
 
-Programming language style guides are important for the long-term maintainability of software. This guide is based on the [Code Conventions for the Java Programming Language](http://java.sun.com/docs/codeconv/) and [Douglas Crockford's Code Conventions for the JavaScript Programming Language](http://javascript.crockford.com/code.html). Modifications have been made due to my personal experience and preferences.
+Programming language style guides are important for the long-term maintainability of software. This guide is based on the [Code Conventions for the Java Programming Language](https://java.sun.com/docs/codeconv/) and [Douglas Crockford's Code Conventions for the JavaScript Programming Language](http://javascript.crockford.com/code.html). Modifications have been made due to my personal experience and preferences.
 
 ## File Format
 
diff --git a/docs/developer-guide/development-environment.md b/docs/developer-guide/development-environment.md
index 0c3007dff..3b3a12fb2 100644
--- a/docs/developer-guide/development-environment.md
+++ b/docs/developer-guide/development-environment.md
@@ -4,7 +4,7 @@ ESLint has a very lightweight development environment that makes updating code f
 
 ## Step 1: Install Node.js
 
-Go to <http://nodejs.org/> to download and install the latest stable version for your operating system.
+Go to <https://nodejs.org/> to download and install the latest stable version for your operating system.
 
 Most of the installers come with [npm](https://www.npmjs.com/) already installed, but if for some reason it doesn't work on your system, you can install it manually using the instructions on the site.
 
diff --git a/docs/developer-guide/nodejs-api.md b/docs/developer-guide/nodejs-api.md
index d2f9ae91c..bfd16e8d2 100644
--- a/docs/developer-guide/nodejs-api.md
+++ b/docs/developer-guide/nodejs-api.md
@@ -4,6 +4,34 @@ While ESLint is designed to be run on the command line, it's possible to use ESL
 
 **Note:** Use undocumented parts of the API at your own risk. Only those parts that are specifically mentioned in this document are approved for use and will remain stable and reliable. Anything left undocumented is unstable and may change or be removed at any point.
 
+## Table of Contents
+
+* [SourceCode](#sourcecode)
+    * [splitLines()](#sourcecodesplitlines)
+* [Linter](#linter)
+    * [verify()](#linterverify)
+    * [verifyAndFix()](#linterverifyandfix)
+    * [defineRule()](#linterdefinerule)
+    * [defineRules()](#linterdefinerules)
+    * [getRules()](#lintergetrules)
+    * [defineParser()](#linterdefineparser)
+    * [version](#linterversion)
+* [linter (deprecated)](#linter-1)
+* [CLIEngine](#cliengine)
+    * [executeOnFiles()](#cliengineexecuteonfiles)
+    * [resolveFileGlobPatterns()](#cliengineresolvefileglobpatterns)
+    * [getConfigForFile()](#clienginegetconfigforfile)
+    * [executeOnText()](#cliengineexecuteontext)
+    * [addPlugin()](#cliengineaddplugin)
+    * [isPathIgnored()](#cliengineispathignored)
+    * [getFormatter()](#clienginegetformatter)
+    * [getErrorResults()](#clienginegeterrorresults)
+    * [outputFixes()](#cliengineoutputfixes)
+    * [version](#cliengineversion)
+* [RuleTester](#ruletester)
+    * [Customizing RuleTester](#customizing-ruletester)
+* [Deprecated APIs](#deprecated-apis)
+
 ## SourceCode
 
 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):
@@ -28,7 +56,7 @@ assert(code.hasBOM === true);
 assert(code.text === "var foo = bar;");
 ```
 
-### splitLines()
+### SourceCode#splitLines()
 
 This is a static function on `SourceCode` that is used to split the source code text into an array of lines.
 
@@ -64,7 +92,7 @@ The most important method on `Linter` is `verify()`, which initiates linting of
 
 * `code` - the source code to lint (a string or instance of `SourceCode`).
 * `config` - a configuration object that has been processed and normalized by CLIEngine using eslintrc files and/or other configuration arguments.
-    * **Note**: If you want to lint text and have your configuration be read and processed, use CLIEngine's [`executeOnFiles`](#executeonfiles) or [`executeOnText`](#executeontext) instead.
+    * **Note**: If you want to lint text and have your configuration be read and processed, use CLIEngine's [`executeOnFiles`](#cliengineexecuteonfiles) or [`executeOnText`](#cliengineexecuteontext) instead.
 * `options` - (optional) Additional options for this run.
     * `filename` - (optional) the filename to associate with the source code.
     * `preprocess` - (optional) A function that accepts a string containing source text, and returns an array of strings containing blocks of code to lint. Also see: [Processors in Plugins](/docs/developer-guide/working-with-plugins.md#processors-in-plugins)
@@ -244,7 +272,7 @@ Map {
 ### Linter#defineParser
 
 Each instance of `Linter` holds a map of custom parsers. If you want to define a parser programmatically you can add this function
-with the name of the parser as first argument and the [parser object](/docs/developer-guide/working-with-plugins#working-with-custom-parsers) as second argument.
+with the name of the parser as first argument and the [parser object](/docs/developer-guide/working-with-plugins.md#working-with-custom-parsers) as second argument.
 
 If during linting the parser is not found, it will fallback to `require(parserId)`.
 
@@ -274,7 +302,7 @@ linter.version; // => '4.5.0'
 
 ## linter
 
-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`.
+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;
@@ -309,7 +337,7 @@ The `CLIEngine` is a constructor, and you can create a new instance by passing i
 * `cwd` - Path to a directory that should be considered as the current working directory.
 * `envs` - An array of environments to load (default: empty array). Corresponds to `--env`.
 * `extensions` - An array of filename extensions that should be checked for code. The default is an array containing just `".js"`. Corresponds to `--ext`. It is only used in conjunction with directories, not with filenames or glob patterns.
-* `fix` - This can be a boolean or a function which will be provided each linting message and should return a boolean. True indicates that fixes should be included with the output report, and that errors and warnings should not be listed if they can be fixed. However, the files on disk will not be changed. To persist changes to disk, call [`outputFixes()`](#outputfixes).
+* `fix` - This can be a boolean or a function which will be provided each linting message and should return a boolean. True indicates that fixes should be included with the output report, and that errors and warnings should not be listed if they can be fixed. However, the files on disk will not be changed. To persist changes to disk, call [`outputFixes()`](#cliengineoutputfixes).
 * `globals` - An array of global variables to declare (default: empty array). Corresponds to `--global`.
 * `ignore` - False disables use of `.eslintignore`, `ignorePath` and `ignorePattern` (default: true). Corresponds to `--no-ignore`.
 * `ignorePath` - The ignore file to use instead of `.eslintignore` (default: null). Corresponds to `--ignore-path`.
@@ -340,7 +368,7 @@ var cli = new CLIEngine({
 
 In this code, a new `CLIEngine` instance is created that sets two environments, `"browser"` and `"mocha"`, disables loading of `.eslintrc` and `package.json` files, and enables the `semi` rule as an error. You can then call methods on `cli` and these options will be used to perform the correct action.
 
-### executeOnFiles()
+### CLIEngine#executeOnFiles()
 
 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:
 
@@ -489,9 +517,9 @@ The top-level report object also has `errorCount` and `warningCount` which give
 
 Report message objects have a deprecated `source` property. This property **will be removed** from the linting messages returned in `messages` in an upcoming breaking release. If you depend on this property, you should now use the top-level `source` or `output` properties instead.
 
-Once you get a report object, it's up to you to determine how to output the results. Fixes will not be automatically applied to the files, even if you set `fix: true` when constructing the `CLIEngine` instance. To apply fixes to the files, call [`outputFixes`](#outputfixes).
+Once you get a report object, it's up to you to determine how to output the results. Fixes will not be automatically applied to the files, even if you set `fix: true` when constructing the `CLIEngine` instance. To apply fixes to the files, call [`outputFixes`](#cliengineoutputfixes).
 
-### resolveFileGlobPatterns()
+### CLIEngine#resolveFileGlobPatterns()
 
 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:
 
@@ -506,7 +534,7 @@ var globPatterns = cli.resolveFileGlobPatterns(["."]);
 console.log(globPatterns[i]);       // ["**/*.js"]
 ```
 
-### getConfigForFile()
+### CLIEngine#getConfigForFile()
 
 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:
 
@@ -543,7 +571,7 @@ var config = cli.getConfigForFile("myfile.js");
 var messages = linter.verify('var foo;', config);
 ```
 
-### executeOnText()
+### CLIEngine#executeOnText()
 
 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:
 
@@ -567,7 +595,7 @@ The `report` returned from `executeOnText()` is in the same format as from `exec
 
 If a filename in the optional second parameter matches a file that is configured to be ignored, then this function returns no errors or warnings. To return a warning instead, call the method with true as the optional third parameter.
 
-### addPlugin()
+### CLIEngine#addPlugin()
 
 Loads a plugin from configuration object with specified name. Name can include plugin prefix ("eslint-plugin-")
 
@@ -590,7 +618,7 @@ cli.addPlugin("eslint-plugin-processor", {
 });
 ```
 
-### isPathIgnored()
+### CLIEngine#isPathIgnored()
 
 Checks if a given path is ignored by ESLint.
 
@@ -605,7 +633,7 @@ var cli = new CLIEngine({
 var isIgnored = cli.isPathIgnored("foo/bar.js");
 ```
 
-### getFormatter()
+### CLIEngine#getFormatter()
 
 Retrieves a formatter, which you can then use to format a report object. The argument is either the name of a built-in formatter:
 
@@ -657,7 +685,7 @@ var formatter = CLIEngine.getFormatter();
 
 **Important:** You must pass in the `results` property of the report. Passing in `report` directly will result in an error.
 
-### getErrorResults()
+### CLIEngine#getErrorResults()
 
 This is a static function on `CLIEngine`. It can be used to filter out all the non error messages from the report object.
 
@@ -681,7 +709,7 @@ var 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.
 
-### outputFixes()
+### CLIEngine#outputFixes()
 
 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:
 
diff --git a/docs/developer-guide/source-code.md b/docs/developer-guide/source-code.md
index 64448ab1e..a7e9434cd 100644
--- a/docs/developer-guide/source-code.md
+++ b/docs/developer-guide/source-code.md
@@ -1,18 +1,18 @@
 # Source Code
 
-ESLint is hosted at [GitHub](https://github.com/eslint/eslint) and uses [Git](http://git-scm.com/) for source control. In order to obtain the source code, you must first install Git on your system. Instructions for installing and setting up Git can be found at [http://help.github.com/set-up-git-redirect](http://help.github.com/set-up-git-redirect).
+ESLint is hosted at [GitHub](https://github.com/eslint/eslint) and uses [Git](https://git-scm.com/) for source control. In order to obtain the source code, you must first install Git on your system. Instructions for installing and setting up Git can be found at [https://help.github.com/articles/set-up-git/](https://help.github.com/articles/set-up-git/).
 
 If you simply want to create a local copy of the source to play with, you can clone the main repository using this command:
 
     git clone git://github.com/eslint/eslint.git
 
-If you're planning on contributing to ESLint, then it's a good idea to fork the repository. You can find instructions for forking a repository at [http://help.github.com/fork-a-repo/](http://help.github.com/fork-a-repo/). After forking the ESLint repository, you'll want to create a local copy of your fork.
+If you're planning on contributing to ESLint, then it's a good idea to fork the repository. You can find instructions for forking a repository at [https://help.github.com/articles/fork-a-repo/](https://help.github.com/articles/fork-a-repo/). After forking the ESLint repository, you'll want to create a local copy of your fork.
 
 ## Start Developing
 
 Before you can get started developing, you'll need to have a couple of things installed:
 
-* [Node.JS](http://nodejs.org)
+* [Node.JS](https://nodejs.org)
 * [npm](https://www.npmjs.com/)
 
 Once you have a local copy and have Node.JS and npm installed, you'll need to install the ESLint dependencies:
diff --git a/docs/maintainer-guide/governance.md b/docs/maintainer-guide/governance.md
index 98e5f623e..15e5a6340 100644
--- a/docs/maintainer-guide/governance.md
+++ b/docs/maintainer-guide/governance.md
@@ -152,4 +152,4 @@ or else the discussion will continue. Simple majority wins.
 
 This work is a derivative of [YUI Contributor Model](https://github.com/yui/yui3/wiki/Contributor-Model) and the [Node.js Project Governance Model](https://github.com/nodejs/node/blob/master/GOVERNANCE.md).
 
-This work is licensed under a [Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales License](http://creativecommons.org/licenses/by-sa/2.0/uk/).
+This work is licensed under a [Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales License](https://creativecommons.org/licenses/by-sa/2.0/uk/).
diff --git a/docs/maintainer-guide/releases.md b/docs/maintainer-guide/releases.md
index 5886ec186..e8faab5f6 100644
--- a/docs/maintainer-guide/releases.md
+++ b/docs/maintainer-guide/releases.md
@@ -2,7 +2,7 @@
 
 Releases are when a project formally publishes a new version so the community can use it. There are two types of releases:
 
-* Regular releases that follow [semantic versioning](http://semver.org/) and are considered production-ready.
+* Regular releases that follow [semantic versioning](https://semver.org/) and are considered production-ready.
 * Prereleases that are not considered production-ready and are intended to give the community a preview of upcoming changes.
 
 ## Release Team
diff --git a/docs/rules/array-callback-return.md b/docs/rules/array-callback-return.md
index f11825028..c1ed80de9 100644
--- a/docs/rules/array-callback-return.md
+++ b/docs/rules/array-callback-return.md
@@ -16,16 +16,16 @@ This rule enforces usage of `return` statement in callbacks of array's methods.
 
 This rule finds callback functions of the following methods, then checks usage of `return` statement.
 
-* [`Array.from`](http://www.ecma-international.org/ecma-262/6.0/#sec-array.from)
-* [`Array.prototype.every`](http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.every)
-* [`Array.prototype.filter`](http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.filter)
-* [`Array.prototype.find`](http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.find)
-* [`Array.prototype.findIndex`](http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.findIndex )
-* [`Array.prototype.map`](http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.map)
-* [`Array.prototype.reduce`](http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.reduce)
-* [`Array.prototype.reduceRight`](http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.reduceRight)
-* [`Array.prototype.some`](http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.some)
-* [`Array.prototype.sort`](http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.sort)
+* [`Array.from`](https://www.ecma-international.org/ecma-262/6.0/#sec-array.from)
+* [`Array.prototype.every`](https://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.every)
+* [`Array.prototype.filter`](https://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.filter)
+* [`Array.prototype.find`](https://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.find)
+* [`Array.prototype.findIndex`](https://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.findIndex )
+* [`Array.prototype.map`](https://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.map)
+* [`Array.prototype.reduce`](https://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.reduce)
+* [`Array.prototype.reduceRight`](https://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.reduceRight)
+* [`Array.prototype.some`](https://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.some)
+* [`Array.prototype.sort`](https://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.sort)
 * And above of typed arrays.
 
 Examples of **incorrect** code for this rule:
diff --git a/docs/rules/eqeqeq.md b/docs/rules/eqeqeq.md
index 15989e680..4849f9999 100644
--- a/docs/rules/eqeqeq.md
+++ b/docs/rules/eqeqeq.md
@@ -2,7 +2,7 @@
 
 It is considered good practice to use the type-safe equality operators `===` and `!==` instead of their regular counterparts `==` and `!=`.
 
-The reason for this is that `==` and `!=` do type coercion which follows the rather obscure [Abstract Equality Comparison Algorithm](http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3).
+The reason for this is that `==` and `!=` do type coercion which follows the rather obscure [Abstract Equality Comparison Algorithm](https://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3).
 For instance, the following statements are all considered `true`:
 
 * `[] == false`
diff --git a/docs/rules/guard-for-in.md b/docs/rules/guard-for-in.md
index 3ac16c031..ec7860b79 100644
--- a/docs/rules/guard-for-in.md
+++ b/docs/rules/guard-for-in.md
@@ -45,5 +45,5 @@ for (key in foo) {
 
 ## Further Reading
 
-* [Exploring JavaScript for-in loops](http://javascriptweblog.wordpress.com/2011/01/04/exploring-javascript-for-in-loops/)
+* [Exploring JavaScript for-in loops](https://javascriptweblog.wordpress.com/2011/01/04/exploring-javascript-for-in-loops/)
 * [The pitfalls of using objects as maps in JavaScript](http://2ality.com/2012/01/objects-as-maps.html)
diff --git a/docs/rules/indent.md b/docs/rules/indent.md
index beec36748..37dcabbd3 100644
--- a/docs/rules/indent.md
+++ b/docs/rules/indent.md
@@ -84,7 +84,8 @@ This rule has an object option:
 * `"ObjectExpression"` (default: 1) enforces indentation level for properties in objects. It can be set to the string `"first"`, indicating that all properties in the object should be aligned with the first property. This can also be set to `"off"` to disable checking for object properties.
 * `"ImportDeclaration"` (default: 1) enforces indentation level for import statements. It can be set to the string `"first"`, indicating that all imported members from a module should be aligned with the first member in the list. This can also be set to `"off"` to disable checking for imported module members.
 * `"flatTernaryExpressions": true` (`false` by default) requires no indentation for ternary expressions which are nested in other ternary expressions.
-* `ignoredNodes` accepts an array of [selectors](/docs/developer-guide/selectors.md). If an AST node is matched by any of the selectors, the indentation of tokens which are direct children of that node will be ignored. This can be used as an escape hatch to relax the rule if you disagree with the indentation that it enforces for a particular syntactic pattern.
+* `"ignoredNodes"` accepts an array of [selectors](/docs/developer-guide/selectors.md). If an AST node is matched by any of the selectors, the indentation of tokens which are direct children of that node will be ignored. This can be used as an escape hatch to relax the rule if you disagree with the indentation that it enforces for a particular syntactic pattern.
+* `"ignoreComments"` (default: false) can be used when comments do not need to be aligned with nodes on the previous or next line.
 
 Level of indentation denotes the multiple of the indent specified. Example:
 
@@ -641,6 +642,22 @@ bar();
 })
 ```
 
+### ignoreComments
+
+Examples of additional **correct** code for this rule with the `4, { "ignoreComments": true }` option:
+
+```js
+/*eslint indent: ["error", 4, { "ignoreComments": true }] */
+
+if (foo) {
+    doSomething();
+
+// comment intentionally de-indented
+    doSomethingElse();
+}
+```
+
+
 ## Compatibility
 
 * **JSHint**: `indent`
diff --git a/docs/rules/lines-around-directive.md b/docs/rules/lines-around-directive.md
index c110eace7..3f9890bc4 100644
--- a/docs/rules/lines-around-directive.md
+++ b/docs/rules/lines-around-directive.md
@@ -2,7 +2,7 @@
 
 This rule was **deprecated** in ESLint v4.0.0 and replaced by the [padding-line-between-statements](padding-line-between-statements.md) rule.
 
-Directives are used in JavaScript to indicate to the execution environment that a script would like to opt into a feature such as `"strict mode"`. Directives are grouped together in a [directive prologue](http://www.ecma-international.org/ecma-262/7.0/#directive-prologue) at the top of either a file or function block and are applied to the scope in which they occur.
+Directives are used in JavaScript to indicate to the execution environment that a script would like to opt into a feature such as `"strict mode"`. Directives are grouped together in a [directive prologue](https://www.ecma-international.org/ecma-262/7.0/#directive-prologue) at the top of either a file or function block and are applied to the scope in which they occur.
 
 ```js
 // Strict mode is invoked for the entire script
diff --git a/docs/rules/max-nested-callbacks.md b/docs/rules/max-nested-callbacks.md
index 734ca0e8e..8c1f9c230 100644
--- a/docs/rules/max-nested-callbacks.md
+++ b/docs/rules/max-nested-callbacks.md
@@ -71,8 +71,8 @@ function handleFoo4() {
 ## Further Reading
 
 * [Control flow in Node.js](http://book.mixu.net/node/ch7.html)
-* [Control Flow in Node](http://howtonode.org/control-flow)
-* [Control Flow in Node Part II](http://howtonode.org/control-flow-part-ii)
+* [Control Flow in Node](https://howtonode.org/control-flow)
+* [Control Flow in Node Part II](https://howtonode.org/control-flow-part-ii)
 
 ## Related Rules
 
diff --git a/docs/rules/no-eval.md b/docs/rules/no-eval.md
index c3355ccc9..9f7b71ad6 100644
--- a/docs/rules/no-eval.md
+++ b/docs/rules/no-eval.md
@@ -139,8 +139,8 @@ global.eval("var a = 0");
 
 ## Further Reading
 
-* [Eval is Evil, Part One](http://blogs.msdn.com/b/ericlippert/archive/2003/11/01/53329.aspx)
-* [How evil is eval](http://javascriptweblog.wordpress.com/2010/04/19/how-evil-is-eval/)
+* [Eval is Evil, Part One](https://blogs.msdn.com/b/ericlippert/archive/2003/11/01/53329.aspx)
+* [How evil is eval](https://javascriptweblog.wordpress.com/2010/04/19/how-evil-is-eval/)
 
 ## Related Rules
 
diff --git a/docs/rules/no-extra-parens.md b/docs/rules/no-extra-parens.md
index 392ac06a7..61fb50dc3 100644
--- a/docs/rules/no-extra-parens.md
+++ b/docs/rules/no-extra-parens.md
@@ -36,6 +36,12 @@ a = (b * c);
 
 (a * b) + c;
 
+for (a in (b, c));
+
+for (a in (b));
+
+for (a of (b));
+
 typeof (a);
 
 (function(){} ? a() : b());
@@ -55,6 +61,14 @@ Examples of **correct** code for this rule with the default `"all"` option:
 (function(){}) ? a() : b();
 
 (/^a$/).test(x);
+
+for (a of (b, c));
+
+for (a of b);
+
+for (a in b, c);
+
+for (a in b);
 ```
 
 ### conditionalAssign
diff --git a/docs/rules/no-extra-strict.md b/docs/rules/no-extra-strict.md
index 50b5a9366..a350f77a3 100644
--- a/docs/rules/no-extra-strict.md
+++ b/docs/rules/no-extra-strict.md
@@ -47,4 +47,4 @@ Examples of **correct** code for this rule:
 
 ## Further Reading
 
-* [The ECMAScript 5 Annotated Specification - Strict Mode](http://es5.github.io/#C)
+* [The ECMAScript 5 Annotated Specification - Strict Mode](https://es5.github.io/#C)
diff --git a/docs/rules/no-invalid-regexp.md b/docs/rules/no-invalid-regexp.md
index 67502885f..d656da025 100644
--- a/docs/rules/no-invalid-regexp.md
+++ b/docs/rules/no-invalid-regexp.md
@@ -61,4 +61,4 @@ new RegExp('.', 'yu')
 
 ## Further Reading
 
-* [Annotated ES5 §7.8.5 - Regular Expression Literals](http://es5.github.io/#x7.8.5)
+* [Annotated ES5 §7.8.5 - Regular Expression Literals](https://es5.github.io/#x7.8.5)
diff --git a/docs/rules/no-iterator.md b/docs/rules/no-iterator.md
index 954ce56df..95b42a9ea 100644
--- a/docs/rules/no-iterator.md
+++ b/docs/rules/no-iterator.md
@@ -40,5 +40,5 @@ var __iterator__ = foo; // Not using the `__iterator__` property.
 ## Further Reading
 
 * [MDN - Iterators and Generators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators)
-* [ECMAScript 6 compatibility table - Iterators](http://kangax.github.io/es5-compat-table/es6/#Iterators)
+* [ECMAScript 6 compatibility table - Iterators](https://kangax.github.io/es5-compat-table/es6/#Iterators)
 * [Deprecated and Obsolete Features](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features#Object_methods)
diff --git a/docs/rules/no-mixed-requires.md b/docs/rules/no-mixed-requires.md
index 7ecf63770..ee63c9909 100644
--- a/docs/rules/no-mixed-requires.md
+++ b/docs/rules/no-mixed-requires.md
@@ -118,7 +118,7 @@ var async = require('async'),
 
 If you use a pattern such as [UMD][4] where the `require`d modules are not loaded in variable declarations, this rule will obviously do nothing for you.
 
-[1]: http://nodejs.org/api/modules.html#modules_core_modules
-[2]: http://nodejs.org/api/modules.html#modules_file_modules
-[3]: http://nodejs.org/api/modules.html#modules_loading_from_node_modules_folders
+[1]: https://nodejs.org/api/modules.html#modules_core_modules
+[2]: https://nodejs.org/api/modules.html#modules_file_modules
+[3]: https://nodejs.org/api/modules.html#modules_loading_from_node_modules_folders
 [4]: https://github.com/umdjs/umd
diff --git a/docs/rules/no-new-symbol.md b/docs/rules/no-new-symbol.md
index 932926f28..66167cf6b 100644
--- a/docs/rules/no-new-symbol.md
+++ b/docs/rules/no-new-symbol.md
@@ -45,4 +45,4 @@ This rule should not be used in ES3/5 environments.
 
 ## Further Reading
 
-* [Symbol Objects specification](http://www.ecma-international.org/ecma-262/6.0/#sec-symbol-objects)
+* [Symbol Objects specification](https://www.ecma-international.org/ecma-262/6.0/#sec-symbol-objects)
diff --git a/docs/rules/no-obj-calls.md b/docs/rules/no-obj-calls.md
index 9500913a2..9484eb736 100644
--- a/docs/rules/no-obj-calls.md
+++ b/docs/rules/no-obj-calls.md
@@ -2,11 +2,11 @@
 
 ECMAScript provides several global objects that are intended to be used as-is. Some of these objects look as if they could be constructors due their capitalization (such as `Math` and `JSON`) but will throw an error if you try to execute them as functions.
 
-The [ECMAScript 5 specification](http://es5.github.io/#x15.8) makes it clear that both `Math` and `JSON` cannot be invoked:
+The [ECMAScript 5 specification](https://es5.github.io/#x15.8) makes it clear that both `Math` and `JSON` cannot be invoked:
 
 > The Math object does not have a `[[Call]]` internal property; it is not possible to invoke the Math object as a function.
 
-And the [ECMAScript 2015 specification](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-reflect-object) makes it clear that `Reflect` cannot be invoked:
+And the [ECMAScript 2015 specification](https://www.ecma-international.org/ecma-262/6.0/index.html#sec-reflect-object) makes it clear that `Reflect` cannot be invoked:
 
 > The Reflect object also does not have a `[[Call]]` internal method; it is not possible to invoke the Reflect object as a function.
 
@@ -38,4 +38,4 @@ var value = Reflect.get({ x: 1, y: 2 }, "x");
 
 ## Further Reading
 
-* [The Math Object](http://es5.github.io/#x15.8)
+* [The Math Object](https://es5.github.io/#x15.8)
diff --git a/docs/rules/no-process-env.md b/docs/rules/no-process-env.md
index bca841b58..e4a235676 100644
--- a/docs/rules/no-process-env.md
+++ b/docs/rules/no-process-env.md
@@ -35,5 +35,5 @@ If prefer to use `process.env` throughout your project to retrieve values from e
 
 ## Further Reading
 
-* [How to store Node.js deployment settings/configuration files? - Stack Overflow](http://stackoverflow.com/questions/5869216/how-to-store-node-js-deployment-settings-configuration-files)
-* [Storing Node.js application config data - Ben Hall's blog](http://blog.benhall.me.uk/2012/02/storing-application-config-data-in/)
+* [How to store Node.js deployment settings/configuration files? - Stack Overflow](https://stackoverflow.com/questions/5869216/how-to-store-node-js-deployment-settings-configuration-files)
+* [Storing Node.js application config data - Ben Hall's blog](https://blog.benhall.me.uk/2012/02/storing-application-config-data-in/)
diff --git a/docs/rules/no-reserved-keys.md b/docs/rules/no-reserved-keys.md
index 0ddb43575..f1f8e41d2 100644
--- a/docs/rules/no-reserved-keys.md
+++ b/docs/rules/no-reserved-keys.md
@@ -50,4 +50,4 @@ If your code is only going to be executed in an ECMAScript 5 or higher environme
 
 ## Further Reading
 
-* [Reserved words as property names](http://kangax.github.io/compat-table/es5/#Reserved_words_as_property_names)
+* [Reserved words as property names](https://kangax.github.io/compat-table/es5/#Reserved_words_as_property_names)
diff --git a/docs/rules/no-script-url.md b/docs/rules/no-script-url.md
index 61ca9b741..475959dac 100644
--- a/docs/rules/no-script-url.md
+++ b/docs/rules/no-script-url.md
@@ -18,4 +18,4 @@ location.href = "javascript:void(0)";
 
 ## Further Reading
 
-* [What is the matter with script-targeted URLs?](http://stackoverflow.com/questions/13497971/what-is-the-matter-with-script-targeted-urls)
+* [What is the matter with script-targeted URLs?](https://stackoverflow.com/questions/13497971/what-is-the-matter-with-script-targeted-urls)
diff --git a/docs/rules/no-shadow-restricted-names.md b/docs/rules/no-shadow-restricted-names.md
index 1d7c0720a..0624a82aa 100644
--- a/docs/rules/no-shadow-restricted-names.md
+++ b/docs/rules/no-shadow-restricted-names.md
@@ -36,8 +36,8 @@ function f(a, b){}
 
 ## Further Reading
 
-* [Annotated ES5 - §15.1.1](http://es5.github.io/#x15.1.1)
-* [Annotated ES5 - Annex C](http://es5.github.io/#C)
+* [Annotated ES5 - §15.1.1](https://es5.github.io/#x15.1.1)
+* [Annotated ES5 - Annex C](https://es5.github.io/#C)
 
 ## Related Rules
 
diff --git a/docs/rules/no-sparse-arrays.md b/docs/rules/no-sparse-arrays.md
index 932b55fdd..826cfd87f 100644
--- a/docs/rules/no-sparse-arrays.md
+++ b/docs/rules/no-sparse-arrays.md
@@ -47,4 +47,4 @@ If you want to use sparse arrays, then it is safe to disable this rule.
 
 ## Further Reading
 
-* [Inconsistent array literals](http://www.nczonline.net/blog/2007/09/09/inconsistent-array-literals/)
+* [Inconsistent array literals](https://www.nczonline.net/blog/2007/09/09/inconsistent-array-literals/)
diff --git a/docs/rules/no-undefined.md b/docs/rules/no-undefined.md
index ff8bea720..0e183f266 100644
--- a/docs/rules/no-undefined.md
+++ b/docs/rules/no-undefined.md
@@ -68,7 +68,7 @@ If you want to allow the use of `undefined` in your code, then you can safely tu
 ## Further Reading
 
 * [undefined - JavaScript \| MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined)
-* [Understanding JavaScript’s ‘undefined’ \| JavaScript, JavaScript...](http://javascriptweblog.wordpress.com/2010/08/16/understanding-undefined-and-preventing-referenceerrors/)
+* [Understanding JavaScript’s ‘undefined’ \| JavaScript, JavaScript...](https://javascriptweblog.wordpress.com/2010/08/16/understanding-undefined-and-preventing-referenceerrors/)
 * [ECMA262 edition 5.1 &sect;15.1.1.3: undefined](https://es5.github.io/#x15.1.1.3)
 
 ## Related Rules
diff --git a/docs/rules/no-void.md b/docs/rules/no-void.md
index 5ff455c0e..856c934c6 100644
--- a/docs/rules/no-void.md
+++ b/docs/rules/no-void.md
@@ -65,7 +65,7 @@ If you intentionally use the `void` operator then you can disable this rule.
 ## Further Reading
 
 * [Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void)
-* [Bad Parts: Appendix B - JavaScript: The Good Parts by Douglas Crockford](http://oreilly.com/javascript/excerpts/javascript-good-parts/bad-parts.html)
+* [Bad Parts: Appendix B - JavaScript: The Good Parts by Douglas Crockford](https://oreilly.com/javascript/excerpts/javascript-good-parts/bad-parts.html)
 
 ## Related Rules
 
diff --git a/docs/rules/prefer-reflect.md b/docs/rules/prefer-reflect.md
index 92e956a35..55bc1bbbe 100644
--- a/docs/rules/prefer-reflect.md
+++ b/docs/rules/prefer-reflect.md
@@ -4,12 +4,12 @@ This rule was **deprecated** in ESLint v3.9.0 and will not be replaced. The orig
 
 The ES6 Reflect API comes with a handful of methods which somewhat deprecate methods on old constructors:
 
-* [`Reflect.apply`](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-reflect.apply) effectively deprecates [`Function.prototype.apply`](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-function.prototype.apply) and [`Function.prototype.call`](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-function.prototype.call)
-* [`Reflect.deleteProperty`](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-reflect.deleteproperty) effectively deprecates the [`delete` keyword](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-delete-operator-runtime-semantics-evaluation)
-* [`Reflect.getOwnPropertyDescriptor`](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-reflect.getownpropertydescriptor) effectively deprecates [`Object.getOwnPropertyDescriptor`](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-object.getownpropertydescriptor)
-* [`Reflect.getPrototypeOf`](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-reflect.getprototypeof) effectively deprecates [`Object.getPrototypeOf`](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-object.getprototypeof)
-* [`Reflect.setPrototypeOf`](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-reflect.setprototypeof) effectively deprecates [`Object.setPrototypeOf`](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-object.setprototypeof)
-* [`Reflect.preventExtensions`](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-reflect.preventextensions)  effectively deprecates [`Object.preventExtensions`](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-object.preventextensions)
+* [`Reflect.apply`](https://www.ecma-international.org/ecma-262/6.0/index.html#sec-reflect.apply) effectively deprecates [`Function.prototype.apply`](https://www.ecma-international.org/ecma-262/6.0/index.html#sec-function.prototype.apply) and [`Function.prototype.call`](https://www.ecma-international.org/ecma-262/6.0/index.html#sec-function.prototype.call)
+* [`Reflect.deleteProperty`](https://www.ecma-international.org/ecma-262/6.0/index.html#sec-reflect.deleteproperty) effectively deprecates the [`delete` keyword](https://www.ecma-international.org/ecma-262/6.0/index.html#sec-delete-operator-runtime-semantics-evaluation)
+* [`Reflect.getOwnPropertyDescriptor`](https://www.ecma-international.org/ecma-262/6.0/index.html#sec-reflect.getownpropertydescriptor) effectively deprecates [`Object.getOwnPropertyDescriptor`](https://www.ecma-international.org/ecma-262/6.0/index.html#sec-object.getownpropertydescriptor)
+* [`Reflect.getPrototypeOf`](https://www.ecma-international.org/ecma-262/6.0/index.html#sec-reflect.getprototypeof) effectively deprecates [`Object.getPrototypeOf`](https://www.ecma-international.org/ecma-262/6.0/index.html#sec-object.getprototypeof)
+* [`Reflect.setPrototypeOf`](https://www.ecma-international.org/ecma-262/6.0/index.html#sec-reflect.setprototypeof) effectively deprecates [`Object.setPrototypeOf`](https://www.ecma-international.org/ecma-262/6.0/index.html#sec-object.setprototypeof)
+* [`Reflect.preventExtensions`](https://www.ecma-international.org/ecma-262/6.0/index.html#sec-reflect.preventextensions)  effectively deprecates [`Object.preventExtensions`](https://www.ecma-international.org/ecma-262/6.0/index.html#sec-object.preventextensions)
 
 The prefer-reflect rule will flag usage of any older method, suggesting to instead use the newer Reflect version.
 
diff --git a/docs/rules/quote-props.md b/docs/rules/quote-props.md
index d30608ae7..623c30e7e 100644
--- a/docs/rules/quote-props.md
+++ b/docs/rules/quote-props.md
@@ -265,5 +265,5 @@ If you don't care if property names are consistently wrapped in quotes or not, a
 
 ## Further Reading
 
-* [Reserved words as property names](http://kangax.github.io/compat-table/es5/#Reserved_words_as_property_names)
+* [Reserved words as property names](https://kangax.github.io/compat-table/es5/#Reserved_words_as_property_names)
 * [Unquoted property names / object keys in JavaScript](https://mathiasbynens.be/notes/javascript-properties)
diff --git a/docs/rules/radix.md b/docs/rules/radix.md
index 7a6e0c676..64466ab68 100644
--- a/docs/rules/radix.md
+++ b/docs/rules/radix.md
@@ -90,4 +90,4 @@ If you don't want to enforce either presence or omission of the `10` radix value
 
 ## Further Reading
 
-* [parseInt and radix](http://davidwalsh.name/parseint-radix)
+* [parseInt and radix](https://davidwalsh.name/parseint-radix)
diff --git a/docs/rules/symbol-description.md b/docs/rules/symbol-description.md
index bf2adc64d..eb15d94ff 100644
--- a/docs/rules/symbol-description.md
+++ b/docs/rules/symbol-description.md
@@ -58,4 +58,4 @@ In addition, this rule can be safely turned off if you don't want to enforce pre
 
 ## Further Reading
 
-* [Symbol Objects specification: Symbol description](http://www.ecma-international.org/ecma-262/6.0/#sec-symbol-description)
+* [Symbol Objects specification: Symbol description](https://www.ecma-international.org/ecma-262/6.0/#sec-symbol-description)
diff --git a/docs/user-guide/configuring.md b/docs/user-guide/configuring.md
index b55070a26..8b1bcba4a 100644
--- a/docs/user-guide/configuring.md
+++ b/docs/user-guide/configuring.md
@@ -31,7 +31,7 @@ Parser options are set in your `.eslintrc.*` file by using the `parserOptions` p
 * `ecmaFeatures` - an object indicating which additional language features you'd like to use:
     * `globalReturn` - allow `return` statements in the global scope
     * `impliedStrict` - enable global [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode) (if `ecmaVersion` is 5 or greater)
-    * `jsx` - enable [JSX](http://facebook.github.io/jsx/)
+    * `jsx` - enable [JSX](https://facebook.github.io/jsx/)
     * `experimentalObjectRestSpread` - enable support for the experimental [object rest/spread properties](https://github.com/tc39/proposal-object-rest-spread) (**IMPORTANT:** This is an experimental feature that may change significantly in the future. It's recommended that you do *not* write rules relying on this functionality unless you are willing to incur maintenance cost when it changes.)
 
 Here's an example `.eslintrc.json` file:
@@ -77,7 +77,7 @@ To indicate the npm module to use as your parser, specify it using the `parser`
 The following parsers are compatible with ESLint:
 
 * [Esprima](https://www.npmjs.com/package/esprima)
-* [Babel-ESLint](https://www.npmjs.com/package/babel-eslint) - A wrapper around the [Babel](http://babeljs.io) parser that makes it compatible with ESLint.
+* [Babel-ESLint](https://www.npmjs.com/package/babel-eslint) - A wrapper around the [Babel](https://babeljs.io) parser that makes it compatible with ESLint.
 * [typescript-eslint-parser(Experimental)](https://www.npmjs.com/package/typescript-eslint-parser) - A parser that converts TypeScript into an ESTree-compatible form so it can be used in ESLint. The goal is to allow TypeScript files to be parsed by ESLint (though not necessarily pass all ESLint rules).
 
 Note when using a custom parser, the `parserOptions` configuration property is still required for ESLint to work properly with features not in ECMAScript 5 by default. Parsers are all passed `parserOptions` and may or may not use them to determine which features to enable.
@@ -805,7 +805,7 @@ Globs are matched using [node-ignore](https://github.com/kaelzhang/node-ignore),
 
 * Lines beginning with `#` are treated as comments and do not affect ignore patterns.
 * Paths are relative to `.eslintignore` location or the current working directory. This also influences paths passed via `--ignore-pattern`.
-* Ignore patterns behave according to the `.gitignore` [specification](http://git-scm.com/docs/gitignore)
+* Ignore patterns behave according to the `.gitignore` [specification](https://git-scm.com/docs/gitignore)
 * Lines preceded by `!` are negated patterns that re-include a pattern that was ignored by an earlier pattern.
 
 In addition to any patterns in a `.eslintignore` file, ESLint always ignores files in `/node_modules/*` and `/bower_components/*`.
diff --git a/docs/user-guide/integrations.md b/docs/user-guide/integrations.md
index 1fdaddc10..1179fa960 100644
--- a/docs/user-guide/integrations.md
+++ b/docs/user-guide/integrations.md
@@ -7,7 +7,7 @@
     * [Build Next](https://github.com/albertosantini/sublimetext-buildnext)
 * [Vim](https://github.com/vim-syntastic/syntastic/tree/master/syntax_checkers/javascript)
 * Emacs: [Flycheck](http://www.flycheck.org/) supports ESLint with the [javascript-eslint](http://www.flycheck.org/en/latest/languages.html#javascript) checker.
-* Eclipse Orion: ESLint is the [default linter](http://dev.eclipse.org/mhonarc/lists/orion-dev/msg02718.html)
+* Eclipse Orion: ESLint is the [default linter](https://dev.eclipse.org/mhonarc/lists/orion-dev/msg02718.html)
 * Eclipse IDE with [Tern ESLint linter](https://github.com/angelozerr/tern.java/wiki/Tern-Linter-ESLint)
 * [TextMate 2](https://github.com/natesilva/javascript-eslint.tmbundle)
 * Atom: [linter-eslint](https://atom.io/packages/linter-eslint)
diff --git a/docs/user-guide/migrating-to-2.0.0.md b/docs/user-guide/migrating-to-2.0.0.md
index 5b2c541e0..95a3a1774 100644
--- a/docs/user-guide/migrating-to-2.0.0.md
+++ b/docs/user-guide/migrating-to-2.0.0.md
@@ -285,7 +285,7 @@ if (variable) {
 }
 ```
 
-Further Reading: http://estools.github.io/escope/
+Further Reading: https://estools.github.io/escope/
 
 ## Default Changes When Using `eslint:recommended`
 
diff --git a/lib/rules/indent.js b/lib/rules/indent.js
index 42cebf9ea..511ee07c0 100644
--- a/lib/rules/indent.js
+++ b/lib/rules/indent.js
@@ -600,6 +600,9 @@ module.exports = {
                                 pattern: ":exit$"
                             }
                         }
+                    },
+                    ignoreComments: {
+                        type: "boolean"
                     }
                 },
                 additionalProperties: false
@@ -638,7 +641,8 @@ module.exports = {
             ObjectExpression: 1,
             ImportDeclaration: 1,
             flatTernaryExpressions: false,
-            ignoredNodes: []
+            ignoredNodes: [],
+            ignoreComments: false
         };
 
         if (context.options.length) {
@@ -1457,6 +1461,12 @@ module.exports = {
                 },
                 "Program:exit"() {
 
+                    // If ignoreComments option is enabled, ignore all comment tokens.
+                    if (options.ignoreComments) {
+                        sourceCode.getAllComments()
+                            .forEach(comment => offsets.ignoreToken(comment));
+                    }
+
                     // Invoke the queued offset listeners for the nodes that aren't ignored.
                     listenerCallQueue
                         .filter(nodeInfo => !ignoredNodes.has(nodeInfo.node))
diff --git a/lib/rules/no-extra-parens.js b/lib/rules/no-extra-parens.js
index d8e0df64a..1025aa5a9 100644
--- a/lib/rules/no-extra-parens.js
+++ b/lib/rules/no-extra-parens.js
@@ -582,7 +582,7 @@ module.exports = {
                         tokensToIgnore.add(firstLeftToken);
                     }
                 }
-                if (hasExcessParens(node.right)) {
+                if (!(node.type === "ForOfStatement" && node.right.type === "SequenceExpression") && hasExcessParens(node.right)) {
                     report(node.right);
                 }
                 if (hasExcessParens(node.left)) {
diff --git a/lib/rules/no-unused-vars.js b/lib/rules/no-unused-vars.js
index 05940d593..04c2bc879 100644
--- a/lib/rules/no-unused-vars.js
+++ b/lib/rules/no-unused-vars.js
@@ -105,26 +105,21 @@ module.exports = {
          * @returns {string} The warning message to be used with this unused variable.
          */
         function getDefinedMessage(unusedVar) {
+            const defType = unusedVar.defs && unusedVar.defs[0] && unusedVar.defs[0].type;
             let type;
             let pattern;
 
-            if (config.varsIgnorePattern) {
+            if (defType === "CatchClause" && config.caughtErrorsIgnorePattern) {
+                type = "args";
+                pattern = config.caughtErrorsIgnorePattern.toString();
+            } else if (defType === "Parameter" && config.argsIgnorePattern) {
+                type = "args";
+                pattern = config.argsIgnorePattern.toString();
+            } else if (defType !== "Parameter" && config.varsIgnorePattern) {
                 type = "vars";
                 pattern = config.varsIgnorePattern.toString();
             }
 
-            if (unusedVar.defs && unusedVar.defs[0] && unusedVar.defs[0].type) {
-                const defType = unusedVar.defs[0].type;
-
-                if (defType === "CatchClause" && config.caughtErrorsIgnorePattern) {
-                    type = "args";
-                    pattern = config.caughtErrorsIgnorePattern.toString();
-                } else if (defType === "Parameter" && config.argsIgnorePattern) {
-                    type = "args";
-                    pattern = config.argsIgnorePattern.toString();
-                }
-            }
-
             const additional = type ? ` Allowed unused ${type} must match ${pattern}.` : "";
 
             return `'{{name}}' is defined but never used.${additional}`;


Test patch:
diff --git a/docs/developer-guide/unit-tests.md b/docs/developer-guide/unit-tests.md
index 863bd444f..3c45d67a4 100644
--- a/docs/developer-guide/unit-tests.md
+++ b/docs/developer-guide/unit-tests.md
@@ -1,6 +1,6 @@
 # Unit Tests
 
-Most parts of ESLint have unit tests associated with them. Unit tests are written using [Mocha](http://mochajs.org/) and are required when making contributions to ESLint. You'll find all of the unit tests in the `tests` directory.
+Most parts of ESLint have unit tests associated with them. Unit tests are written using [Mocha](https://mochajs.org/) and are required when making contributions to ESLint. You'll find all of the unit tests in the `tests` directory.
 
 When you first get the source code, you need to run `npm install` once initially to set ESLint for development. Once you've done that, you can run the tests via:
 
diff --git a/lib/testers/rule-tester.js b/lib/testers/rule-tester.js
index aae66301d..7e69c9619 100644
--- a/lib/testers/rule-tester.js
+++ b/lib/testers/rule-tester.js
@@ -131,13 +131,31 @@ const DESCRIBE = Symbol("describe");
 const IT = Symbol("it");
 
 /**
- * This is `it` or `describe` if those don't exist.
+ * This is `it` default handler if `it` don't exist.
  * @this {Mocha}
  * @param {string} text - The description of the test case.
  * @param {Function} method - The logic of the test case.
  * @returns {any} Returned value of `method`.
  */
-function defaultHandler(text, method) {
+function itDefaultHandler(text, method) {
+    try {
+        return method.apply(this);
+    } catch (err) {
+        if (err instanceof assert.AssertionError) {
+            err.message += ` (${util.inspect(err.actual)} ${err.operator} ${util.inspect(err.expected)})`;
+        }
+        throw err;
+    }
+}
+
+/**
+ * This is `describe` default handler if `describe` don't exist.
+ * @this {Mocha}
+ * @param {string} text - The description of the test case.
+ * @param {Function} method - The logic of the test case.
+ * @returns {any} Returned value of `method`.
+ */
+function describeDefaultHandler(text, method) {
     return method.apply(this);
 }
 
@@ -212,7 +230,7 @@ class RuleTester {
     static get describe() {
         return (
             this[DESCRIBE] ||
-            (typeof describe === "function" ? describe : defaultHandler)
+            (typeof describe === "function" ? describe : describeDefaultHandler)
         );
     }
 
@@ -223,7 +241,7 @@ class RuleTester {
     static get it() {
         return (
             this[IT] ||
-            (typeof it === "function" ? it : defaultHandler)
+            (typeof it === "function" ? it : itDefaultHandler)
         );
     }
 
diff --git a/tests/lib/rules/indent.js b/tests/lib/rules/indent.js
index 8f33a3a38..4ec4975bc 100644
--- a/tests/lib/rules/indent.js
+++ b/tests/lib/rules/indent.js
@@ -4774,6 +4774,28 @@ ruleTester.run("indent", rule, {
                 ]
             `,
             options: ["tab", { ArrayExpression: "first", ignoredNodes: ["CallExpression"] }]
+        },
+        {
+            code: unIndent`
+                if (foo) {
+                    doSomething();
+
+                // Intentionally unindented comment
+                    doSomethingElse();
+                }
+            `,
+            options: [4, { ignoreComments: true }]
+        },
+        {
+            code: unIndent`
+                if (foo) {
+                    doSomething();
+
+                /* Intentionally unindented comment */
+                    doSomethingElse();
+                }
+            `,
+            options: [4, { ignoreComments: true }]
         }
     ],
 
@@ -9199,6 +9221,46 @@ ruleTester.run("indent", rule, {
                 ignoredNodes: ["ExpressionStatement > CallExpression > FunctionExpression.callee > BlockStatement"]
             }],
             errors: expectedErrors([3, 4, 0, "Identifier"])
+        },
+        {
+            code: unIndent`
+                if (foo) {
+                    doSomething();
+
+                // Intentionally unindented comment
+                    doSomethingElse();
+                }
+            `,
+            output: unIndent`
+                if (foo) {
+                    doSomething();
+
+                    // Intentionally unindented comment
+                    doSomethingElse();
+                }
+            `,
+            options: [4, { ignoreComments: false }],
+            errors: expectedErrors([4, 4, 0, "Line"])
+        },
+        {
+            code: unIndent`
+                if (foo) {
+                    doSomething();
+
+                /* Intentionally unindented comment */
+                    doSomethingElse();
+                }
+            `,
+            output: unIndent`
+                if (foo) {
+                    doSomething();
+
+                    /* Intentionally unindented comment */
+                    doSomethingElse();
+                }
+            `,
+            options: [4, { ignoreComments: false }],
+            errors: expectedErrors([4, 4, 0, "Block"])
         }
     ]
 });
diff --git a/tests/lib/rules/no-extra-parens.js b/tests/lib/rules/no-extra-parens.js
index 7753c7d66..cab241a0a 100644
--- a/tests/lib/rules/no-extra-parens.js
+++ b/tests/lib/rules/no-extra-parens.js
@@ -145,7 +145,9 @@ ruleTester.run("no-extra-parens", rule, {
         "do; while(a);",
         "for(;;);",
         "for(a in b);",
+        "for(a in b, c);",
         "for(a of b);",
+        "for (a of (b, c));",
         "var a = (b, c);",
         "[]",
         "[a, b]",
@@ -1035,6 +1037,7 @@ ruleTester.run("no-extra-parens", rule, {
             "for (let.foo.bar in baz);",
             "Identifier",
             1
-        )
+        ),
+        invalid("for (a in (b, c));", "for (a in b, c);", "SequenceExpression", null)
     ]
 });
diff --git a/tests/lib/rules/no-unused-vars.js b/tests/lib/rules/no-unused-vars.js
index 3e452ce3d..9615c62dd 100644
--- a/tests/lib/rules/no-unused-vars.js
+++ b/tests/lib/rules/no-unused-vars.js
@@ -675,6 +675,18 @@ ruleTester.run("no-unused-vars", rule, {
                 "'a' is defined but never used.",
                 "'c' is defined but never used."
             ]
+        },
+
+        // https://github.com/eslint/eslint/issues/9774
+        {
+            code: "(function(_a) {})();",
+            options: [{ args: "all", varsIgnorePattern: "^_" }],
+            errors: [{ message: "'_a' is defined but never used." }]
+        },
+        {
+            code: "(function(_a) {})();",
+            options: [{ args: "all", caughtErrorsIgnorePattern: "^_" }],
+            errors: [{ message: "'_a' is defined but never used." }]
         }
     ]
 });
diff --git a/tests/lib/testers/no-test-runners.js b/tests/lib/testers/no-test-runners.js
new file mode 100644
index 000000000..b77c6bb90
--- /dev/null
+++ b/tests/lib/testers/no-test-runners.js
@@ -0,0 +1,35 @@
+/**
+ * @fileoverview Tests for RuleTester without any test runner
+ * @author Weijia Wang <starkwang@126.com>
+ */
+"use strict";
+
+/* global describe, it */
+/* eslint-disable no-global-assign*/
+const assert = require("assert"),
+    RuleTester = require("../../../lib/testers/rule-tester");
+const tmpIt = it;
+const tmpDescribe = describe;
+
+it = null;
+describe = null;
+
+try {
+    const ruleTester = new RuleTester();
+
+    assert.throws(() => {
+        ruleTester.run("no-var", require("../../fixtures/testers/rule-tester/no-var"), {
+            valid: [
+                "bar = baz;"
+            ],
+            invalid: [
+                { code: "var foo = bar;", output: "invalid output", errors: 1 }
+            ]
+        });
+    }, /Output is incorrect\. \(' foo = bar;' == 'invalid output'\)$/);
+} catch (e) {
+    throw e;
+} finally {
+    it = tmpIt;
+    describe = tmpDescribe;
+}