Important : the diff is auto-generated by eslint & prettier.
What's done in this PR:
updated old eslint (from v6.8 to v7.x) as 6 is not compatible with prettier plugins
prettier
custom config file to match the code style
syncs with eslint to avoid conflicts
eslint changes
configs rewritten
removed browser as the backend is not interacting with any browser.
added prettier plugin to sync with prettier configs.
removes the .eslintignore file as node_modules are skipped by default.
pre-commit-hooks
new dependency
runs prettier and eslint-fix automatically before every commit
ensures that user always maintain the project code style.
option to override the hook if needed.
Motivation and Context
Fixes #73
TLDR
strict style guide
automatically enforced
allows us to use automated checks on PR once setup.
integration with (almost) all code editors.
How Has This Been Tested?
[x] the changes are done by an automated tool that changes the style of code. Therefore the code behaves the same way.
[x] The pre-commit-hooks are manually tested and working.
[x] The prettier confs and eslint configs are manually tested and do not conflict.
Screenshots (if appropriate)
NA
Types of changes
**What types of changes does your code introduce? Put an x in all the boxes that apply:
[ ] 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)
Checklist:
Go over all the following points, and put an x in all the boxes that apply.
(If you're unsure about any of these, don't hesitate to ask. We're here to help!)
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
I believe that such a big diff and that too generated by an automated tool should be ideally done by the project maintainer, therefore I am converting this PR into a draft PR.
Description
What's done in this PR:
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate)
Types of changes
**What types of changes does your code introduce? Put an
x
in all the boxes that apply:Checklist:
Go over all the following points, and put an
x
in all the boxes that apply. (If you're unsure about any of these, don't hesitate to ask. We're here to help!)