-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Comments
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. |
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. |
Can you create a .prettierrc to match with the code style I will configure eslint to work with it |
@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
} |
@catarak can you help me close this one too |
can you make a PR? |
Sure! |
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
The text was updated successfully, but these errors were encountered: