Skip to content

chore: ban TypeScript enums via lint rule - #219

Merged
ulissesferreira merged 1 commit into
mainfrom
chore/ban-enums-lint
Aug 31, 2026
Merged

chore: ban TypeScript enums via lint rule#219
ulissesferreira merged 1 commit into
mainfrom
chore/ban-enums-lint

Conversation

@ulissesferreira

Copy link
Copy Markdown
Contributor

Summary

Add an ESLint no-restricted-syntax rule banning TSEnumDeclaration in the shared config, and convert the MonorepoFiles and Placeholders enums in scripts/create-package to as const objects with derived union types.

Refs: MetaMask/eslint-config#417

Changes

  • eslint.config.mjs: ban TSEnumDeclaration with the standard MetaMask message (object + type pattern)
  • scripts/create-package/constants.ts: convert MonorepoFiles and Placeholders enums to as const objects + union types

Validation

  • ESLint config loads without errors
  • No runtime package code touched

…package script

Add an ESLint no-restricted-syntax rule banning TSEnumDeclaration, and
convert the MonorepoFiles and Placeholders enums in scripts/create-package
to as const objects with derived union types.
@ulissesferreira
ulissesferreira added this pull request to the merge queue Aug 31, 2026
Merged via the queue into main with commit 518e263 Aug 31, 2026
54 checks passed
@ulissesferreira
ulissesferreira deleted the chore/ban-enums-lint branch August 31, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants