Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    cdmcmahon
    @cdmcmahon
    @j-f1 that's great to hear! let us know if there's anything we can do to help push it over the finish line. very excited :)
    Mile Mijatović
    @mijatovicmile
    Hello
    I have one prettier option question
    how to achieve this
    Screenshot_6.png
    from this
    Screenshot_4.png
    so basically to break line after => ( ???
    so this.posts should be in new line
    I hope you understand me
    Ryan Zimmerman
    @RyanZim
    Prettier isn't customizable like that
    It will try to make everything fit within the line length
    Jed Fox
    @j-f1
    You can change the parens to braces {} and it will break into a new line.
    Mile Mijatović
    @mijatovicmile
    Thank you for your response @RyanZim and @j-f1
    @j-f1 I can't do that, because it's not allowed in this case
    Jed Fox
    @j-f1
    Why not?
    Mile Mijatović
    @mijatovicmile
    Yes, you are right
    I need to use {} instead () in this case
    It's my fault
    Thank you
    bm-stschneider
    @bm-stschneider
    is there a way to have a custom parser in the playground?
    Kaleb Elwert
    @belak
    Are there any recommended eslint configs to pair with prettier which deal only with code quality? Then you could use prettier for style and something else for code quality.
    Jed Fox
    @j-f1
    You can combine whatever config you want with eslint-config-prettier to delete all the stylistic rules @belak.
    Kaleb Elwert
    @belak
    Yeah, I just saw that. Seems perfect!
    Thanks!
    Ghost
    @ghost~5de69926d73408ce4fd2f1c2
    how do you prevent prettier from lowercasing String
    I don't want String to change to string
    mwmx
    @mwmx
    Hi, is this the right place to ask about prettier-php?
    Its readme says "We encourage everyone to try it and give feedback, but we don't recommend it for production use yet." but I'm not sure if that should be understood to mean "every once in a while it will produce ridiculous output, sorry 'bout that" or "every once in a while it will break your program, sorry 'bout that"
    Jed Fox
    @j-f1
    @ghost In what context?
    @mwmx Not a contributor to the PHP plugin, but it’s probably a little of both.
    mwmx
    @mwmx
    I see.
    Mike Dodge
    @dmikester1_twitter
    I have eslint with "plugin:prettier/recommended" set up in my eslintrc file. It appears to be removing blank lines which I like. I also have auto-save turned on to save after a second and that auto formats the code with my rules. So I hit return to start typing some code and if I don't start typing in under a second it removes my blank line and I am typing on a line I didn't want to. Any way to remove blank lines except for the one my cursor is on?
    Jed Fox
    @j-f1
    I don’t think so @dmikester1_twitter
    Sam Grönblom
    @sgronblo
    I use prettier in VSCode with formatOnSave enabled. Suddenly I noticed one file is no longer auto formatted. I noticed Prettier had an X next to it in the bottom status bar. Clicking it shows "File is ignored, skipping", there is a file info showing ignored: true. However, I don't have any .prettierignore file at all. Any idea what could be causing this?
    Sam Grönblom
    @sgronblo
    Never mind... I had accidentally opened a yarn workspace file through its symlinked version inside node_modules
    BrianD91
    @BrianD91
    Hey all, is there a way to do conditional formatting with prettier? i.e. I only want to insert a pragma in a file if it has certain content contained in it?
    Jed Fox
    @j-f1
    Not with Prettier, but you could write another tool that does that for you and runs Prettier afterward.
    Elijah Mooring
    @Vehmloewff
    For some reason, prettier is formatting my code differently on Ubuntu and Windows. Any clues why?
    Elijah Mooring
    @Vehmloewff
    Ahh, it was a problem on my end.
    Gady
    @kikar

    Hi guys, I have a ts file that looks like this:

    export class Foo {
      @OneToMany(() => Product,product => product.brand)
      products!: Product[];
    }

    .prettierrc

    {
      "printWidth": 150,
      "singleQuote": true,
      "useTabs": false,
      "tabWidth": 2,
      "semi": true,
      "bracketSpacing": true,
      "trailingComma": "none",
      "arrowParens": "avoid"
    }

    .vscode/settings.json

    {
      "editor.tabSize": 2,
      "editor.formatOnSave": true,
      "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true,
        "source.organizeImports": true
      },
      "files.insertFinalNewline": true,
      "files.trimTrailingWhitespace": true,
    }
    The problem is that is splitting the OneToMany decorator parameters over multiple lines
    Anyone knows how to avoid?
    GamerSK
    @GamerSK
    Hi guys, how i can install on windows vscode prettier php?
    Brad Cantrell
    @maxirater
    Are there any plans to support Dart? Im moving from web dev to mobile with Flutter, and one thing that really bothers me about Dart is forced requirement of semicolons at the end of lines (theyre optional in every other modern language like Javascript, Swift, Ruby, etc). I love the feature in Prettier that auto-inserts semicolons at the end of lines in Javascript. So I would like to replace dartfmt with prettier in Android Studio if I could have that feature.
    Jed Fox
    @j-f1
    @maxirater I don’t think there are plans for a Dart plugin. Feel free to write one though! However, Prettier usually will only format valid code, so if you were to forget a semicolon in a language that required them, it wouldn’t be able to help you.
    Hrey Flogin Meo
    @dl2m_gitlab
    Hi, Is there a way to ignore formatting a VuePress custom container (https://vuepress.vuejs.org/guide/markdown.html#custom-containers) that starts and ends with :::?
    Jed Fox
    @j-f1
    I think that was a change in a recent version. We no longer wrap template literals that only contain simple expressions @kanagarajkm.
    Hrey Flogin Meo
    @dl2m_gitlab
    @dl2m_gitlab Is there anything else apart the ignore to "force" a specific style in markdown fileS?