Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prettier-eslint support #22

Closed
eramdam opened this issue Feb 27, 2018 · 7 comments
Closed

Prettier-eslint support #22

eramdam opened this issue Feb 27, 2018 · 7 comments
Labels
enhancement New feature or request

Comments

@eramdam
Copy link

eramdam commented Feb 27, 2018

Would it be possible to integrate support prettier-eslint? Or at least have some pointers to know what it would take to make a PR to support it 馃槉

@azz azz added the enhancement New feature or request label Mar 3, 2018
@azz
Copy link
Member

azz commented Mar 4, 2018

prettier-eslint has a lot of extra configurability that I don't think the minimal API that this module uses can support. https://github.com/prettier/prettier-eslint#options

I'd be interested to hear a proposal for a way we could make it work with no extra config!

@eramdam
Copy link
Author

eramdam commented Mar 4, 2018

Ideally it would just invoke the format method of prettier-eslint with the default options, leaving the configuration up to the user's .eslintrc file. From what I can see in the doc of prettier-eslint, by default it will find the proper eslint/prettier configuration files for the given files so I feel like you would not have to pass a lot of options?

https://github.com/prettier/prettier-eslint#eslintpath-string
https://github.com/prettier/prettier-eslint#prettierpath-string

@rfgamaral
Copy link

I guess no progress was made on this as of yet?

@pmcnr-hx
Copy link

Lack of prettier-eslint support is currently my blocker for using pretty-quick. Just invoking with defaults and handling configuration externally, would be absolutely fine and shouldn't be too disruptive. Would you consider a PR if there were no other externally visible changes to pretty-quick aside from an option to use prettier-eslint instead of plain prettier?

@shahankit
Copy link

shahankit commented Sep 10, 2019

You can achieve similar functionality using just prettier-eslint module. You need lint-staged module and use this configuration:

"lint-staged": {
    "app/**/*.{js,jsx}": [
      "eslint --fix",
      "prettier-eslint --config .prettierrc.json --write",
      "git add"
    ]
  },
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  }

@smac89
Copy link

smac89 commented Dec 27, 2021

I use the following yaml config with lint-staged in order to work with prettier-eslint:

"app/**/*.{js,jsx}":
  - yarn --cwd ./app prettier-eslint '$@' --write --prettier-last

In order for the above to work, I use the following command to run lint-staged:

npx lint-staged --shell /bin/sh

@JounQin
Copy link
Member

JounQin commented Jan 16, 2024

It will be done in https://github.com/prettier-eslint/prettier-plugin

@JounQin JounQin closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants