This PR introduces ESLint, the linting for JS, with a plugin specifically for TS and new rules for prettier.
New dependencies:
eslint v8.56.0
prettier v3.1.0
typescript-eslint
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:
.eslintrc, where we can set the rules for eslint and which rules to apply
.prettierrc, the rules for prettier
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
}
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 }