angular / angular-hint

run-time hinting for AngularJS applications
362 stars 45 forks source link

Don't complain about simple module names #61

Closed ivarni closed 9 years ago

ivarni commented 9 years ago

I got this warning:

The best practice for module names is to use lowerCamelCase. Check the name of "config"

I'd argue that config already is lowerCamelCase. I don't feel it's very DRY to rename it to configModule.

ocombe commented 9 years ago

Yeah, and when it's complaining about external modules names ...

hint.js:612 The best practice for module names is to use lowerCamelCase. Check the name of "ui.router".

Like I could do something about that :-/

achr3f commented 9 years ago

:+1:

brettstack commented 9 years ago

Since it complains about a lot of angular-owned modules (e.g. angular material), I'd say this is a bug.

@ocombe, how would you identify modules as external? Perhaps in config phase provide a list of namespaces that you "own" in the app?

ocombe commented 9 years ago

Maybe batarang could use source maps to know it's coming from a bower_components/npm_modules folder, that would help a lot to identify external libs I think What do you think @btford? Is it possible?

btford commented 9 years ago

:+1: seems reasonable

scottohara commented 9 years ago

I agree that there needs to be a solution to prevent warnings about 3rd party modules.

With regard to the OPs comment about simple module names (e.g. config), I would assume that the warning is because the name doesn't pass the modules should have a prefix rule.

In which case it should be xxConfig (where xx is your prefix to distinguish it from someone else's config module)