Skip to content

Adopt @microbit/eslint-config - #25

Merged
microbit-matt-hillsdon merged 1 commit into
mainfrom
shared-eslint-config
Sep 1, 2026
Merged

Adopt @microbit/eslint-config#25
microbit-matt-hillsdon merged 1 commit into
mainfrom
shared-eslint-config

Conversation

@microbit-matt-hillsdon

Copy link
Copy Markdown
Contributor

Replaces the legacy .eslintrc.cjs and per-project plugin set with the shared flat config, moving to ESLint 9. eslint-plugin-storybook stays a project dependency as its version tracks Storybook's release cycle; the one-line flat/recommended addition isn't worth a shared config export until more Storybook conventions accumulate.

Fixes for the type-aware rules the shared config enables:

  • Type the postMessage listeners' event.data, previously any, via narrow local types that the existing per-message casts build on.
  • Rework MakeCodeBlocksRendering's empty-code case to derive the rendered output instead of setting state synchronously in the effect (react-hooks set-state-in-effect).
  • SnippetAnswerTypes uses (string & {}) to keep the named literals in autocomplete rather than a union the string member absorbs.
  • Type info()'s response resp field, previously any via the intersection with EditorMessageResponse.
  • Mark intentionally unawaited promises with void, drop async from functions with no await, and remove now-unnecessary assertions.

The lockfile is regenerated as npm could not resolve the ESLint major bump in place.

Replaces the legacy .eslintrc.cjs and per-project plugin set with the
shared flat config, moving to ESLint 9. eslint-plugin-storybook stays a
project dependency as its version tracks Storybook's release cycle; the
one-line flat/recommended addition isn't worth a shared config export
until more Storybook conventions accumulate.

Fixes for the type-aware rules the shared config enables:

- Type the postMessage listeners' event.data, previously any, via
  narrow local types that the existing per-message casts build on.
- Rework MakeCodeBlocksRendering's empty-code case to derive the
  rendered output instead of setting state synchronously in the effect
  (react-hooks set-state-in-effect).
- SnippetAnswerTypes uses (string & {}) to keep the named literals in
  autocomplete rather than a union the string member absorbs.
- Type info()'s response resp field, previously any via the intersection
  with EditorMessageResponse.
- Mark intentionally unawaited promises with void, drop async from
  functions with no await, and remove now-unnecessary assertions.

The lockfile is regenerated as npm could not resolve the ESLint major
bump in place.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying makecode-embed with  Cloudflare Pages  Cloudflare Pages

Latest commit: c3f61a7
Status: ✅  Deploy successful!
Preview URL: https://6bdae7dd.makecode-embed.pages.dev
Branch Preview URL: https://shared-eslint-config.makecode-embed.pages.dev

View logs

@microbit-matt-hillsdon
microbit-matt-hillsdon merged commit cf5b669 into main Sep 1, 2026
4 checks passed
@microbit-matt-hillsdon
microbit-matt-hillsdon deleted the shared-eslint-config branch September 1, 2026 15:37
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