Giter Site home page Giter Site logo

Comments (10)

bradzacher avatar bradzacher commented on May 12, 2024 1

I purposely did not include any of our rules in the list because I wanted to keep the core issue focused on core.

There's defs a few of our rules that can come over too!

from eslint-stylistic.

bradzacher avatar bradzacher commented on May 12, 2024 1

If they want they could publish it as a separate package within this project - up to them. But as a 3rd party plugin I don't know if it really needs to be split out.

We as the typescript-eslint maintainers have long wanted to remove these formatting rules from our project as we have not maintained them for many years. If this project is happy to get behind the ownership of stylistic then it's probably a great home for them!

from eslint-stylistic.

antfu avatar antfu commented on May 12, 2024 1

Do you have a rule in mind that is:

  • Stylistic
  • Type-aware
  • Works also for JS

So that we could discuss more specifically.


For type-annotation-spacing, such "TS-only" + "AST-only" rules look ok to have in this repo, as:

from eslint-stylistic.

ljharb avatar ljharb commented on May 12, 2024

I'm not sure how much it makes sense to have type-aware rules in this more general plugin/org. Has that been decided already?

from eslint-stylistic.

bradzacher avatar bradzacher commented on May 12, 2024

We probably won't be migrating over any type-aware rules. Rules like this are purely-syntactic checkers.

The thinking is that this rule should support both JS and TS syntaxes. So it'll be the one-stop-shop for stylistic rules rather than us forking them in typescript-eslint to support TS.

from eslint-stylistic.

ljharb avatar ljharb commented on May 12, 2024

I think that when a rule can be extended to support TS syntax, that makes perfect sense - but if there's a rule that's only useful for a TS user, then that seems better left to a TS-specific plugin.

from eslint-stylistic.

antfu avatar antfu commented on May 12, 2024

#25 (comment)

For type-annotation-spacing itself, it's already been included, as I see you put a warning for it on the docs (as type: layout). I am happy to have it maintained here.

For type-aware rules, I think it would be indeed out-of-scope of ESLint Stylistic.

from eslint-stylistic.

ljharb avatar ljharb commented on May 12, 2024

(i should clarify; a type-aware rule that works for regular JS seems fine to me; it's a rule that only applies to TS that i'm questioning)

from eslint-stylistic.

ljharb avatar ljharb commented on May 12, 2024

#25 is TS-only, for example.

from eslint-stylistic.

antfu avatar antfu commented on May 12, 2024

Closing as type-annotation-spacing is included. For more discussions about what rules to include, please refer to #26

from eslint-stylistic.

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.