| Summary: | [eslint][es6] Expand no-use-before-define to handle class declarations | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Curtis Windatt <curtis.windatt.public> |
| Component: | JS Tools | Assignee: | Curtis Windatt <curtis.windatt.public> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Michael_Rennie |
| Version: | 12.0 | Flags: | Michael_Rennie:
review+
|
| Target Milestone: | 12.0 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Curtis Windatt
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=79518d711c4bab04468b0d03db299d4679a6e41b Expanded the rule for classes, also added handling for switch/arrow/blocks. Tests added for both es6 constructs and standard validator tests. Wiki page updated too. Reopening, this change causes multiple warnings tp be reported in the following scenario:
/*globals a b*/
var func = function() {
if (a) {
if (b) {}
else {}
} else {}
hey = "geez";
};
var hey;
where the project options are set to:
{
"plugins": {
"node": {}
},
"libs": [
"ecma5",
"browser"
],
"ecmaVersion": 5,
"sourceType": "script"
}
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=b58c5eb398e5a9951be74763fd847b76ff8ecd32 Adds different behaviour for ES5 vs ES6. |