Skip to content

[sort-keys-in-type-decorator] should include "host" #2481

@joergbaier

Description

@joergbaier

The current DEFAULT_ORDER does not include host. I'd suggest adding this. The Angular team has advocated for host over @HostBinding & @HostListener. This is mentioned in the v20 release notes.

we removed most guidance related to NgModules and revisited the usage of @HostBinding and @HostListener in favor of the host object within the directive metadata

I'm not particular where it should be added.

const DEFAULT_ORDER = {
Component: [
'selector',
'imports',
'standalone',
'templateUrl',
'template',
'styleUrl',
'styleUrls',
'styles',
'encapsulation',
'changeDetection',
],
Directive: ['selector', 'standalone'],
NgModule: ['declarations', 'imports', 'exports', 'providers', 'bootstrap'],
Pipe: ['name', 'standalone'],
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    BREAKING CHANGEThis is a breaking change and should only be released as part of a new major versionpackage: eslint-pluginAngular-specific TypeScript rules

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions