Git Product home page Git Product logo

Comments (5)

DASPRiD avatar DASPRiD commented on May 18, 2024 3

It should also be possible to define whether there is a space in object definitions between ? and : – most of the time, you don't want that.

from typescript-eslint.

arrudaje avatar arrudaje commented on May 18, 2024 2

Is someone looking at this at the moment? I am willing to give it a try.

from typescript-eslint.

fregante avatar fregante commented on May 18, 2024

A related rule is https://github.com/typescript-eslint/typescript-eslint/blob/fbf1640c5ab67770a1ace5a9bad2bddfa35bd88d/packages/eslint-plugin/docs/rules/type-annotation-spacing.md

from typescript-eslint.

bradzacher avatar bradzacher commented on May 18, 2024

We strongly recommend that you use prettier instead of stylistic lint rules. Stylistic lint rules are ugly to write and maintain.

If someone were to work on this - I would suggest augmenting existing lint rules instead of a new one.
type-annotation-spacing is not a good fit as that is specifically about type annotations.

  • object-curly-spacing is a good fit for the object type spacing, as that rule already handles object values - in fact we have already got handling for that.
  • array-bracket-spacing is probably a good fit for the array type spacing, as that rule already handles array values.
  • space-infix-ops is probably a good fit for the &/| spacing, as that rule already handles logical &/| and others.

from typescript-eslint.

JoshuaKGoldberg avatar JoshuaKGoldberg commented on May 18, 2024

Per https://typescript-eslint.io/docs/linting/troubleshooting/formatting/#eslint-core-and-formatting:

With the exception of bug fixes, no new formatting-related pull requests will be accepted into typescript-eslint.

This issue has existed for 4 years without much involvement, and requests a new formatting rule. I'm going to go ahead and close it. Thanks for the participation folks!

from typescript-eslint.

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.