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

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

Implement AirBnB ESLint TypeScript linter #21

Open harley-harris opened 1 year ago

harley-harris commented 1 year ago

What?

To implement the AirBnB ESLint TypeScript linter into the repository.

Why?

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

Acceptance Criteria?

Re-format index.ts using the linter to confirm that it is configured.

harley-harris commented 1 year ago

Followed: https://github.com/iamturns/eslint-config-airbnb-typescript and https://medium.com/@ErikKyleNielsen/setting-up-eslint-prettier-airbnb-base-and-typescript-27b3f9538f0d

Linter functioning as this: const port: number = 8000; was changed to const port = 8000; with the following message:

Type number trivially inferred from a number literal, remove type annotation.eslint@typescript-eslint/no-inferrable-types