Coder Social home page Coder Social logo

Comments (13)

harryterkelsen avatar harryterkelsen commented on May 29, 2024 3

Yes please! The linter should complain if:

  • imports are not correctly grouped into dart:, package: and relative imports
  • groups are not separated by a blank line
  • imports are not sorted alphabetically within groups

from linter.

trentgrover-wf avatar trentgrover-wf commented on May 29, 2024 3

any further plans on this?

from linter.

seaneagan avatar seaneagan commented on May 29, 2024

Hopefully we can get this in the style guide too: dart-archive/www.dartlang.org#635

from linter.

pq avatar pq commented on May 29, 2024

Yes please. And thanks for the link @seaneagan. I was just looking for it myself! :)

from linter.

pq avatar pq commented on May 29, 2024

any further plans on this?

Sorry. Haven't gotten to it but it's definitely a good idea and doable. Added to a new tracking milestone NEXT.πŸ‘

from linter.

alexeieleusis avatar alexeieleusis commented on May 29, 2024

I think that with this week's contributions we can close this.

from linter.

rdehouss avatar rdehouss commented on May 29, 2024

Hi,

Sorry to get this one out after so long, but I don't think dartfmt does sort the import, right?
Should this ticket be re-opened?

Regards,

RaphaΓ«l

from linter.

pq avatar pq commented on May 29, 2024

@rdehouss: I think what you're after was implemented in directives_ordering. Let us know if that works for you!

from linter.

rdehouss avatar rdehouss commented on May 29, 2024

Hi @pq, no, I was coming from dart-lang/sdk#20244 looking for a solution like https://github.com/timothycrosley/isort to sort automatically the import so that I don't have to fix each lint issues manually. But I understand that I'm now in the linter project and left dartfmt, sorry

from linter.

pq avatar pq commented on May 29, 2024

Ah. Got it. What we need here minimally is a quickfix for directives_ordering (as noted in #1374) and ideally support in something like dartfix so that there's more of a CLI for bulk application of the fix.

/fyi @bwilkerson

from linter.

bwilkerson avatar bwilkerson commented on May 29, 2024

The implementation of the quick fix should be largely the same as the implementation of the edit.organizeDirectives request. It should be fairly easy to refactor the code to make it reusable for both purposes.

from linter.

pq avatar pq commented on May 29, 2024

Cool. I was looking at this recently. I created an issue and will take a look (unless @bwilkerson you already are!)

from linter.

bwilkerson avatar bwilkerson commented on May 29, 2024

No, I'm not looking at it.

from linter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.