Best practices for 3rd party UI plugins

Best practices for 3rd party UI plugins

Is there a document or workflow describing the best practices for developing 3rd party plugins,
  for example  how to setup test directories , Qunit , names spacing,  and using the widget prototype

Is there any 3rd party UI plugins that set themselves apart as  great examples?

Thanks Justin