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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compatible with prettier-plugin-organize-imports #99

Closed
electrovir opened this issue Apr 1, 2021 · 11 comments
Closed

Not compatible with prettier-plugin-organize-imports #99

electrovir opened this issue Apr 1, 2021 · 11 comments
Labels
bug Something isn't working

Comments

@electrovir
Copy link

electrovir commented Apr 1, 2021

If I install prettier-plugin-organize-imports and list it after prettier-plugin-jsdoc in the "plugins" array within .prettierrc.json, this plugin doesn't do anything at all.

@hosseinmd hosseinmd added the bug Something isn't working label Apr 1, 2021
@hosseinmd
Copy link
Owner

prettier/prettier#10261

@hosseinmd
Copy link
Owner

prettier/prettier#10259

@electrovir
Copy link
Author

darn 😩
Thanks for the links. The more I use Prettier the more I realize it's a huge pain to work with :(

@hosseinmd
Copy link
Owner

This link show what is the problem, I solved this bug, I am improving code to resolve this for plugins more than two, I will be done so.

@hosseinmd hosseinmd reopened this Apr 2, 2021
hosseinmd added a commit that referenced this issue Apr 2, 2021
@hosseinmd
Copy link
Owner

Fixed: v0.3.18

@hosseinmd
Copy link
Owner

prettier-plugin-organize-imports not supporting multiple parsers for typescript so add prettier-plugin-jsdoc to end of plugins list

@electrovir
Copy link
Author

I don't understand, what has changed?

If I list prettier-plugin-jsdoc last, then prettier-plugin-jsdoc works but prettier-plugin-organize-imports doesn't.
If I list prettier-plugin-organize-imports last then prettier-plugin-organize-imports works but prettier-plugin-jsdoc doesn't.

This is the same behavior as before the v0.3.18 update.

@hosseinmd
Copy link
Owner

prettier can't find modules, please add plugins like. this

  "plugins": [
    "./node_modules/prettier-plugin-organize-imports",
    "./node_modules/prettier-plugin-jsdoc"
  ],

@electrovir
Copy link
Author

electrovir commented Apr 5, 2021

Yes, this is my whole .prettier.json file:

{
    "arrowParens": "always",
    "bracketSpacing": false,
    "endOfLine": "lf",
    "htmlWhitespaceSensitivity": "ignore",
    "jsdocParser": true,
    "jsonRecursiveSort": true,
    "jsxBracketSameLine": false,
    "plugins": [
        "./node_modules/prettier-plugin-sort-json",
        "./node_modules/prettier-plugin-packagejson",
        "./node_modules/prettier-plugin-organize-imports",
        "./node_modules/prettier-plugin-jsdoc"
    ],
    "printWidth": 100,
    "singleQuote": true,
    "tabWidth": 4,
    "trailingComma": "all"
}

And here are my dependency versions:

        "prettier": "^2.2.1",
        "prettier-plugin-jsdoc": "^0.3.18",
        "prettier-plugin-organize-imports": "^1.1.1",
        "prettier-plugin-packagejson": "^2.2.10",
        "prettier-plugin-sort-json": "^0.0.2",

Same problem still.

@hosseinmd
Copy link
Owner

i tested that work for me, i think you should set plugins. then restart vscode to work

@electrovir
Copy link
Author

Ah! >Developer: Reload Window did it. It's working now! It's also working with the Prettier CLI.

Thank you much! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants