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.

Consider taking no-multiline-string out of the recommended preset #454

@astorije

Description

@astorije

We use and love the recommended preset at @CloudHealth, but we find no-multiline-string to be an unnecessarily restrictive rule to recommend by default.

As far as I can tell, there is nothing inherently bad about multiline template strings, and they're not one of those things accepted to be dangerous or recommended not to use by the community such as eval or ==.

In our case, and this is probably the biggest reason why we disabled it (but not the only one), GraphQL queries are most of the time represented using multiline template strings:

query UserQuery($email: string) {
  user(id: $email) {
    name
    avatar
  }
}

This is true with both Apollo Client and Relay Client.

We also find this useful when building CLIs for example, but it's less easily found across our codebase.

So there is it, I suggest removing it from the recommended preset, from the point of view of a consumer :)
Thanks and keep up the good work!

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.Status: Awaiting More FeedbackStatus: In DiscussionPlease continue discussing the proposed change before sending a pull request.Type: TaskMiscellaneous work.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions