| Summary: | [quickfix] The quickfix to add an unknown var to globals or eslint-env can disrupt element doc | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Michael Rennie <Michael_Rennie> |
| Component: | JS Tools | Assignee: | Michael Rennie <Michael_Rennie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 8.0 | ||
| Target Milestone: | 8.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Fix + tests: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=83be63b9493c4d7a0b3542121ae6af8263f8bcca Additional tweak for expression statements + more tests: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=3307adcedabc15f03db2591abf6eea790f153420 |
Consider the following snippet: /** * @name Foo.bar * @description description * @function * @returns returns */ Foo['bar'] = function() {}; Steps: 1. activate the quick fix to add 'Foo' to globals 2. notice it stuffs it in front of the existing JSDoc for the function - basically breaking that doc block as 'belonging' to the function. We should add some sanity checks to make sure this doesn't happen, but at the same time we want to avoid putting the globals / eslint-env directives before any common file header like the @license, etc.