Skip to content

Style guides conflict with stubbing angular components in tests causing unavoidable lint errors #11548

@ajspera

Description

@ajspera

Bug Report or Feature Request (mark with an x)

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

Area

- [x] devkit
- [ ] schematics

Versions

Angular CLI: 6.0.8
Node: 8.11.2

Repro steps

@Component( {selector: 'router-outlet', template: ''} )
class RouterOutletStubComponent {}
  • run ng lint

The log given by the failure

ERROR: /home/alex/Repos/linterr/src/app/app.component.spec.ts[3, 23]: The selector of the component "RouterOutletStubComponent" should have prefix "app" (https://angular.io/styleguide#style-02-07)

Desired functionality

Style guides about selectors should not be applied to mocked or stubbed components.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions