Code Monkey home page Code Monkey logo

Comments (11)

zimme avatar zimme commented on May 21, 2024 4

I'm spread quite thin myself, I am however starting on a project using typescript and are looking into how to use prettier and tslint together and if I don't find a better way I'll probably be open to give prettier-tslint a shoot. Other than that I'm using this package in quite a few projects and I've become a bit familiar with the codebase so I could try and help out a bit.

from prettier-eslint.

azz avatar azz commented on May 21, 2024 4

prettier-tslint should definitely be a separate package. I've just started work on it here: https://github.com/azz/prettier-tslint

Super basic support is done. Given an input file it will:

  • Run prettier --write
  • Locate tslint.json
  • Run tslint --fix

Currently there are some intermediary writes to disk but I'll be working to fix that soon.

from prettier-eslint.

zimme avatar zimme commented on May 21, 2024 3

Having prettier-eslint and prettier-tslint as separate package would hopefully keep the complexity down a bit, and and nothing is stopping the maintainers from working together where it makes sense. Some logic might even be sharable with a common package?

from prettier-eslint.

kentcdodds avatar kentcdodds commented on May 21, 2024

I've thought about that (especially when we added the CSS "support" which was basically just skip eslint for that step).

I'm not totally opposed to including TSLint support. So long as someone else is committed to helping maintain it because I don't use TSLint at all. Would you like to do that?

from prettier-eslint.

zimme avatar zimme commented on May 21, 2024

Should this package really support tslint? Wouldn't it be better to have a separate package prettier-tslint for that. What I could see this package support is eslint with typescript-eslint-parser, now that prettier supports typescript.

from prettier-eslint.

kentcdodds avatar kentcdodds commented on May 21, 2024

Yeah, I'm in favor of that @zimme 👍

from prettier-eslint.

kentcdodds avatar kentcdodds commented on May 21, 2024

To be quite honest, I'm only barely hanging onto this package myself. I've got a lot of things pulling at my time, so if someone wanted to help collaborate on a tslint version of this package, I'm afraid that I couldn't do much by way of support there. Would love it if someone else wanted to join in and help maintain things...

from prettier-eslint.

zimme avatar zimme commented on May 21, 2024

As a first step I could try and put together a PR which will allow prettier-eslint to be used on .ts/ .tsx files which would only run prettier on them.

from prettier-eslint.

kentcdodds avatar kentcdodds commented on May 21, 2024

Sounds cool 👍

from prettier-eslint.

zimme avatar zimme commented on May 21, 2024

Since v7.1.0 this package support ts files using prettier and eslint with typescript-eslint-parser. #121

from prettier-eslint.

zimme avatar zimme commented on May 21, 2024

Since we're supporting typescript now by using typescript-eslint-parser, the same parser prettier is using for it's typescript support, I'm closing this issue.

I don't feel that this package should support tslint, but it belongs in another package prettier-tslint. If enought people 👎 this comment I can think about reopening the issue.

from prettier-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.