-
Notifications
You must be signed in to change notification settings - Fork 61
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
feat: add eslint, prettier and editorconfig #166
Conversation
Thansk,hopefully will have some time around xmas to review |
79318dc
to
6155c0b
Compare
Here is an update on the PR:
|
6b0ec78
to
b551cff
Compare
I fixed an unused variable within a unit test. Can you check it out, @simonh1000? |
b551cff
to
d4112a8
Compare
Apologies for the delays. I forget about these things, but the underlying issue is that I do not use eslint nor editorconfig so reveiwing first mans learnign what they are and then deciding whether I want them in the repo. And that's when I don't even get started 🤷 |
Hi, no problem, as time has passed, I've updated to the latest changes in these tools. Here's a list of what you can use them for and how they can assist you: ToolseditorconfigThis is utilized by IDEs when the plugin is activated, or by default, and aids in setting project-specific configurations such as line-ending formats, using tabs or spaces, etc. It automates what your editor would do based on your settings, but in a different editor, too. prettierThis tool formats your code according to a predefined style guide. It ensures consistent code formatting without manual corrections. It also encompasses the options from editorconfig, ensuring consistency across IDEs/editors. This way, there are no conflicts between tabs and spaces, and it adheres to your preferred format. eslintIt identifies issues in your code, such as unused variables (refer to the file in my PR: test/server.js). It also supports best practices that you can enable, but that requires more research into how you wish to construct your code and manage code quality. The default/recommended rules work fine. While it can assist with formatting, I recommend separating formatting and linting into distinct steps for those specific tools. Quality gate and workflowThese tools aid developers in maintaining consistency with your defined code quality standards. They enhance the overall process and checks. These tools are optional unless you establish a quality gate within your guidelines or pipeline/GitHub Actions (eslint and prettier, while editorconfig is only functional in IDEs/editors). I suggest at least using eslint, as it is instrumental in resolving code issues. |
This is a fix for #163
Added: