alan-turing-institute / DTBase

A starting point from which digital twins can be developed.
MIT License
10 stars 4 forks source link

201 continous deplyoment #226

Closed GiorgioCerro closed 4 months ago

GiorgioCerro commented 4 months ago

This PR introduces ESLint, the linting for JS, with a plugin specifically for TS and new rules for prettier.

New dependencies:

At the moment, in the .github/workflow/pre-commit.yaml there is an extra line of code to install the dependencies with npm.

There are three config files to look at in dtbase/webapp:

It is better to not replicate rules in both the config files, others there is a possibility to encounter conflicts between the two linters.

Prettier fixes these issues: { "tabWidth": 2, # tab size "semi": false, # whether to put semicolons at the end of every line "printWidth": 88, "singleQuote": false # to use only single quotes }