| Summary: | eslint no-fallthrough rule mutates the backing AST | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Michael Rennie <Michael_Rennie> |
| Component: | JS Tools | Assignee: | Michael Rennie <Michael_Rennie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | ||
| Version: | 10.0 | ||
| Target Milestone: | 10.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Consider the following snippet: var tag = {}; switch(tag.title) { case 'name': { tag.name; break; } case 'return': { tag.description; break; } case 'throws': { tag.description; break; } case 'see': { tag.type; break; } } 1. turn on linting rule to detect switch case fallthroughs 2. turn on occurrences 3. make a change to the snippet (to have it parse + lint again) 4. select 'tag' in the second case statement Notice that no occurrences are marked in any of the case statements, except the last one.