Giter VIP home page Giter VIP logo

Comments (8)

sheerun avatar sheerun commented on May 14, 2024

this is what prettier enforces. if you don't like prettier rules, you can just use standard --fix

from prettier-standard.

sheerun avatar sheerun commented on May 14, 2024

or make a PR to prettier that fixes this behavior

from prettier-standard.

mesqueeb avatar mesqueeb commented on May 14, 2024

@sheerun Oh I see! I thought that only the rules of Standard were applied, but the instant formatting functionality of Prettier.

Does Prettier have a ruleset itself which also gets applied, other from the max. 90 char line length?

Best regards.

from prettier-standard.

mesqueeb avatar mesqueeb commented on May 14, 2024

@sheerun
After more research I found out that:

The brace-style of standard is 1tbs.
Together with "allowSingleLine": true.

However, the brace-style prettier-standard uses is stroustrup.
Together with "allowSingleLine": false.

See here ESlint for more details on these differences.

Can you please change the repository to 1tbs.
Together with "allowSingleLine": true?

from prettier-standard.

mesqueeb avatar mesqueeb commented on May 14, 2024

Dear @sheerun
I took a look further into this repository.
It seems like you correctly import the standard-ruleset from here:
https://github.com/sheerun/eslint-config-standard/blob/master/eslintrc.json

This in turn does have the correct brace-style.

So I think there is something else that's messing with the brace-style option inside your app, I'm not sure where yet.

from prettier-standard.

mesqueeb avatar mesqueeb commented on May 14, 2024

@sheerun
Any ideas what could be changing the brace-style behaviour of "brace-style": ["error", "1tbs", { "allowSingleLine": true }],?

Because you correctly pull the settings from eslintrc, yet prettier-standard is using { "allowSingleLine": false }...

from prettier-standard.

rafaelrinaldi avatar rafaelrinaldi commented on May 14, 2024

This tool seems to be ignoring the .eslintrc file. Overriding rules doesn't work.

from prettier-standard.

sheerun avatar sheerun commented on May 14, 2024

prettier-standard 9.0.0 now directly uses prettierx for formatting, so if you'd like to customize formatting you need to contribute there: https://github.com/brodybits/prettierx

then you'll be able to customize formatting in your repository by creating custom .prettierrc file

from prettier-standard.

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.