microsoft / microsoft/fluentui-contrib
[Feature]: Implement Rule to Ban Enums and Artificial Syntax in TypeScript
Open
@dmytrokirpa is already working on this.
Since Feb 28, 2025.
enhancement
- Dominant language
- TypeScript
- Stars
- 56
- Forks
- 62
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 1
Description
Implement a rule to ban the use of enums and other artificial syntax structures in our codebase. This can be achieved through one of the following approaches:
-
Use Existing Tools:
- https://github.com/typescript-eslint/typescript-eslint/issues/561#issuecomment-496664453 or https://cartant.github.io/tslint-etc/ : these tools provide rules to ban enums, but we need to verify their current status and compatibility.
-
Port Existing Rules:
- We can port the existing rules under the fluent project to our codebase.
-
Build Custom Rule:
- We can develop a custom rule called
no-artificial-syntaxto ban enums and other artificial syntax structures by default, with an option to configure opt-outs for specific syntax structures.
- We can develop a custom rule called
Implementing this rule will help us maintain a cleaner and more manageable codebase. We welcome feedback and suggestions from the team on this proposal.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.