Repository: eslint/eslint
Pull request #10433 (2018-06-01 18:26:18)

Docs: display team members in a table
<!--
    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

<!--
    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)**
display team members in a table, added avatars 😄 
![image](https://user-images.githubusercontent.com/13050025/41176458-07754f96-6b93-11e8-9574-3a8518aa18b8.png)


**Is there anything you'd like reviewers to focus on?**

~~The col width is not perfectly equal, so it looks a little strange.~~
~~please feel free to close if you don't like it. ❤️~~
fixed! see the above screenshot~~


platinumazure: I think it might be worth taking a look at how the "all contributors" CLI does this. I think they create a table with fixed-width cells, which looks nicer.
kaicataldo: I like the idea of this! Mind putting a screenshot in the description so that everyone can see what this change looks like?
kaicataldo: Should we remove the inline styles? Otherwise, this LGTM
not-an-aardvark: It looks a bit strange to me that some of the faces are squashed horizontally. Is there a way to make the widths even?
platinumazure: Hi @Aladdin-ADD, you might want to take a look at this table (autogenerated by allcontributors-cli in my README).

https://raw.githubusercontent.com/platinumazure/eslint-plugin-qunit/master/README.md (Search for "all-contributors")

Hope this helps!

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2b513d8df..97fa0bcb9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,21 @@
+v5.0.0-rc.0 - June 9, 2018
+
+* abf400d Update: Add ignoreDestructing option to camelcase rule (fixes #9807) (#10373) (Andrew Lunny)
+* e2b394d Upgrade: espree and eslint-scope to rc versions (#10457) (Kevin Partington)
+* a370da2 Chore: small opt to improve readability (#10241) (薛定谔的猫)
+* 640bf07 Update: Fixes multiline no-warning-comments rule. (fixes #9884) (#10381) (Scott Stern)
+* 831c39a Build: Adding rc release script to package.json (#10456) (Kevin Partington)
+* dc4075e Update: fix false negative in no-use-before-define (fixes #10227) (#10396) (Toru Nagashima)
+* 3721841 Docs: Add new experimental syntax policy to README (fixes #9804) (#10408) (Kevin Partington)
+* d0aae3c Docs: Create docs landing page (#10453) (Kevin Partington)
+* fe8bec3 Fix: fix writing config file when `source` is `prompt` (#10422) (Pig Fang)
+* 917108d Update: Add requireParamType option to valid-jsdoc (fixes #6753) (#10220) (Tomasz Sterna)
+* 1984c21 Docs: move custom parsers docs into a page (fixes #9919) (#10431) (Pig Fang)
+* 400d4b5 Docs: Add rest and spread operator changes to migration guide (#10416) (Yannick Croissant)
+* e7bdd02 Upgrade: Consume espree@4.0.0-alpha.1 (#10410) (Kevin Partington)
+* 3e9f33a Fix: prevent crashing from JSON parsing error (fixes #10364) (#10376) (Pig Fang)
+* 636457d Fix: parse later ES files in `eslint --init` (fixes #10003) (#10378) (Pig Fang)
+
 v5.0.0-alpha.4 - May 28, 2018
 
 * ce3e62a Docs: remove test coverage badge (#10407) (薛定谔的猫)
diff --git a/README.md b/README.md
index 95c272094..3a2a5e20e 100644
--- a/README.md
+++ b/README.md
@@ -145,7 +145,9 @@ ESLint has full support for ECMAScript 3, 5 (default), 2015, 2016, 2017, and 201
 
 ### What about experimental features?
 
-ESLint doesn't natively support experimental ECMAScript language features. You can use [babel-eslint](https://github.com/babel/babel-eslint) to use any option available in Babel.
+ESLint's parser only officially supports the latest final ECMAScript standard. We will make changes to core rules in order to avoid crashes on stage 3 ECMAScript syntax proposals (as long as they are implemented using the correct experimental ESTree syntax). We may make changes to core rules to better work with language extensions (such as JSX, Flow, and TypeScript) on a case-by-case basis.
+
+In other cases (including if rules need to warn on more or fewer cases due to new syntax, rather than just not crashing), we recommend you use other parsers and/or rule plugins. If you are using Babel, you can use the [babel-eslint](https://github.com/babel/babel-eslint) parser and [eslint-plugin-babel](https://github.com/babel/eslint-plugin-babel) to use any option available in Babel.
 
 Once a language feature has been adopted into the ECMAScript standard (stage 4 according to the [TC39 process](https://tc39.github.io/process-document/)), we will accept issues and pull requests related to the new feature, subject to our [contributing guidelines](https://eslint.org/docs/developer-guide/contributing). Until then, please use the appropriate parser and plugin(s) for your experimental feature.
 
@@ -193,34 +195,147 @@ These folks keep the project moving and are resources for help.
 
 ### Technical Steering Committee (TSC)
 
-* Nicholas C. Zakas ([@nzakas](https://github.com/nzakas))
-* Ilya Volodin ([@ilyavolodin](https://github.com/ilyavolodin))
-* Brandon Mills ([@btmills](https://github.com/btmills))
-* Gyandeep Singh ([@gyandeeps](https://github.com/gyandeeps))
-* Toru Nagashima ([@mysticatea](https://github.com/mysticatea))
-* Alberto Rodríguez ([@alberto](https://github.com/alberto))
-* Kai Cataldo ([@kaicataldo](https://github.com/kaicataldo))
-* Teddy Katz ([@not-an-aardvark](https://github.com/not-an-aardvark))
-* Kevin Partington ([@platinumazure](https://github.com/platinumazure))
+<table>
+    <tbody>
+        <tr>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/nzakas">
+                <img src="https://github.com/nzakas.png?s=75" width="75px" height="75px"><br/>
+                <sub>Nicholas C. Zakas</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/ilyavolodin">
+                <img src="https://github.com/ilyavolodin.png?s=75" width="75px" height="75px"><br/>
+                <sub>Ilya Volodin</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/btmills">
+                <img src="https://github.com/btmills.png?s=75" width="75px" height="75px"><br/>
+                <sub>Brandon Mills</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/gyandeeps">
+                <img src="https://github.com/gyandeeps.png?s=75" width="75px" height="75px"><br/>
+                <sub>Gyandeep Singh</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a  href="https://github.com/mysticatea">
+                <img src="https://github.com/mysticatea.png?s=75" width="75px" height="75px"><br/>
+                <sub>Toru Nagashima</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/alberto">
+                <img src="https://github.com/alberto.png?s=75" width="75px" height="75px"><br/>
+                <sub>Alberto Rodríguez</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/kaicataldo">
+                <img src="https://github.com/kaicataldo.png?s=75" width="75px" height="75px"><br/>
+                <sub>Kai Cataldo</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/not-an-aardvark">
+                <img src="https://github.com/not-an-aardvark.png?s=75" width="75px" height="75px"><br/>
+                <sub>Teddy Katz</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/platinumazure">
+                <img src="https://github.com/platinumazure.png?s=75" width="75px" height="75px"><br/>
+                <sub>Kevin Partington</sub></a>
+            </td>
+        </tr>
+    </tbody>
+</table>
 
 ### Development Team
 
-* Mathias Schreck ([@lo1tuma](https://github.com/lo1tuma))
-* Jamund Ferguson ([@xjamundx](https://github.com/xjamundx))
-* Ian VanSchooten ([@ianvs](https://github.com/ianvs))
-* Burak Yiğit Kaya ([@byk](https://github.com/byk))
-* Michael Ficarra ([@michaelficarra](https://github.com/michaelficarra))
-* Mark Pedrotti ([@pedrottimark](https://github.com/pedrottimark))
-* Oleg Gaidarenko ([@markelog](https://github.com/markelog))
-* Mike Sherov ([@mikesherov](https://github.com/mikesherov))
-* Henry Zhu ([@hzoo](https://github.com/hzoo))
-* Marat Dulin ([@mdevils](https://github.com/mdevils))
-* Alexej Yaroshevich ([@zxqfox](https://github.com/zxqfox))
-* Vitor Balocco ([@vitorbal](https://github.com/vitorbal))
-* James Henry ([@JamesHenry](https://github.com/JamesHenry))
-* Reyad Attiyat ([@soda0289](https://github.com/soda0289))
-* 薛定谔的猫 ([@Aladdin-ADD](https://github.com/Aladdin-ADD))
-* Victor Hom ([@VictorHom](https://github.com/VictorHom))
+<table>
+    <tbody>
+        <tr>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/lo1tuma">
+                <img src="https://github.com/lo1tuma.png?s=75" width="75px" height="75px"><br/>
+                <sub>Mathias Schreck</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/xjamundx">
+                <img src="https://github.com/xjamundx.png?s=75" width="75px" height="75px"><br/>
+                <sub>Jamund Ferguson</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/ianvs">
+                <img src="https://github.com/ianvs.png?s=75" width="75px" height="75px"><br/>
+                <sub>Ian VanSchooten</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/byk">
+                <img src="https://github.com/byk.png?s=75" width="75px" height="75px"><br/>
+                <sub>Burak Yiğit Kaya</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/michaelficarra">
+                <img src="https://github.com/michaelficarra.png?s=75" width="75px" height="75px"><br/>
+                <sub>Michael Ficarra</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <img src="https://github.com/pedrottimark.png?s=75" width="75px" height="75px"><br/>
+                <a href="https://github.com/pedrottimark">Mark Pedrotti</a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/markelog">
+                <img src="https://github.com/markelog.png?s=75" width="75px" height="75px"><br/>
+                <sub>Oleg Gaidarenko</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/mikesherov">
+                <img src="https://github.com/mikesherov.png?s=75" width="75px" height="75px"><br/>
+                <sub>Mike Sherov</sub></a>
+            </td>
+        </tr>
+        <tr>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/hzoo">
+                <img src="https://github.com/hzoo.png?s=75" width="75px" height="75px"><br/>
+                <sub>Henry Zhu</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/mdevils">
+                <img src="https://github.com/mdevils.png?s=75" width="75px" height="75px"><br/>
+                <sub>Marat Dulin</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/zxqfox">
+                <img src="https://github.com/zxqfox.png?s=75" width="75px" height="75px"><br/>
+                <sub>Alexej Yaroshevich</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/vitorbal">
+                <img src="https://github.com/vitorbal.png?s=75" width="75px" height="75px"><br/>
+                <sub>Vitor Balocco</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/JamesHenry">
+                <img src="https://github.com/JamesHenry.png?s=75" width="75px" height="75px"><br/>
+                <sub>James Henry</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/soda0289">
+                <img src="https://github.com/soda0289.png?s=75" width="75px" height="75px"><br/>
+                <sub>Reyad Attiyat</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/Aladdin-ADD">
+                <img src="https://github.com/Aladdin-ADD.png?s=75" width="75px" height="75px"><br/>
+                <sub>薛定谔的猫</sub></a>
+            </td>
+            <td align="center" valign="top" width="11%">
+                <a href="https://github.com/VictorHom">
+                <img src="https://github.com/VictorHom.png?s=75" width="75px" height="75px"><br/>
+                <sub>Victor Hom</sub></a>
+            </td>
+        </tr>
+    </tbody>
+</table>
 
 ## Sponsors
 
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 000000000..8f5223a74
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,17 @@
+# Documentation
+
+Welcome to our documentation pages! What would you like to view?
+
+## [User Guide](user-guide)
+
+Intended for end users of ESLint. Contains information about core rules, configuration, command line options, formatters, and integrations,
+as well as guides for migrating from earlier versions of ESLint.
+
+## [Developer Guide](developer-guide)
+
+Intended for contributors to ESLint and people who wish to extend ESLint. Contains information about contributing to ESLint; creating custom
+rules, configurations, plugins, and formatters; and information about our architecture and Node.js API.
+
+## [Maintainer Guide](maintainer-guide)
+
+Intended for maintainers of ESLint.
diff --git a/docs/rules/camelcase.md b/docs/rules/camelcase.md
index faeb92398..cce3fd924 100644
--- a/docs/rules/camelcase.md
+++ b/docs/rules/camelcase.md
@@ -12,8 +12,10 @@ This rule has an object option:
 
 * `"properties": "always"` (default) enforces camelcase style for property names
 * `"properties": "never"` does not check property names
+* `"ignoreDestructuring": false` (default) enforces camelcase style for destructured identifiers
+* `"ignoreDestructuring": true` does not check destructured identifiers
 
-### always
+### properties: "always"
 
 Examples of **incorrect** code for this rule with the default `{ "properties": "always" }` option:
 
@@ -95,7 +97,7 @@ var { foo: isCamelCased = 1 } = quz;
 
 ```
 
-### never
+### properties: "never"
 
 Examples of **correct** code for this rule with the `{ "properties": "never" }` option:
 
@@ -107,6 +109,48 @@ var obj = {
 };
 ```
 
+### ignoreDestructuring: false
+
+Examples of **incorrect** code for this rule with the default `{ "ignoreDestructuring": false }` option:
+
+```js
+/*eslint camelcase: "error"*/
+
+var { category_id } = query;
+
+var { category_id = 1 } = query;
+
+var { category_id: category_id } = query;
+
+var { category_id: category_alias } = query;
+
+var { category_id: categoryId, ...other_props } = query;
+```
+
+### ignoreDestructuring: true
+
+Examples of **incorrect** code for this rule with the `{ "ignoreDestructuring": true }` option:
+
+```js
+/*eslint camelcase: ["error", {ignoreDestructuring: true}]*/
+
+var { category_id: category_alias } = query;
+
+var { category_id, ...other_props } = query;
+```
+
+Examples of **correct** code for this rule with the `{ "ignoreDestructuring": true }` option:
+
+```js
+/*eslint camelcase: ["error", {ignoreDestructuring: true}]*/
+
+var { category_id } = query;
+
+var { category_id = 1 } = query;
+
+var { category_id: category_id } = query;
+```
+
 ## When Not To Use It
 
 If you have established coding standards using a different naming convention (separating words with underscores), turn this rule off.
diff --git a/docs/rules/valid-typeof.md b/docs/rules/valid-typeof.md
index 60539eecb..2ce02b490 100644
--- a/docs/rules/valid-typeof.md
+++ b/docs/rules/valid-typeof.md
@@ -20,7 +20,7 @@ Examples of **incorrect** code for this rule:
 typeof foo === "strnig"
 typeof foo == "undefimed"
 typeof bar != "nunber"
-typeof bar !== "function"
+typeof bar !== "fucntion"
 ```
 
 Examples of **correct** code for this rule:
diff --git a/lib/config.js b/lib/config.js
index 7ba5cd6e2..2eeaad181 100644
--- a/lib/config.js
+++ b/lib/config.js
@@ -209,7 +209,7 @@ class Config {
             const localConfigHierarchyCache = this.configCache.getHierarchyLocalConfigs(localConfigDirectory);
 
             if (localConfigHierarchyCache) {
-                const localConfigHierarchy = localConfigHierarchyCache.concat(configs.reverse());
+                const localConfigHierarchy = localConfigHierarchyCache.concat(configs);
 
                 this.configCache.setHierarchyLocalConfigs(searched, localConfigHierarchy);
                 return localConfigHierarchy;
@@ -232,7 +232,7 @@ class Config {
             }
 
             debug(`Using ${localConfigFile}`);
-            configs.push(localConfig);
+            configs.unshift(localConfig);
             searched.push(localConfigDirectory);
 
             // Stop traversing if a config is found with the root flag set
@@ -248,7 +248,7 @@ class Config {
             const personalConfig = this.getPersonalConfig();
 
             if (personalConfig) {
-                configs.push(personalConfig);
+                configs.unshift(personalConfig);
             } else if (!hasRules(this.options) && !this.options.baseConfig) {
 
                 // No config file, no manual configuration, and no rules, so error.
@@ -265,7 +265,7 @@ class Config {
         }
 
         // Set the caches for the parent directories
-        this.configCache.setHierarchyLocalConfigs(searched, configs.reverse());
+        this.configCache.setHierarchyLocalConfigs(searched, configs);
 
         return configs;
     }
diff --git a/lib/ignored-paths.js b/lib/ignored-paths.js
index 0371e5e10..8134d6d32 100644
--- a/lib/ignored-paths.js
+++ b/lib/ignored-paths.js
@@ -236,7 +236,7 @@ class IgnoredPaths {
     /**
      * Determine whether a file path is included in the default or custom ignore patterns
      * @param {string} filepath Path to check
-     * @param {string} [category=null] check 'default', 'custom' or both (null)
+     * @param {string} [category=undefined] check 'default', 'custom' or both (undefined)
      * @returns {boolean} true if the file path matches one or more patterns, false otherwise
      */
     contains(filepath, category) {
@@ -245,12 +245,11 @@ class IgnoredPaths {
         const absolutePath = path.resolve(this.options.cwd, filepath);
         const relativePath = pathUtil.getRelativePath(absolutePath, this.baseDir);
 
-        if ((typeof category === "undefined") || (category === "default")) {
-            result = result || (this.ig.default.filter([relativePath]).length === 0);
-        }
-
-        if ((typeof category === "undefined") || (category === "custom")) {
-            result = result || (this.ig.custom.filter([relativePath]).length === 0);
+        if (typeof category === "undefined") {
+            result = (this.ig.default.filter([relativePath]).length === 0) ||
+                (this.ig.custom.filter([relativePath]).length === 0);
+        } else {
+            result = (this.ig[category].filter([relativePath]).length === 0);
         }
 
         return result;
diff --git a/lib/rules/camelcase.js b/lib/rules/camelcase.js
index 84db54ff2..ec6116621 100644
--- a/lib/rules/camelcase.js
+++ b/lib/rules/camelcase.js
@@ -22,6 +22,9 @@ module.exports = {
             {
                 type: "object",
                 properties: {
+                    ignoreDestructuring: {
+                        type: "boolean"
+                    },
                     properties: {
                         enum: ["always", "never"]
                     }
@@ -57,6 +60,26 @@ module.exports = {
             return name.indexOf("_") > -1 && name !== name.toUpperCase();
         }
 
+        /**
+         * Checks if a parent of a node is an ObjectPattern.
+         * @param {ASTNode} node The node to check.
+         * @returns {boolean} if the node is inside an ObjectPattern
+         * @private
+         */
+        function isInsideObjectPattern(node) {
+            let { parent } = node;
+
+            while (parent) {
+                if (parent.type === "ObjectPattern") {
+                    return true;
+                }
+
+                parent = parent.parent;
+            }
+
+            return false;
+        }
+
         /**
          * Reports an AST node as a rule violation.
          * @param {ASTNode} node The node to report.
@@ -72,6 +95,7 @@ module.exports = {
 
         const options = context.options[0] || {};
         let properties = options.properties || "";
+        const ignoreDestructuring = options.ignoreDestructuring || false;
 
         if (properties !== "always" && properties !== "never") {
             properties = "always";
@@ -113,24 +137,28 @@ module.exports = {
                 } else if (node.parent.type === "Property" || node.parent.type === "AssignmentPattern") {
 
                     if (node.parent.parent && node.parent.parent.type === "ObjectPattern") {
-
                         if (node.parent.shorthand && node.parent.value.left && isUnderscored(name)) {
 
                             report(node);
                         }
 
+                        const assignmentKeyEqualsValue = node.parent.key.name === node.parent.value.name;
+
                         // prevent checking righthand side of destructured object
-                        if (node.parent.key === node && node.parent.value !== node) {
+                        if (!assignmentKeyEqualsValue && node.parent.key === node) {
                             return;
                         }
 
-                        if (node.parent.value.name && isUnderscored(name)) {
+                        const valueIsUnderscored = node.parent.value.name && isUnderscored(name);
+
+                        // ignore destructuring if the option is set, unless a new identifier is created
+                        if (valueIsUnderscored && !(assignmentKeyEqualsValue && ignoreDestructuring)) {
                             report(node);
                         }
                     }
 
-                    // "never" check properties
-                    if (properties === "never") {
+                    // "never" check properties or always ignore destructuring
+                    if (properties === "never" || (ignoreDestructuring && isInsideObjectPattern(node))) {
                         return;
                     }
 
diff --git a/lib/rules/no-use-before-define.js b/lib/rules/no-use-before-define.js
index 37b8e11ca..64d825702 100644
--- a/lib/rules/no-use-before-define.js
+++ b/lib/rules/no-use-before-define.js
@@ -219,49 +219,14 @@ module.exports = {
                     data: reference.identifier
                 });
             });
-        }
 
-        /**
-         * Validates variables inside of a node's scope.
-         * @param {ASTNode} node The node to check.
-         * @returns {void}
-         * @private
-         */
-        function findVariables() {
-            const scope = context.getScope();
-
-            findVariablesInScope(scope);
+            scope.childScopes.forEach(findVariablesInScope);
         }
 
-        const ruleDefinition = {
-            "Program:exit"(node) {
-                const scope = context.getScope(),
-                    ecmaFeatures = context.parserOptions.ecmaFeatures || {};
-
-                findVariablesInScope(scope);
-
-                // both Node.js and Modules have an extra scope
-                if (ecmaFeatures.globalReturn || node.sourceType === "module") {
-                    findVariablesInScope(scope.childScopes[0]);
-                }
+        return {
+            Program() {
+                findVariablesInScope(context.getScope());
             }
         };
-
-        if (context.parserOptions.ecmaVersion >= 6) {
-            ruleDefinition["BlockStatement:exit"] =
-                ruleDefinition["SwitchStatement:exit"] = findVariables;
-
-            ruleDefinition["ArrowFunctionExpression:exit"] = function(node) {
-                if (node.body.type !== "BlockStatement") {
-                    findVariables();
-                }
-            };
-        } else {
-            ruleDefinition["FunctionExpression:exit"] =
-                ruleDefinition["FunctionDeclaration:exit"] =
-                ruleDefinition["ArrowFunctionExpression:exit"] = findVariables;
-        }
-
-        return ruleDefinition;
     }
 };
diff --git a/lib/rules/no-warning-comments.js b/lib/rules/no-warning-comments.js
index ce58f9ac8..4e05cc411 100644
--- a/lib/rules/no-warning-comments.js
+++ b/lib/rules/no-warning-comments.js
@@ -57,6 +57,8 @@ module.exports = {
          */
         function convertToRegExp(term) {
             const escaped = term.replace(/[-/\\$^*+?.()|[\]{}]/g, "\\$&");
+            const wordBoundary = "\\b";
+            const eitherOrWordBoundary = `|${wordBoundary}`;
             let prefix;
 
             /*
@@ -79,12 +81,27 @@ module.exports = {
                  */
                 prefix = "^\\s*";
             } else if (/^\w/.test(term)) {
-                prefix = "\\b";
+                prefix = wordBoundary;
             } else {
                 prefix = "";
             }
 
-            return new RegExp(prefix + escaped + suffix, "i");
+            if (location === "start") {
+
+                /*
+                 * For location "start" the regex should be
+                 * ^\s*TERM\b.  This checks the word boundary
+                 * at the beginning of the comment.
+                 */
+                return new RegExp(prefix + escaped + suffix, "i");
+            }
+
+            /*
+             * For location "anywhere" the regex should be
+             * \bTERM\b|\bTERM\b, this checks the entire comment
+             * for the term.
+             */
+            return new RegExp(prefix + escaped + suffix + eitherOrWordBoundary + term + wordBoundary, "i");
         }
 
         const warningRegExps = warningTerms.map(convertToRegExp);
diff --git a/package.json b/package.json
index 0d6b322e7..5344f25fd 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "eslint",
-  "version": "5.0.0-alpha.4",
+  "version": "5.0.0-rc.0",
   "author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
   "description": "An AST-based pattern checker for JavaScript.",
   "bin": {
@@ -15,6 +15,7 @@
     "ci-release": "node Makefile.js ciRelease",
     "alpharelease": "node Makefile.js prerelease -- alpha",
     "betarelease": "node Makefile.js prerelease -- beta",
+    "rcrelease": "node Makefile.js prerelease -- rc",
     "docs": "node Makefile.js docs",
     "gensite": "node Makefile.js gensite",
     "browserify": "node Makefile.js browserify",
@@ -40,9 +41,9 @@
     "cross-spawn": "^6.0.5",
     "debug": "^3.1.0",
     "doctrine": "^2.1.0",
-    "eslint-scope": "^4.0.0-alpha.0",
+    "eslint-scope": "^4.0.0-rc.0",
     "eslint-visitor-keys": "^1.0.0",
-    "espree": "^4.0.0-alpha.1",
+    "espree": "^4.0.0-rc.0",
     "esquery": "^1.0.1",
     "esutils": "^2.0.2",
     "file-entry-cache": "^2.0.0",


Test patch:
diff --git a/tests/lib/rules/camelcase.js b/tests/lib/rules/camelcase.js
index 78921bc50..f21459085 100644
--- a/tests/lib/rules/camelcase.js
+++ b/tests/lib/rules/camelcase.js
@@ -91,6 +91,21 @@ ruleTester.run("camelcase", rule, {
             code: "obj.foo_bar = function(){};",
             options: [{ properties: "never" }]
         },
+        {
+            code: "var { category_id } = query;",
+            options: [{ ignoreDestructuring: true }],
+            parserOptions: { ecmaVersion: 6 }
+        },
+        {
+            code: "var { category_id: category_id } = query;",
+            options: [{ ignoreDestructuring: true }],
+            parserOptions: { ecmaVersion: 6 }
+        },
+        {
+            code: "var { category_id = 1 } = query;",
+            options: [{ ignoreDestructuring: true }],
+            parserOptions: { ecmaVersion: 6 }
+        },
         {
             code: "var { category_id: category } = query;",
             parserOptions: { ecmaVersion: 6 }
@@ -292,12 +307,36 @@ ruleTester.run("camelcase", rule, {
             ]
         },
         {
-            code: "var { category_id: category_id } = query;",
+            code: "var { category_id: category_alias } = query;",
             parserOptions: { ecmaVersion: 6 },
             errors: [
                 {
                     messageId: "notCamelCase",
-                    data: { name: "category_id" },
+                    data: { name: "category_alias" },
+                    type: "Identifier"
+                }
+            ]
+        },
+        {
+            code: "var { category_id: category_alias } = query;",
+            options: [{ ignoreDestructuring: true }],
+            parserOptions: { ecmaVersion: 6 },
+            errors: [
+                {
+                    messageId: "notCamelCase",
+                    data: { name: "category_alias" },
+                    type: "Identifier"
+                }
+            ]
+        },
+        {
+            code: "var { category_id: categoryId, ...other_props } = query;",
+            options: [{ ignoreDestructuring: true }],
+            parserOptions: { ecmaVersion: 2018 },
+            errors: [
+                {
+                    messageId: "notCamelCase",
+                    data: { name: "other_props" },
                     type: "Identifier"
                 }
             ]
diff --git a/tests/lib/rules/no-use-before-define.js b/tests/lib/rules/no-use-before-define.js
index f7f9382bb..1d1df968b 100644
--- a/tests/lib/rules/no-use-before-define.js
+++ b/tests/lib/rules/no-use-before-define.js
@@ -113,6 +113,55 @@ ruleTester.run("no-use-before-define", rule, {
             code: "foo; var foo;",
             options: [{ variables: false }],
             errors: [{ message: "'foo' was used before it was defined.", type: "Identifier" }]
+        },
+
+        // https://github.com/eslint/eslint/issues/10227
+        {
+            code: "for (let x = x;;); let x = 0",
+            parserOptions: { ecmaVersion: 2015 },
+            errors: ["'x' was used before it was defined."]
+        },
+        {
+            code: "for (let x in xs); let xs = []",
+            parserOptions: { ecmaVersion: 2015 },
+            errors: ["'xs' was used before it was defined."]
+        },
+        {
+            code: "for (let x of xs); let xs = []",
+            parserOptions: { ecmaVersion: 2015 },
+            errors: ["'xs' was used before it was defined."]
+        },
+        {
+            code: "try {} catch ({message = x}) {} let x = ''",
+            parserOptions: { ecmaVersion: 2015 },
+            errors: ["'x' was used before it was defined."]
+        },
+        {
+            code: "with (obj) x; let x = {}",
+            parserOptions: { ecmaVersion: 2015 },
+            errors: ["'x' was used before it was defined."]
+        },
+
+        // WithStatements.
+        {
+            code: "with (x); let x = {}",
+            parserOptions: { ecmaVersion: 2015 },
+            errors: ["'x' was used before it was defined."]
+        },
+        {
+            code: "with (obj) { x } let x = {}",
+            parserOptions: { ecmaVersion: 2015 },
+            errors: ["'x' was used before it was defined."]
+        },
+        {
+            code: "with (obj) { if (a) { x } } let x = {}",
+            parserOptions: { ecmaVersion: 2015 },
+            errors: ["'x' was used before it was defined."]
+        },
+        {
+            code: "with (obj) { (() => { if (a) { x } })() } let x = {}",
+            parserOptions: { ecmaVersion: 2015 },
+            errors: ["'x' was used before it was defined."]
         }
     ]
 });
diff --git a/tests/lib/rules/no-warning-comments.js b/tests/lib/rules/no-warning-comments.js
index ba9f654e1..3484d0a45 100644
--- a/tests/lib/rules/no-warning-comments.js
+++ b/tests/lib/rules/no-warning-comments.js
@@ -51,10 +51,15 @@ ruleTester.run("no-warning-comments", rule, {
         { code: "/* any fixme or todo */", options: [{ terms: ["fixme", "todo"], location: "anywhere" }], errors: [{ message: "Unexpected 'fixme' comment." }, { message: "Unexpected 'todo' comment." }] },
         { code: "/* any fixme or todo */", options: [{ location: "anywhere" }], errors: [{ message: "Unexpected 'todo' comment." }, { message: "Unexpected 'fixme' comment." }] },
         { code: "/* fixme and todo */", errors: [{ message: "Unexpected 'fixme' comment." }] },
+        { code: "/* fixme and todo */", options: [{ location: "anywhere" }], errors: [{ message: "Unexpected 'todo' comment." }, { message: "Unexpected 'fixme' comment." }] },
         { code: "/* any fixme */", options: [{ location: "anywhere" }], errors: [{ message: "Unexpected 'fixme' comment." }] },
         { code: "/* fixme! */", options: [{ terms: ["fixme"] }], errors: [{ message: "Unexpected 'fixme' comment." }] },
         { code: "// regex [litera|$]", options: [{ terms: ["[litera|$]"], location: "anywhere" }], errors: [{ message: "Unexpected '[litera|$]' comment." }] },
         { code: "/* eslint one-var: 2 */", options: [{ terms: ["eslint"] }], errors: [{ message: "Unexpected 'eslint' comment." }] },
-        { code: "/* eslint one-var: 2 */", options: [{ terms: ["one"], location: "anywhere" }], errors: [{ message: "Unexpected 'one' comment." }] }
+        { code: "/* eslint one-var: 2 */", options: [{ terms: ["one"], location: "anywhere" }], errors: [{ message: "Unexpected 'one' comment." }] },
+        { code: "/* any block comment with TODO, FIXME or XXX */", options: [{ location: "anywhere" }], errors: [{ message: "Unexpected 'todo' comment." }, { message: "Unexpected 'fixme' comment." }, { message: "Unexpected 'xxx' comment." }] },
+        { code: "/* any block comment with (TODO, FIXME's or XXX!) */", options: [{ location: "anywhere" }], errors: [{ message: "Unexpected 'todo' comment." }, { message: "Unexpected 'fixme' comment." }, { message: "Unexpected 'xxx' comment." }] },
+        { code: "/** \n *any block comment \n*with (TODO, FIXME's or XXX!) **/", options: [{ location: "anywhere" }], errors: [{ message: "Unexpected 'todo' comment." }, { message: "Unexpected 'fixme' comment." }, { message: "Unexpected 'xxx' comment." }] },
+        { code: "// any comment with TODO, FIXME or XXX", options: [{ location: "anywhere" }], errors: [{ message: "Unexpected 'todo' comment." }, { message: "Unexpected 'fixme' comment." }, { message: "Unexpected 'xxx' comment." }] }
     ]
 });