dart-lang / linter

Linter for Dart.
https://dart.dev/tools/linter-rules
BSD 3-Clause "New" or "Revised" License
628 stars 170 forks source link

Analyzer should warn when "dart:io" and "dart:html" are both available in the same library #5029

Open a14n opened 8 years ago

zoechi commented 8 years ago

Isn't that supported now on server-side code? dart:io on browser code doesn't make sense of course.

a14n commented 8 years ago

I haven't seen yet an embedder that expose both of these library.

For the context I got an issue reported on a package (https://github.com/a14n/dart-js-wrapping/issues/8#issuecomment-215124967) where the issue was caused by an import of a server-side library in a web endpoint. There should be something to avoid this mistake.

zoechi commented 8 years ago

I can't claim that I understand what's going on here https://groups.google.com/a/dartlang.org/forum/#!topic/reviews/-HJKjoBqz44, just remembered seeing it.

srawlins commented 1 year ago

Is the request here just to report a diagnostics when a library imports both dart:io and dart:html directly? Or something more about indirect imports?

srawlins commented 2 months ago

Moving to the linter repo as I think this would have false positives and should be opt-in.