blockly-samples icon indicating copy to clipboard operation
blockly-samples copied to clipboard

Enable strict mode for block-shareable-procedures

Open maribethb opened this issue 2 years ago • 2 comments

Check for duplicates

  • [X] I have searched for similar issues before opening a new one.

Component

block-shareable-procedures

Problem

No response

Request

The block-shareable-procedures plugin does not have "strict mode" enabled for TypeScript. We should enable it to have better type checking for our plugins, but doing so may show some TypeScript errors that need to be fixed first.

This would be a good first issue for anyone experienced with working in TypeScript. You may need to adjust types, add checks for null or undefined, or make other fixes. If you have questions, feel free to ask here! In general, the team prefers avoiding casts and using ! to coerce non-null types, and instead adding appropriate checks.

To work on this issue:

  1. Run npm install at the root of Blockly samples to set up dependencies.
  2. Navigate to the plugin's directory
  3. Change strict: false to strict: true in the plugin's tsconfig.json
  4. Run npm run build and see if there are any TypeScript errors.
  5. Resolve any TypeScript errors, if present. If not, then we got lucky and accidentally wrote strict code! Yay!
  6. Run npm run build again to make sure there are no TypeScript errors.
  7. Run npm run start and play with the plugin in the playground to make sure the plugin still behaves as expected.
  8. Run npm run test to run any automated tests.
  9. Run npm run lint to make sure there are no formatting errors.
  10. Open a PR with your changes!

Alternatives considered

No response

Additional context

No response

maribethb avatar Oct 20 '23 22:10 maribethb

Hi @maribethb. I'd like to work on this issue.

Amir-Helali avatar Nov 23 '23 22:11 Amir-Helali

@Amir-Helali Go for it =) If you have any questions let us know!

BeksOmega avatar Nov 27 '23 16:11 BeksOmega