Skip to content

Enhancement : Add a .prettierrc file to match with the .eslintrc #861

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

Closed
siddhant1 opened this issue Mar 2, 2019 · 8 comments · Fixed by #1743
Closed

Enhancement : Add a .prettierrc file to match with the .eslintrc #861

siddhant1 opened this issue Mar 2, 2019 · 8 comments · Fixed by #1743

Comments

@siddhant1
Copy link
Contributor

We should add a .prettierrc file to match with the .eslintrc .
I had my global prettierrc setup (which autoformats on save) which includes no-semicolon rule.
But in this project the no-semicolon rule breaks the rules in .eslintrc
To prevent this we should add local .prettierrc file that follows .eslintrc rules

@catarak you can create one using the playground https://prettier.io/playground/ and I will add that

@siddhant1 siddhant1 changed the title Add a .prettierrc file to match with the .eslintrc Enhancement : Add a .prettierrc file to match with the .eslintrc Mar 2, 2019
@catarak
Copy link
Member

catarak commented Mar 4, 2019

this could be a nice to have! for another project i'm using EditorConfig and i'm not sure if that would be better, or if both would be great, or if only a prettier config would be good enough.

@catarak
Copy link
Member

catarak commented Mar 4, 2019

thanks! my concern with adding this stuff is that it's another thing to install, which might be intimidating for new contributors. however, i guess adding these files to the project doesn't do any harm if you don't have these installed, and the linter will pick up the styling errors anyway.

@siddhant1
Copy link
Contributor Author

Can you create a .prettierrc to match with the code style I will configure eslint to work with it

@siddhant1
Copy link
Contributor Author

@catarak Can you see if this prettierrc works.

{
    "arrowParens": "avoid",
    "bracketSpacing": true,
    "htmlWhitespaceSensitivity": "css",
    "insertPragma": false,
    "jsxBracketSameLine": false,
    "jsxSingleQuote": false,
    "parser": "babylon",
    "printWidth": 80,
    "proseWrap": "never",
    "requirePragma": false,
    "semi": true,
    "singleQuote": true,
    "tabWidth": 2,
    "trailingComma": "none",
    "useTabs": false
  }

@siddhant1
Copy link
Contributor Author

@catarak can you help me close this one too

@catarak
Copy link
Member

catarak commented Mar 25, 2019

can you make a PR?

@siddhant1
Copy link
Contributor Author

Sure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants