Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

new rule: enforce simple TSX attributes #147

Closed
@HamletDRC

Description

@HamletDRC

new rule: enforce simple TSX attributes

Among the things that you should allow in tsx attributes:

  • variables
  • properties
  • method invocations
  • binary expressions on constants ( className={ "container" + "whatever" }
  • binary expressions with a single constant ( className={ "container" + myClassName }

Things to avoid:

  • ternary expressions
  • complex binary expressions ( className = { someName + '-' + someOtherName } )

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: EasySomeone with little to no experience in TSLint should be able to send a pull request for this issue.Good First Issue 🙌Howdy, neighbor!Microsoft InternalIssues related to closed source Microsoft code.Status: Accepting PRsType: Rule SuggestionAdding a new rule that doesn't yet exist here or in TSLint core.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions