federated-model-aggregation
federated-model-aggregation copied to clipboard
Introduce Lint, Test and Pre-Commit Hook to JS Client
Is your feature request related to a problem? Please describe.
The JS client is being created, and there is some code being produced. Most of the PR Review comments at this early stage can be addressed through following a proper style guide. Enforcing a standard lint library along with test with coverage and pre-commit hooks helps developer productivity and maintains high standard in code.
Describe the outcome you'd like:
Enable support for:
- ESLint, with Prettify plugin (for code style and lint)
- Jest (for testings)
- Husky (for pre-commit hooks)
Discussion with @taylorfturner and @ksneab7 about what rules should be enforced.
We decided it made most sense to look at what does currently the Python Client enforce with Black, and then look at most used external facing Javascript projects (eg: Ease Web, Creditwise, etc).
I will compile a list of equivalent rules, and we can have discussion on those as we move along.
Python: Flake8 (lint, code) ; Black (extension on top of Flake8) JS/TS: ESLint (lint, code) ; Prettier (extension on top of ESLint)
Python Rule | TS Rule | Status |
---|---|---|
Wrap Line | Prettier Plugin | :enabled: |