Skip to content

ng lint claims on custom component prefix #5590

@zd333

Description

@zd333

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.0.0-rc.2
node: 7.6.0
os: linux x64
@angular/common: 2.4.10
@angular/compiler: 2.4.10
@angular/core: 2.4.10
@angular/forms: 2.4.10
@angular/http: 2.4.10
@angular/platform-browser: 2.4.10
@angular/platform-browser-dynamic: 2.4.10
@angular/router: 3.4.10
@angular/cli: 1.0.0-rc.2
@angular/compiler-cli: 2.4.10

Repro steps.

  1. Create new project with ng new someproject
  2. Replace default "app" prefix property value with any custom prefix (e.g. "myprj") in .angular-cli.json
  3. Replace default app-root selector in root component with myprj-root
  4. optionally generate new component with ng generate component testprefix
  5. run ng lint

The log given by the failure.

src/app/second/second.component.ts[4, 13]: The selector of the component "SecondComponent" should have prefix "app" (https://goo.gl/cix8BY)
src/app/app.component.ts[4, 13]: The selector of the component "AppComponent" should have prefix "app" (https://goo.gl/cix8BY)

Desired functionality.

Component selector with correctly set up custom prefix is not claimed by ng lint

Thanks!

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