Sage-Bionetworks / sagebio-collaboration-portal

Collaboration Portal developed by Sage Bionetworks
1 stars 0 forks source link

Review client linters and VSCode prettier configuration #405

Open tschaffter opened 5 years ago

tschaffter commented 5 years ago
jaeddy commented 5 years ago

I'm in favor of this ticket, but it's definitely not a requirement for Milestone 2.

tschaffter commented 5 years ago

As you may have seen, Visual Studio Code has a hack to display noUnusedLocals and noUnusedParameters problems as warnings during live editing (the typescript.reportStyleChecksAsWarnings setting, which defaults to true). The tslint extension does not display these problems at all because they require type information, which the tslint extension does not support.

Source: https://stackoverflow.com/a/51595995

tschaffter commented 5 years ago

A good solution to try could be to use prettier and interface it with eslint, tslint and styleint.

https://prettier.io/docs/en/integrating-with-linters.html

There are also reason not to use prettier.

And Prettier, as a very opinionated tool, has very few options you can configurate. So if You are also very opiniated about how to format your code, there is a big conflict.

https://itnext.io/how-to-replace-prettier-by-eslint-rules-21574359e041