| Summary: | [quickfix] Remove unused param leaves dangling comma | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Michael Rennie <Michael_Rennie> |
| Component: | JS Tools | Assignee: | Olivier Thomann <Olivier_Thomann> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Olivier_Thomann |
| Version: | 12.0 | ||
| Target Milestone: | 13.0 | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
This can be easily fixed when there is one element in the array, but when you have:
/*eslint-env amd */
define("webtools/htmlOutliner", [
'orion/objects', 'orion/edit',
], function(Objects, Edits) {
});
and you apply the quickfix for all, you end up with:
/*eslint-env amd */
define("webtools/htmlOutliner", [
,
], function() {
});
Each quickfix doesn't see itself as the last parameter to remove. It is only when both changes are applied that the array is empty.
I will see if removing an element into an array can check for trailing commas.
|
Consider the following snippet: define("webtools/htmlOutliner", [ 'orion/objects', ], function(Objects) { }); If you use the quickfix to remove the unused param it leaves a dangling comma. After the fix: define("webtools/htmlOutliner", [ , ], function() { });