-
Notifications
You must be signed in to change notification settings - Fork 1
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
Adopt and enforce a common ES6 coding standard #138
Comments
Seems like a good idea. I previously tried to use JSHint with the CE frontend code, but it didn't understand React or JSX and threw up so many bogus JSX-related errors I gave up on it. |
I support this as well. We actually do have a command in the repo to configure and run eslint. But as you have pointed out, the problem is that it's not run automatically and regularly with each commit, so the standards aren't actually enforced. |
We also have two git hooks defined, one to run eslint before commit (using the command you noted), and the other to rebuild node_modules whenever a new commit is checked out. They are inactive because they are not in the I'll do that locally to check whether it works (looks like it should). If that seems good, I'll post a PR to enable the eslint githook. |
They are managed in |
We could do something like this... |
Small complication: The Strong enforcement on the server side is kind of a pain. But there is a simpler form of enforcement we can employ: Add a line to |
Code style in this repo is both internally inconsistent and inconsistent with the most widespread JS style standards. There are several places where the code does not even follow elementary problem-preventing conventions, such as using
===
and!==
.Suggest we adopt a style standard, a linter to check it, and a policy or tools to enforce it. I recommend the following:
ESLint:
(ESLint plus the react plugin is installed on my IDE and has proved extremely useful for helping me spot possible errors and stick to React best practices. It's also calling out our code A LOT.)
I'd be happy to lead the effort on this, including applying the auto-fix tool.
The text was updated successfully, but these errors were encountered: