Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add types #411

Draft
wants to merge 73 commits into
base: master
Choose a base branch
from
Draft

chore: add types #411

wants to merge 73 commits into from

Conversation

shioju
Copy link
Collaborator

@shioju shioju commented Oct 26, 2024

Add more type safety

Branched off #404 so will need to be rebased to master after that branch is merged in

  • I've kept this PR as small as possible (~500 lines) by splitting it into PRs with manageable chunks of code
  • I've requested reviews from 1 reviewer
  • I've tested existing features (website scan, sitemap, custom flow) in both node index and cli
  • I've synced this fork with GovTechSG repo
  • I've added/updated unit tests
  • I've added/updated any necessary dependencies in package[-lock].json npm audit, portable installation on GitHub Actions

Wilson WeeSheng Khoo added 30 commits October 23, 2024 14:43
Set to display lint warnings instead of stopping the next cmd
Reason is it is still easy to read and does not introduce too many whitespacing
Due to process.exit will return early need add eslint-disable-next-line no-unreachable
… with double quotes

Improved clarity and consistency in the alt text error message formatting
…iable issues

Resolved ESLint warnings related to undefined browser-specific variables

Ensured compatibility for both Node.js and browser environments in the project
Wilson WeeSheng Khoo and others added 30 commits October 23, 2024 20:29
Include whitespacing, comma, use const instead of let, reorder function first before variable is used, remove unnecessary else statement, adding semicolon
Include whitespacing, comma, use const instead of let, reordering function first before variable is used, add semicolon
Include whitespacing, add semicolon, reordering function first before variable is used, add semicolon
It is being used in other files except the current file where is being defined
Explicitly cast yargs.parse() result to 'Answers' type using 'as unknown as Answers' for improved type safety
- reason is because it does not serve much purpose for now but in the future where linting will need to be enforced then change here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant