Skip to content

prettier-plugin: Improve implementation to work for import alias of hbs #121

Open
@wondersloth

Description

@wondersloth

Currently, for a component file, formatting will not apply if the tagged template expression is named anything other than hbs.

Improve the prettier plugin such renaming of the export still works.

Formats today

import Component, { hbs } from '@glimmex/component';

export default class Example extends Component {
  static template = hbs`
    <h1>
      Hello World
    </h1>
  `;
}

Currently does not format

import Component, { hbs as tpl } from '@glimmex/component';

export default class Example extends Component {
  static template = tpl`
    <h1>
      Hello World
    </h1>
  `;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions