-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue: #161
- Loading branch information
Showing
10 changed files
with
343 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# jsdocTagsOrder | ||
|
||
Use this param for customizing tags order. To change tags order, Change the weight of them, for example the `default` tag has 22 weight for put that below of `returns` (42) we could change weight of it to 42.1 | ||
|
||
```json | ||
{ | ||
"jsdocTagsOrder": "{\"default\":42.1}" | ||
} | ||
``` | ||
|
||
jsdocTagsOrder accepting json string | ||
|
||
### plugin builtin order | ||
|
||
``` | ||
remarks: 1, | ||
privateRemarks: 2, | ||
providesModule: 3, | ||
module: 4, | ||
license: 5, | ||
flow: 6, | ||
async: 7, | ||
private: 8, | ||
ignore: 9, | ||
memberof: 10, | ||
version: 11, | ||
file: 12, | ||
author: 13, | ||
deprecated: 14, | ||
since: 15, | ||
category: 16, | ||
description: 17, | ||
example: 18, | ||
abstract: 19, | ||
augments: 20, | ||
constant: 21, | ||
default: 22, | ||
defaultValue: 23, | ||
external: 24, | ||
overload: 25, | ||
fires: 26, | ||
template: 27, | ||
typeParam: 28, | ||
function: 29, | ||
namespace: 30, | ||
borrows: 31, | ||
class: 32, | ||
extends: 33, | ||
member: 34, | ||
typedef: 35, | ||
type: 36, | ||
satisfies: 37, | ||
property: 38, | ||
callback: 39, | ||
param: 40, | ||
yields: 41, | ||
returns: 42, | ||
throws: 43, | ||
other: 44, // any other tags which is not listed here | ||
see: 45, | ||
todo: 46, | ||
``` | ||
|
||
### example | ||
|
||
```json | ||
{ | ||
"jsdocTagsOrder": "{\"param\":28.1, \"return\":28.2, \"example\":70}" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`File: order-custom.jsx 1`] = ` | ||
"/** | ||
* @property {string} language | ||
* @property {string} type | ||
* @property {string} content | ||
* @param {string} className | ||
* @param {string} language | ||
* @param {ClassAdderEnvironment} env | ||
* @example | ||
* let foo = \\"foo\\" | ||
* | ||
* @see http://github.com/hosseinmd/prettier-plugin-jsdoc | ||
* @returns {undefined | string | string[]} | ||
*/ | ||
|
||
/** | ||
* Returns an object which provides methods to get the ids of the components | ||
* which have to be loaded (\`getIds\`) and a way to efficiently load them in | ||
* synchronously and asynchronous contexts (\`load\`). | ||
* | ||
* The set of ids to be loaded is a superset of \`load\`. If some of these ids | ||
* are in \`loaded\`, the corresponding components will have to reloaded. | ||
* | ||
* The ids in \`load\` and \`loaded\` may be in any order and can contain | ||
* duplicates. | ||
* | ||
* @param {Components} components | ||
* @param {string[]} load | ||
* @param {string[]} [loaded=[]] A list of already loaded components. | ||
* | ||
* If a component is in this list, then all of its requirements will also be | ||
* assumed to be in the list. Default is \`[]\` | ||
* @returns {Loader} | ||
* | ||
* @typedef Loader | ||
* @property {() => string[]} getIds A function to get all ids of the | ||
* components to load. | ||
* | ||
* The returned ids will be duplicate-free, alias-free and in load order. | ||
* @property {LoadFunction} load A functional interface to load components. | ||
* | ||
* @typedef {<T>( | ||
* loadComponent: (id: string) => T, | ||
* chainer?: LoadChainer<T>, | ||
* ) => T} LoadFunction | ||
* A functional interface to load components. | ||
* | ||
* The \`loadComponent\` function will be called for every component in the | ||
* order in which they have to be loaded. | ||
* | ||
* The \`chainer\` is useful for asynchronous loading and its \`series\` and | ||
* \`parallel\` functions can be thought of as \`Promise#then\` and | ||
* \`Promise.all\`. | ||
* @example | ||
* load(id => { loadComponent(id); }); // returns undefined | ||
* | ||
* await load( | ||
* id => loadComponentAsync(id), // returns a Promise for each id | ||
* { | ||
* series: async (before, after) => { | ||
* await before; | ||
* await after(); | ||
* }, | ||
* parallel: async (values) => { | ||
* await Promise.all(values); | ||
* } | ||
* } | ||
* ); | ||
*/ | ||
|
||
/** | ||
* Function example description that was wrapped by hand so it have more then | ||
* one line and don't end with a dot REPEATED TWO TIMES BECAUSE IT WAS EASIER to | ||
* copy function example description that was wrapped by hand so it have more | ||
* then one line. | ||
* | ||
* @async | ||
* @private | ||
* @memberof test | ||
* @param {String | Number} text - Some text description that is very long and | ||
* needs to be wrapped | ||
* @param {String} [defaultValue=\\"defaultTest\\"] TODO. Default is \`\\"defaultTest\\"\` | ||
* @param {Number | Null} [optionalNumber] | ||
* @example | ||
* var one = 5 | ||
* var two = 10 | ||
* | ||
* if(one > 2) { two += one } | ||
* | ||
* @undefiendTag\${\\" \\"} | ||
* @undefiendTag {number} name des | ||
* @returns {Boolean} Description for @returns with s | ||
*/ | ||
const testFunction = (text, defaultValue, optionalNumber) => true; | ||
" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.