Configured ESLint and Prettier
Description
I have configured ESLint and Prettier in our project. This will ensure that everyone is following the same code standards.
It fixes #263 https://github.com/reactplay/react-play/discussions/277
Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How Has This Been Tested?
I have tested it on my local machine. Everything is working as it should be.
Read Before Merging
- Around 180 files have been modified with this PR. However, most of them are results of ESlint and Prettier commands. Things like whitespace, commas, blank lines, and quotes are the ones which are affected mostly.
- This PR doesn't solve everything. There are still many (thousands) of warnings/errors that have to be solved manually. These are mostly related to simple coding discussions taken during the development such as:
- A variable is declared in
underscore_caseinstead ofcamelCase - unused variables
- JSX in
.jsfiles and so on.
- A variable is declared in
Suggestions
- Fix easily fixable warnings/errors by ourselves.
- Add more rules in
...ignorefiles - Request contributors to fix their changes if possible.
What next?
- Assuming everyone is using VSCode, installing Prettier and ESLint would be great, though not necessary.
- Currently, running
yarn formatbefore committing the code is suggested. This command will make the necessary changes in your codebase. If an error occurs during the procedure, it will throw an error at the end, but it is fine. - We can add a husky pre-push hook that will make sure that code is formatted and has no errors before pushing to a branch. (I Strongly suggest this)
Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
- [] Any dependent changes have been merged and published in downstream modules
@joshi-kaushal is attempting to deploy a commit to a Personal Account owned by @reactplay on Vercel.
@reactplay first needs to authorize it.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| react-play | ❌ Failed (Inspect) | Jun 20, 2022 at 3:30PM (UTC) |
Hello @atapas, @koustov
Any thoughts here?
@joshi-kaushal Great work so far on this. Can you, me, and @koustov catch up on Discord sometime this week to discuss it? With the repositories splitting up, the new plays repo should have these and all the plays should change there to meet these. Also, the framework(react-play) repo should have the lining too..
Better to do it repo-specific so that we can avoid many conflicts in code. Let's catch up some time to plan.
Yes, let's plan for this Friday evening! Or if you want to schedule earlier, I am fine with that too.
is this being taken care?
There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale. This PR will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!