38 Commits

Author SHA1 Message Date
Tom MacWright
73747306a0 refactor(nest): Better nesting implementation (#732)
* refactor(nest): Better nesting implementation

This nesting implementation uses a proper recursive tree algorithm

Fixes https://github.com/documentationjs/documentation/issues/554

BREAKING CHANGE: referencing inferred destructure params without
renaming them, like $0.x, from JSDoc comments will no longer
work. To reference them, instead add a param tag to name the
destructuring param, and then refer to members of that name.

Before:

```js
/**
 * @param {number} $0.x a member of x
 */
function a({ x }) {}
```

After:

```js
/**
 * @param {Object} options
 * @param {number} options.x a member of x
 */
function a({ x }) {}
```

* Address review comments

* Reduce testing node requirement back down to 4

* Don't output empty properties, reduce diff noise

* Rearrange and document params

* Simplify param inference, update test fixtures. This is focused around Array destructuring: documenting destructured array elements with indices instead of names, because the names are purely internal details

* Use temporary fork to get through blocker
2017-04-21 17:28:53 -04:00
Tom MacWright
25152edeb9 style(prettier): Use prettier for code formatting (#710)
* style(prettier): Use prettier for code formatting

This saves us style issues. Also adds husky and lint-staged for pre-commit testing

Refs https://github.com/documentationjs/documentation/issues/709
2017-04-10 14:25:45 -04:00
Tom MacWright
d884fc725e Support deprecated tag 2017-01-29 18:54:44 -05:00
Tom MacWright
8cc34b661f fix(scopes): Support inner scope (#665)
* fix(scopes): Support inner scope

The purpose and usage of inner is still unclear, unfortunately, so this is an interim fix at best.

Fixes https://github.com/documentationjs/documentation/issues/652

* Improve comment typedef while we're at it
2017-01-29 18:35:19 -05:00
Tom MacWright
631c6925d4 feat(core): Switch to Promises everywhere. Adopt Node v4 ES6 (#648)
* feat(core): Switch to Promises everywhere. Adopt Node v4 ES6

Big changes:

* Uses template strings where appropriate
* Config and argument parsing is unified and there is no such thing
  as formatterOptions anymore. All user-passed options go through
  mergeConfig.
* The node API surface changed (again): `buildSync` is removed,
  building operations return Promises.
* Now using Flow for internal type annotations.

More changes:

* Remove buildSync command
* feat(inference): Partially implement object shorthand support
* Refs #649
* Use Flow annotations to  enforce types
* Keep flow but switch to comment syntax
* Clarify types
* More flow improvements
* Turn server into class
* LinkerStack becomes class too
* Fix comment description type
* Run flow on lint
* Many more flow fixes
* More intense flow refactoring
* Simplify inference steps
* Update inference tests, flow errors down to 1
* Continue refining types
* Fix more flow issues
* Use 'use strict' everywhere
* Make 'ast' property configurable
* Fix many tests
* Fix more tests
* Fix more tests
* Fix augments
* Test Markdown meta support
* Improve test coverage
* Switch back from for of to for for speed
2017-01-27 16:14:19 -05:00
Tom MacWright
06412eaad8 Turbo v1 (#497) 2016-08-19 12:22:54 -04:00
Tom MacWright
8287ab0539 Fix names of methods for generated documentation 2016-06-17 16:18:07 -04:00
Tom MacWright
3f08c19533 Move documentation-theme-utils into core
Also:

* Fixes many issues in the default theme
* Moves the default theme from default-theme to default_theme
* Creates a new, robust linker infrastructure that will support
  bare links
* Replaces slugg with github-slugger
* Outputs unknown types as Any. Fixes #451
2016-06-08 12:40:05 -04:00
Tom MacWright
aadb8addc6 Even more documentation 2016-06-02 14:53:58 -04:00
Tom MacWright
09a4faa672 Cover lib/parse 2016-06-02 14:32:04 -04:00
Tom MacWright
02df59c9a3 Try to make flatteners private 2016-06-02 13:39:06 -04:00
Tom MacWright
21371e71da Inline method 2016-06-02 13:28:57 -04:00
Tom MacWright
7f032d6c6a Improve internal documentation 2016-06-02 13:22:06 -04:00
Tom MacWright
1570955520 Improve internal documentation 2016-06-01 17:17:03 -04:00
Tom MacWright
bb41619c73 Restore default values. Fix sort test 2016-05-05 10:00:57 -04:00
John Firebaugh
ade4f3499b More correct parsing for kind shorthand (@class, @constant, etc)
* Set the `kind` property of the comment, not a property named by the kind.
* Set the `type` property as appropriate for these shorthands.
* Parse @callback as shorthand for @typedef {Function}
2016-03-29 13:21:47 -07:00
John Firebaugh
65035d39d8 @linkcode and @linkplain are inline tags 2016-03-28 13:19:30 -07:00
John Firebaugh
08d6dc21bd Replace markdown strings with parsed ASTs
This eliminates the need for formatInlineTags and jsdoc-inline-lex, and simplifies the implementation of HTML themes.
2016-03-28 13:19:30 -07:00
Tom MacWright
ff0e3b0e2c Write collect() shortcut for parse 2016-03-22 17:50:00 -04:00
John Firebaugh
45b7b50cff Lint unknown tags 2016-03-14 18:45:29 -07:00
John Firebaugh
11a7758e56 Add placeholders for remaining tags 2016-03-14 18:43:09 -07:00
John Firebaugh
bad9c47216 Add @variation support 2016-03-14 18:29:05 -07:00
John Firebaugh
a597741550 Add @ignore support 2016-03-14 18:26:07 -07:00
John Firebaugh
40af71635f Add @interface support 2016-03-14 18:25:57 -07:00
John Firebaugh
e9d17e8795 Add @override and @readonly support 2016-03-14 18:17:18 -07:00
John Firebaugh
d2637ad491 Add placeholder comments for remaining tags 2016-03-14 17:52:04 -07:00
John Firebaugh
0011523f88 Add @abstract support 2016-03-14 17:52:04 -07:00
John Firebaugh
49a1cd9ff6 Clean up @example parsing and expand tests - back to 100% coverage 2016-03-14 17:33:24 -07:00
John Firebaugh
c0efef36ae Combine flatten and normalize into a single step; alphabetize 2016-03-14 16:52:42 -07:00
John Firebaugh
47eb1eaf26 Massage parse.js and tests to make upcoming changes easier 2016-03-14 14:57:24 -07:00
Lucas Wojciechowski
a8581b41e7 Fix exception when formatting lint errors 2015-11-11 09:35:00 -05:00
Tom MacWright
ac5b04183f Improve internal documentation, upgrade theme-default. Refs #115 2015-10-30 15:44:46 -04:00
Tom MacWright
0aa42d294f Enable and fix no-unused-vars rule 2015-10-06 15:28:32 -04:00
Tom MacWright
1603bc6357 Simplifications 2015-10-01 20:41:50 -04:00
Tom MacWright
74b9bd4e0e Fix tests for new error strategy 2015-10-01 20:41:50 -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
a383a045e2 Fix tests 2015-09-27 12:46:09 -04:00
John Firebaugh
b9df26fba8 Build normalize and flatten into core doctrine wrapper 2015-08-30 21:25:54 -07:00