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

Implementing strict typing #2011

Open
40 tasks
severinbeauvais opened this issue Nov 28, 2019 · 5 comments
Open
40 tasks

Implementing strict typing #2011

severinbeauvais opened this issue Nov 28, 2019 · 5 comments
Assignees
Labels
ENTITY Business Team Epic

Comments

@severinbeauvais
Copy link
Collaborator

severinbeauvais commented Nov 28, 2019

Description:

Some of our projects do not enforce strict typing rules, which decreases compatibility between projects and increases the chance of some code errors that could otherwise be caught early by development tools (IDE plugins + lint).

There was some discussion in the #registries-auth Rocket Chat channel about this.

We need to figure out:

  • what the current problems are
  • what the scope/size of the current problems is
  • where we want to end up (i.e., partial strict typing enforcement?) - compare value vs cost
  • what steps we need to perform to get there
  • when this needs to be done, and by whom, and any dependencies/interactions between projects

Finally, we need approval from the POs before proceeding with any changes.

References
bcgov/sbc-common-components#86
https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/declaration%20files/Introduction.md
https://github.com/DefinitelyTyped/DefinitelyTyped

Dependencies

  • Do both FE and BE codebases need this?
  • What level of strictness do we want to enforce?

Acceptance Criteria

  • Some level of strict typing is enforced in all projects.
  • Linting and building proceed without warnings or errors.

Validation Rules
TBD

Ready for Sprint (DoR)

  • Do we have a prioritized Sprint backlog?
  • Defects, user stories and other work the team has committed to are contained in the sprint backlog?
  • Any hidden work?
  • All team members availability & capacity is known for the sprint?
  • All users stories meet the definition of Ready?

Ready to Build, Story level (DoR):

  • Have Stakeholders approved this story?
  • Does User story have full flow of business rules, happy and alternate paths etc. ?
  • Are the dependies known/understood?
  • Dev team accepts user experience artifacts?
  • Are the validation rules defined? (UI, Data, Role-Action)
  • Is a formal UAT required for this user story?
  • Are the acceptance criteria well defined in this ticket (Story level) that QA can confirm or deny ?
  • Does user story need to reference BA checklist? ( are functional/Non functional descriptions captured ?)
  • Is the person who accepts this user story as complete identified? (PO)
  • Can this User story be sized by the Dev. team ?
  • Can this User story be demoed to show value?
  • Is this user story small enough to be completed in a sprint?

Acceptance / DoD:

  • PR to remove feature flags created
  • Check Requirements against completed stories
  • Completed stories verified in Dev/Test/Prod
  • Confirm Test cases built and succeeding
  • Confirm successful End-End runs
  • No regression
  • All Linters passed
  • Test coverage and Test ID acceptable by Product owner
  • Ticket merged to master or story branch
  • Add / maintain selectors for QA purposes
  • Add PR numbers - If available
  • All tests passed (Jest, Pytest, Postman)
  • Developer to list Config changes/ Update documents and designs
  • Design / Solution accepted by Product Owner
  • Acceptance criteria has been defined (happy path, known sad paths)
  • Test coverage acceptable
  • Peer Reviewed
  • Accessibility reviewed and acceptable checklist
  • UX Approved
  • PR Accepted
  • Production burn in completed
@thorwolpert
Copy link
Collaborator

These are the flags needed for fully strict:

"noImplicitAny": true,
"strictNullChecks": true,
"strict": true,
"strictFunctionTypes": true,
"strictBindCallApply": true

@sutherlanda
Copy link
Contributor

"strict": true turns on all of those flags listed: https://www.typescriptlang.org/docs/handbook/compiler-options.html

@severinbeauvais
Copy link
Collaborator Author

If you do this...

"strict": true,
"noImplicitAny": false,
"strictNullChecks": false,

...then you can start with full strictness and then override just the checks that fail.

@seeker25
Copy link
Collaborator

@severinbeauvais old one here, do we still need this?

@severinbeauvais
Copy link
Collaborator Author

Namerequest UI, Create UI and Edit UI are OK as they already have this:

    "strict": true,
    "noImplicitAny": false,
    "strictNullChecks": false,

I just updated Filings UI (as part of #18534).

Auth Web should be updated. If you're planning on doing it separately then yes, this ticket can probably be closed.

@JohnamLane JohnamLane removed the Pay Work for Pay Team label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ENTITY Business Team Epic
Projects
None yet
Development

No branches or pull requests