[CHORE] Linter
Chalarangelo opened this issue · 7 comments
We definitely need a linter/formatter for snippets, like eslint
+ prettier
only that it has to work with JSX, too. Can someone please suggest some options and/or help implement them?
eslint
has a JSX
plugin as https://www.npmjs.com/package/eslint-plugin-react that could probably help 😉
Alright, I'll get working on it sometime soon.
I use this config for my projects.
For prettier
you have to install it as a devDependency and add a script to it like
"scripts" : { "lint": "prettier -l --config .prettierrc --write \"src/**/*.{js,scss}\" " }
And have .prettierrc
file with
{ "printWidth": 100, "tabWidth": 4, "useTabs": true, "jsxBracketSameLine": true }
@meetzaveri good point, but the only problem with this is that our snippet's are stored in .md
files, so we need a way to prettier only the parts inside backticks (```jsx);
Oh @fejes713 ! Got the point.
We could use MDX format for our markdown files. Source - https://mdxjs.com/
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for any follow-up tasks.