[wp-trac] [WordPress Trac] #35465: Improve wp.Backbone docs

WordPress Trac noreply at wordpress.org
Sun Apr 22 10:34:18 UTC 2018


#35465: Improve wp.Backbone docs
----------------------------------------+-------------------------------
 Reporter:  ericlewis                   |       Owner:  gma992
     Type:  enhancement                 |      Status:  reopened
 Priority:  normal                      |   Milestone:  5.0
Component:  General                     |     Version:  3.5
 Severity:  normal                      |  Resolution:
 Keywords:  good-first-bug needs-patch  |     Focuses:  javascript, docs
----------------------------------------+-------------------------------

Comment (by birgire):

 Replying to [comment:17 netweb]:
 > I've created #43828 that adds a JSDoc ESLint script, it can be run by
 downloading and applying the patch and updating the dependencies by
 running `npm install` and `npm run lint:jsdoc` to run the script.

 Great, I tested running {{{npm install}}} and {{{npm run lint:jsdoc}}},
 with output for all files:

 {{{
 ...
 /path/to/src/wp-includes/js/wp-backbone.js
    23:14  error  Use 'Array' instead of 'array'      valid-jsdoc
    38:15  error  Use 'Array' instead of 'array'      valid-jsdoc
    44:3   error  Missing JSDoc return description    valid-jsdoc
    54:15  error  Use 'Array' instead of 'array'      valid-jsdoc
    80:3   error  Missing JSDoc return type           valid-jsdoc
   111:14  error  Use 'Array' instead of 'array'      valid-jsdoc
   177:3   error  Missing JSDoc return type           valid-jsdoc
   200:14  error  Use 'Array' instead of 'array'      valid-jsdoc
   200:20  error  Use 'Object' instead of 'object'    valid-jsdoc
   231:14  error  Use 'Array' instead of 'array'      valid-jsdoc
   231:20  error  Use 'Object' instead of 'object'    valid-jsdoc
   408:14  error  Use 'Array' instead of 'array'      valid-jsdoc
   408:20  error  Use 'Object' instead of 'object'    valid-jsdoc
   455:6   error  Use @return instead                 valid-jsdoc
   499:3   error  Missing JSDoc @return for function  valid-jsdoc
   519:6   error  Use @return instead                 valid-jsdoc
   544:6   error  Use @return instead                 valid-jsdoc
 ...

 }}}

 ps: how would we run this on a specific .js file?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/35465#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list