67 Commits

Author SHA1 Message Date
Tom MacWright
0ecb68d6a6 chore: Update test fixture 2018-09-20 23:22:30 -07:00
Victor
49c0f72793 feat: Babel 7 support
BREAKING CHANGE: This moves documentation.js to Babel 7. From now on,
documentation.js will only support Babel 7: please stick to older
releases if you need to support Babel 6. Additionally, this work
temporarily disables support for following dynamic imports.
2018-09-20 23:21:14 -07:00
Konstantin Petryaev
40b17839a6 fix: membership infering for methods (#1122)
* Fix membership infering for methods

Improve inferMembership to allow to use next code:
```js
/**
 * @memberof BigFeature
 */
class MyClass {
  method() {}
}
```
Before this improvement, we have `method` inside
 `global.MyClass` instead of `global.BigFeature.MyClass`

* Add tests fir membership infering for methods
2018-08-23 09:55:03 -07:00
gburnett
4d59f6fdc3 fix: Serve on correct port
Update serve command to pass object to get-port
2018-08-17 07:40:53 -07:00
Max Schmitt
45a9ea924a feat: added project description 2018-08-03 15:35:25 -07:00
Tom MacWright
1cbf3d28a9 chore: Update snapshots 2018-07-15 20:43:11 -07:00
Jayden Seric
ca6217fb19 feat: Semantic markdown headings (#1087)
- Previously, headers were displayed using `p` and `strong` tags. This is semantically incorrect, and would cause subheadings to display larger than headings for nested sections on platforms such as Github.
- “Parameters”, “Properties”, and “Examples” now render as headings with a dynamic level greater than the heading they are nested under.

BREAKING CHANGE: changes Markdown output
2018-06-04 11:51:09 -07:00
Felix Gnass
46ee751f45 test: flow comment types 2018-05-26 10:17:24 -07:00
Tom MacWright
4fd776b16a
feat: Auto-detect readme filename
BREAKING CHANGE: the --readme-file option now has a smart default value
2018-05-21 20:44:59 -07:00
Tom MacWright
8f9bc7b353
fix(vue): Make vue parser tolerant of components that don't contain scripts (#1061)
Fixes #1060
2018-04-24 13:14:16 -07:00
Reinier Battenberg
9d7bd2eff6 fix: adding vue support broke tests that are not file based (#1058)
* fix: adding vue support broke tests that are not file based

fix #1057

* Got the tests and code working for supporting non-file documenting

* Added fresh snapshot
2018-04-23 10:53:07 -07:00
Tom MacWright
f60d90cf9e
feat: Vue Support
Thanks to @batje, documentation.js now supports Vue! .vue files are parsed for their JavaScript contents by default.
2018-04-20 11:45:14 -07:00
Tom MacWright
0e23b7cdc0 test: Another tweak to make tests resistant to versioning 2018-04-11 11:51:22 -07:00
Bohdan Lyzanets
630625d04e fix: get rid of shelljs dependency 2018-04-11 10:33:25 -07:00
Tom MacWright
b309d39e93 feat(doctrine): Support decorator syntax in examples
Support decorators is an unspecified part of JSDoc: we're just going forward and implementing a new
syntax here because it's unlikely that JSDoc will move fast enough.

Fixes #1016
2018-04-11 10:33:09 -07:00
Tom MacWright
22d8740c23 feat(inferTypes): Support class properties
Previously we did not properly infer params on methods that were located on class properties. This
changes things so that we do. It carefully tries to avoid messing up the existing support of class
type annotations, which are similar to class properties at the AST level, but do not have an
associated node, only a type alias.

Fixes #1043
2018-04-11 10:16:38 -07:00
Tom MacWright
6bf3f9716d
test: Make tests resilient between versions: no more annoying chores (#1045) 2018-04-11 09:10:07 -07:00
Tim De Pauw
4ed5edf88d feat: Support class property @type tag (#1028) 2018-03-07 16:12:17 -08:00
Maciej Kasprzyk
99ad49b833 fix: lends with object property using literal key (#1035) 2018-03-03 17:25:51 -08:00
Tom MacWright
e1528c4ace
chore: update tests for new version 2018-03-02 08:18:30 -08:00
Tom MacWright
23315346a4
chore: update tests for last version 2018-03-01 22:25:00 -08:00
Tom MacWright
ccce516b49
feat: documentation.js now requires node v6 or newer. (#1034)
BREAKING CHANGE: documentation.js requires node v6 or newer.
2018-03-01 22:19:53 -08:00
Tom MacWright
ab494dd1b3
feat: use reference links for Markdown output, improving brevity
* Use reference links in Markdown.

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

This approach might be problematic when inserting markdown under a readme heading if the readme already has link references with conflicting ID’s.

* Reference links edits:

- fix broken normalize() utility in test suite so that it produces
  output that doesn't choke referenceLinks.
- add DocumentationConfig option `--noReferenceLinks` which will be
  **internal only**, and turns off reference links for `readme` mode
- rebuilds test output with these changes

unrelated but minor

- includes .prettierrc and updates calls to prettier to use that instead
  of CLI options

* chore: update test snapshots

* Update readme snap
2018-03-01 15:18:20 -08:00
Anatoly Bubenkov
64f660dc87 feat: Support --shallow argument for lint command. Closes #956 (#995) 2018-03-01 12:07:44 -08:00
Bob Lannon
37a91b2199 fix: github links for @typedef comments should link to comment, not context (#1024)
* github link to typedef points to comment lines

* adding test for typedef github links

* adding comment.loc for flow check

* reverting to original formatting

* use afterEach to restore mock even if tests fail

* fixing line numbers in expected value
2018-03-01 12:01:35 -08:00
John Firebaugh
487336fcd8 chore: Update tests for release (#1017) 2018-02-20 15:49:04 -08:00
Anton Shchekota
7d74060caf Eslint add new rules - no-var and prefer-const 2018-01-24 14:10:41 +03:00
Tom MacWright
442b509515
chore: Update tests for release 2017-12-11 17:22:16 -08:00
Tom MacWright
aa661ffcbf
fix(globals-docs): Remove en-US from MDN links. (#973)
This allows the Mozilla Developer Network to infer the user language.

Fix #964
2017-12-11 17:04:28 -08:00
Hugo Josefson
7e0127819a Fix args regression: readme --shallow --format (Invalid second argument) (#968)
* Add shared_options to readme command.

This makes --shallow and --format work again.

* Update yarn.lock based on package.json.

* Move readme example to where it works,

remove superfluous usage string.

yargs@>=7 throws exceptions on incorrectly structured builder objects.

* Update expected readme test fixture.

* Update bin-readme snapshot.

* s/_.assign/Object.assign/g thanks to node@>=4.

* Update yarn.lock based on package.json (lint-staged@6)

* Override flow error message.
2017-12-10 15:04:32 +03:00
Tom MacWright
2128e42ffb
Update for tag 2017-10-12 16:34:51 -07:00
Michel Simonot
7a548eb444 fix(html): Display all levels of parameter properties. (#933)
Fix default_theme to render all parameter properties.
 
- Split the parameter property template portion into its own partial.
- Have the new partial recursively call itself if there are sub-properties.
2017-10-04 12:34:39 -07:00
Anton Shchekota
f375b2ba75 chore: updated flow js 2017-09-29 16:17:19 +03:00
Anton Shchekota
337b7a639e chore: updated jest 21 version 2017-09-29 11:56:03 +03:00
Tom MacWright
c6bf13db38 test: Even more tests 2017-09-14 17:58:39 -07:00
Tom MacWright
e02b91f8d5
chore: Update tests for release 2017-09-14 17:07:36 -07:00
Tom MacWright
de19175980 test: Add tests for moduleFilters, tiny typo fix 2017-09-14 17:04:34 -07:00
Tom MacWright
2605a3b5fd test: Tests for dependency resolution 2017-09-14 17:04:34 -07:00
Tom MacWright
61b6976594 test: More tests 2017-09-14 17:04:34 -07:00
Tom MacWright
8779369ce5 test: Add stronger jest tests for inference 2017-09-14 16:17:15 -07:00
Tom MacWright
adf1bd04c0 test: Add specific test for quoted properties in type definitions 2017-09-14 15:57:13 -07:00
Tom MacWright
a8201748e6 chore: Update tests for latest release (#912) 2017-09-14 14:09:36 -07:00
Tom MacWright
b97241f8d1 fix: Enable dynamicImport plugin to support import() syntax (#903)
Fixes #902
2017-09-07 09:51:24 -07:00
Ryan Hendrickson
125a577199 fix: regression in toc causing crash 2017-09-04 19:25:40 -04:00
Ryan Hendrickson
5bdbf1f870 fix: cover more hideconstructor cases 2017-09-04 16:37:30 -04:00
Tom MacWright
0307dbaaa6
chore: Update test fixtures 2017-09-04 00:13:00 -07:00
Ryan Hendrickson
a04b6fd61d fix: @name tag disconnects comment (#897)
The previous support for @name tags suppressing inference from
surrounding code was ad-hoc and incomplete. This commit makes a @name
tag (or a tag acting as a @kind/@name shorthand combo, like @function)
detach the `ast` field from the comment context, so that the surrounding
code will be universally ignored per the JSDoc spec.
2017-09-03 23:44:55 -07:00
Ryan Hendrickson
c94412a7aa feat: groups in toc (#895) 2017-09-03 23:44:31 -07:00
Ryan Hendrickson
7a07d5118d feat: implement @hideconstructor (#898)
Per usejsdoc.org, this tag goes either in a comment attached to a
function that has declared that function to be a class, or in a comment
on an ES6 class constructor.
2017-09-03 23:07:13 -07:00
Anton Shchekota
b486988cdd chore: Update tests for new tag 2017-08-24 15:39:09 +03:00