google / google/closure-compiler
DepsGenerator wrong warning of duplicate require
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
[`DepsGenerator.DUPE_REQUIRE_WARNING`](https://github.com/google/closure-compiler/blob/5a2780b9b86e553acee9981524d8b02a5fdd32b7/src/com/google/javascript/jscomp/deps/DepsGenerator.java#L89) is reported for valid ES6 cases:
``` javascript
import {SomeNamedExport} from "A";
import {Lots, Of, Named, Exports} from "A";
import {Without, Having, Very, Long, Lines} from "A";
import MyDefaultExport from "A";
```
I know that DepsGenerator is rarely used outside of Google, but I'm one of those rare cases (supporting a WHITESPACE_ONLY case).
For myself, this is very low priority and anticipate this will be closed won't-fix. I'm silencing this warning myself. But have filed this for others and to see if there are any responses about the above pattern being not recommended - it's also a useful way of cleaning up a long list of imports without running into the "you won't have linebreaks in an import statement" compiler assumption - see https://github.com/google/closure-compiler/issues/2175.
Contributor guide
Assessment
This issue has not been assessed yet.