Code Monkey home page Code Monkey logo

Comments (5)

idahogurl avatar idahogurl commented on June 14, 2024 6

I'm going to do an unapologetic plug for my extension. VS Code Prettier ESLint

from prettier-eslint.

NoelDeMartin avatar NoelDeMartin commented on June 14, 2024

I've been looking into this, and it seems like this was removed about 3 years ago from the VSCode plugin. And I haven't been able to find a replacement. They point to this message in the README as a solution:

The recommended way of integrating with linters is to let Prettier do the formatting and configure the linter to not deal with formatting rules. You can find instructions on how to configure each linter on the Prettier docs site. You can then use each of the linting extensions as you normally would. For details refere to the Prettier documentation.

So it seems like this is a use-case that is no longer supported (which is a bit confusing, because if you visit the Prettier documentation it leads you back here).

I had given up all hope at this point, but it occurred to me that this project still seems to work on the CLI. Looking for a way to run this script on save, I found the following plugin: Run on Save. You also need to install the prettier-eslint-cli package, but once you've done that, you can use the following config:

"emeraldwalk.runonsave": {
    "commands": [
        {
            "match": "\\.ts$",
            "cmd": "npx prettier-eslint --parser typescript --write ${file}"
        },
    ]
},

You'll need to configure this differently for other languages, but so far it gets the job done :). Happy to hear if there's any better options though.

from prettier-eslint.

drewbaker avatar drewbaker commented on June 14, 2024

Yeah I'm moving to VS Code after Atom end of life, and finding it really difficult to get this working too.

from prettier-eslint.

drewbaker avatar drewbaker commented on June 14, 2024

@idahogurl im way ahead of you. That totally was the answer and I even wrote up some docs for my team to follow: https://paper.dropbox.com/doc/How-to-get-VS-Code-setup--BkGlDyauC~UZtwk4iPO83e~yAQ-38r84QublFNAzo74LSCwf?_tk=slack_preview

from prettier-eslint.

JounQin avatar JounQin commented on June 14, 2024

Close in favor of https://github.com/idahogurl/vs-code-prettier-eslint

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.