Extend linting in CI
This MR adds more eslint plugins into the mix to ensure good code quality. This is based on the plugins from create-exposed-app, which is the personal configuration of the eslint-config-airbnb-typescript author:
- eslint-plugin-jest for coding conventions in tests.
- eslint-plugin-prettier for code formatting.
- eslint-plugin-promise to prevent the misuse of promises.
-
eslint-plugin-unicorn for additional rules. Following
create-exposed-app
, we disable a rule that's incompatible with eslint-config-airbnb and another (controversial) one that forbids abbreviations.
In addition, we enable eslint-plugin-security. This is quite an old plugin, but it's the part of SAST that we managed to get working (see !11 (closed)). Enabling it will (hopefully) have a similar effect to SAST.
This MR also configures some pre-commit hooks to run the linter and tests, and upload test and coverage reports into the gitlab pipeline.
Signed-off-by: Kristóf Marussy kristof@marussy.com