Skip to content

chore: ban TypeScript enums via lint rule - #219

Open
ulissesferreira wants to merge 1 commit into
mainfrom
chore/ban-enums-lint
Open

chore: ban TypeScript enums via lint rule#219
ulissesferreira wants to merge 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.
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.

1 participant