29 Commits

Author SHA1 Message Date
Tom MacWright
bcc4b2c6b2 Enforce semi: 2 2015-12-06 18:01:55 -05:00
Tom MacWright
d069b6a40b Support new node versions, including v4 and v5
* Compare strings as lowercase, to permit for v4+ compatibility
* Fix bad reference to loc.name
* Update README badge and fixture
* Remove brfs dependency
* Remove traverse
* Remove browser transform support
2015-12-01 15:34:50 -05:00
Tom MacWright
d470b54213 Correctly interpret name tag. Fixes #205 2015-11-28 11:50:29 -05:00
Tom MacWright
50aaf9d35b --watch and --serve flags
These new flags replace the functionality of
dev-documentation
2015-11-24 11:21:11 -05:00
Tom MacWright
33552c6e8a Fix type merging. Fixes #233
Some params cannot be identified with only param.name. This
changes the algorithm to transform parameters into doc objects
first, and then using the value of doc.name, which is defined
even for parameters with default values.
2015-11-09 12:51:15 -05:00
Tom MacWright
8a2ec3efad Allow param tag type to be inferred and merged with description 2015-11-05 14:48:41 -05:00
Tom MacWright
70cc7d0718 Infer Flow type aliases into typedefs. Fixes #227
Given the `type` tag introduced with Flow, this can infer
a typedef statement, as well as infer its potentially
nested properties and their types.

This also includes

* Refactor of Markdown AST generation that fixes #228
* Refactor of nest.js to handle multi-level nesting
2015-11-04 11:25:32 -05:00
Tom MacWright
55f79ebf14 Infer rest parameters. Fixes #223 2015-11-03 17:40:33 -05:00
Tom MacWright
eb1089e594 Stop inferring parameters if fn is within a call.
Fixes #191

This a specific exception for the case identified in 191: we could,
instead, include only cases of clear proximity, like var foo = function,
or function foo.
2015-10-27 17:52:28 -04:00
Tom MacWright
1eee5a8f93 Infer class kind from es6 class 2015-10-27 11:15:12 -04:00
Tom MacWright
cefe68908b Infer destructured params. Fixes #170
Waiting on an answer in https://github.com/babel/babel/issues/2543
because tests will currently fail.
2015-10-18 18:52:17 -04:00
John Firebaugh
efd5b4ccb4 Correctly name comments attached to module.exports (fixes #178) 2015-10-12 15:57:56 -07:00
John Firebaugh
4c2cc4d8b2 Infer module names 2015-10-12 15:29:30 -07:00
John Firebaugh
5449757782 More test cases and fixes for exports inference 2015-10-12 14:06:14 -07:00
John Firebaugh
9dcfa84d1b Drop @lends tags during membership inference (fixes #161) 2015-10-12 10:10:42 -07:00
John Firebaugh
268fcce66a Infer module membership for [module.]exports (fixes #113) 2015-10-11 14:20:42 -07:00
John Firebaugh
341ab4a075 Use module pattern for infers
Some inferencing will require state.
2015-10-11 14:20:42 -07:00
Tom MacWright
b3c990db1f Simpler and stricter eslint 2015-10-06 20:31:50 -04:00
Tom MacWright
a65801a6d4 Add and test default parameter parsing.
cc @killercup this implements default parameter parsing for both
flow-annotated and unannotated methods
2015-10-06 15:51:46 -04:00
Tom MacWright
11826ad98c Add return type inference as well 2015-10-06 10:44:08 -04:00
Tom MacWright
7730af7603 Implement flow type inference
cc @thejameskyle

`lib/flow_doctrine.js` is where we convert Babel-parsed
Flow annotations into doctrine-style objects so they
can be formatted with all of the existing helpers.
2015-10-06 10:31:54 -04:00
Tom MacWright
b173cf14a5 Fix parameter sorting, nest properties in Markdown 2015-10-05 15:02:33 -04:00
Tom MacWright
5753da1af6 Just deal with comment.params, not comment.tags 2015-10-04 14:04:12 -04:00
Tom MacWright
30525847f3 Handle both flattened and unflattened forms 2015-10-04 13:27:15 -04:00
Tom MacWright
7ff858420e Infer parameters
This uses the AST to add (untyped) params where they aren't explicitly
specified.

Would love to infer types here as well, but espree doesn't support
them yet.

cc @anandthakker / @jfirebaugh for the review
2015-10-04 12:51:41 -04:00
Tom MacWright
de9ff078a6 Remove straggling mentions of streams 2015-09-28 20:40:44 -04:00
Tom MacWright
c24a9b88a4 Enable jsdoc rule and enforce it.
Also:

* Moves reduction out of parsers so that they don't have awkward
  function signatures
2015-09-28 20:36:07 -04:00
Tom MacWright
11043c300c Move more into lib/ 2015-09-26 16:39:44 -04:00
Tom MacWright
a22750161e Simplify sort tests 2015-09-26 16:07:47 -04:00