-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Description
We need to think how this should work. Consistency is key, IMO
When I generate a new app and create components, the prefixes are not consistent and therefore ng lint barks that we have inconsistent prefixes.
ng new force
cd force
ng g c foo
ng g c bar
We now have
ForceAppComponentwith a selector offorce-appFooComponentwith a selector ofapp-fooBarComponentwith a selector ofapp-bar
Then we add an ng lint rule in tslint.json like this (so we can follow the guide)
"component-selector-prefix": [
true,
"app"
],
If we run ng lint we hear
$ ng lint
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
> force@0.0.0 lint /Users/john/_play/tmp/force
> tslint "src/**/*.ts"
src/app/bar/bar.component.spec.ts[38, 13]: The selector of the component "BarComponentTestController" should have prefix "app", however its value is "test".
src/app/foo/foo.component.spec.ts[38, 13]: The selector of the component "FooComponentTestController" should have prefix "app", however its value is "test".
src/app/force.component.ts[5, 13]: The selector of the component "ForceAppComponent" should have prefix "app", however its value is "force-app".
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgent