alphagov / learningtime-hh-sem1-gov-location-service

Early talent assigned learning time, Semester 1 project for Harley Harris
1 stars 1 forks source link

Assess options available for linting TypeScript #7

Open harley-harris opened 1 year ago

harley-harris commented 1 year ago

What?

To create a more maintainable service, a TypeScript Linter should be used to scan the project's code. Users will benefit as the service will be less likely to crash due to code errors

Why?

To help improve code quality, catch errors early, and enforce consistent code style.

Acceptance Criteria?

List some pros and cons of TypeScript linters, and choose one to use for the project

harley-harris commented 1 year ago

ESLint vs AirBnB ESLint

ESLint (standard JS - from google - gov standard):

Pros:

Cons:

AirBnB ESLint:

Pros:

Cons:

Overall, for this project I would like to try AirBnB ESLint. I'm still fairly new to adopting TypeScript and don't want the overhead of customising the ESLint config from scratch. So, in this case an opinionated linter will suit the project.

Optional, compare linters at the end of the project by swapping one out for another.