Code Monkey home page Code Monkey logo

Comments (8)

kentcdodds avatar kentcdodds commented on May 17, 2024

Hey @osener, I've definitely considered this and would love help doing it! Would you like to give it a go? There may be some utilities in the eslint package that we could use to read the file by the path.

from prettier-eslint-cli.

tylerthehaas avatar tylerthehaas commented on May 17, 2024

@osener have you started working on this at all? This is something we definitely want as a feature as well.

from prettier-eslint-cli.

ozanmakes avatar ozanmakes commented on May 17, 2024

@haasDev unfortunately I don't expect to have time for this in the coming weeks

from prettier-eslint-cli.

slightlytyler avatar slightlytyler commented on May 17, 2024

I'm confused on what the current behavior is? I can't get this package to recognize my eslint conifg at all, even when it's in the working directory

from prettier-eslint-cli.

kentcdodds avatar kentcdodds commented on May 17, 2024

Hmmm... Could you follow the debugging instructions in the README too figure out what's going on?

from prettier-eslint-cli.

slightlytyler avatar slightlytyler commented on May 17, 2024

@kentcdodds nvm got it working, not sure what I did wrong first try lol. Would still love this feature as I'm currently re-exporting my eslint config at the root

from prettier-eslint-cli.

kentcdodds avatar kentcdodds commented on May 17, 2024

Yeah, agreed. Would you like to work on it?

Curious why you have your config in a different file at all if you're already re-exporting it at the root... 🤔

from prettier-eslint-cli.

eqyiel avatar eqyiel commented on May 17, 2024

@osener I was looking at doing something like this:

eqyiel@8834165
eqyiel/prettier-eslint@73f84e9

I found that I didn't want to manually specify the config path, but wanted prettier-eslint to figure it out for me automagically like it does this if you give it the filePath prop: https://github.com/prettier/prettier-eslint/blob/bee9283f005fda2b08d1940f4455169333effa07/src/index.js#L201-L226

So my workaround currently is to call prettier-eslint-cli like this:

$ prettier-eslint --stdin app/containers/Fundraise.js < app/containers/Fundraise.js

This way it picks up the eslint configuration correctly (from the filePath) but only operates on the file piped in from stdin.

It also doesn't write to filePath without the --write flag, so this works for the Emacs integration. I'll send a PR there shortly.

from prettier-eslint-cli.

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.