Fix code formatting
teohaik opened this issue · 0 comments
teohaik commented
Linter functionality has been introduced and from now, github will validate formatting of code and block PR that contain code with no proper formatting.
to check we can run: npm run lint
and fix every error.
Currently we have these errors:
PS C:\Users\teo\gitProjects\coin_management_system> npm run lint
> coin-management@1.0.0 lint
C:\Users\teo\gitProjects\coin_management_system\src\helpers.ts
10:35 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
10:46 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
C:\Users\teo\gitProjects\coin_management_system\src\pool.ts
128:11 error Unexpected lexical declaration in case block no-case-declarations
128:28 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
133:11 error Unexpected lexical declaration in case block no-case-declarations
133:28 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
172:11 error Unexpected lexical declaration in case block no-case-declarations
172:29 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
177:11 error Unexpected lexical declaration in case block no-case-declarations
177:29 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
262:7 error Do not use "@ts-ignore" because it alters compilation errors @typescript-eslint/ban-ts-comment
277:7 error Do not use "@ts-ignore" because it alters compilation errors @typescript-eslint/ban-ts-comment
279:9 error Do not use "@ts-ignore" because it alters compilation errors @typescript-eslint/ban-ts-comment
281:11 error Do not use "@ts-ignore" because it alters compilation errors @typescript-eslint/ban-ts-comment
284:11 error Do not use "@ts-ignore" because it alters compilation errors @typescript-eslint/ban-ts-comment
✖ 15 problems (11 errors, 4 warnings)