Closed siddhant1 closed 3 years ago
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