-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
… Improve JSDoc.
- Loading branch information
1 parent
f31dc79
commit 5417ed3
Showing
13 changed files
with
853 additions
and
300 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
dist | ||
dist | ||
scripts |
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 |
---|---|---|
@@ -1,34 +1,47 @@ | ||
{ | ||
"extends": "airbnb-base", | ||
"extends": ["airbnb-base", "plugin:jsdoc/recommended"], | ||
"plugins": ["jsdoc"], | ||
"rules": { | ||
"no-plusplus": "off", | ||
"no-cond-assign": ["error", "except-parens"], | ||
"no-unused-expressions": ["error", { "allowShortCircuit": true }], | ||
"jsdoc/check-alignment": 1, | ||
"jsdoc/require-jsdoc": ["warn", { | ||
"publicOnly": true | ||
}], | ||
"jsdoc/no-undefined-types": ["warn", { | ||
"definedTypes": [ | ||
"UnionReplacer", | ||
"UnionReplacer.ReplacementBuilder", | ||
"RegExpExecArray", | ||
"true", | ||
"false", | ||
"T" | ||
] | ||
}], | ||
"jsdoc/check-examples": 1, | ||
"jsdoc/check-indentation": "off", | ||
"jsdoc/check-param-names": 1, | ||
"jsdoc/check-syntax": 1, | ||
"jsdoc/check-tag-names": 1, | ||
"jsdoc/check-types": 1, | ||
"jsdoc/implements-on-classes": 1, | ||
"jsdoc/match-description": 1, | ||
"jsdoc/newline-after-description": 1, | ||
"jsdoc/no-undefined-types": 1, | ||
"jsdoc/require-description": 1, | ||
"jsdoc/require-description": ["warn", { | ||
"exemptedBy": ["inheritdoc", "private", "deprecated", "hideconstructor"] | ||
}], | ||
"jsdoc/require-description-complete-sentence": 1, | ||
"jsdoc/require-example": 1, | ||
"jsdoc/require-hyphen-before-param-description": 1, | ||
"jsdoc/require-jsdoc": 1, | ||
"jsdoc/require-param": 1, | ||
"jsdoc/require-param-description": 1, | ||
"jsdoc/require-param-name": 1, | ||
"jsdoc/require-param-type": 1, | ||
"jsdoc/require-returns": 1, | ||
"jsdoc/require-returns-check": 1, | ||
"jsdoc/require-returns-description": 1, | ||
"jsdoc/require-returns-type": 1, | ||
"jsdoc/valid-types": 1 | ||
"jsdoc/require-param": ["warn", { | ||
"exemptedBy": ["inheritdoc", "hideconstructor"] | ||
}], | ||
"jsdoc/require-example": ["warn", { | ||
"contexts" : [ | ||
"ClassDeclaration[id.name='UnionReplacer'] > ClassBody > MethodDefinition" | ||
], | ||
"exemptedBy": ["inheritdoc", "private", "deprecated"] | ||
}], | ||
"jsdoc/require-hyphen-before-param-description": 1 | ||
}, | ||
"settings": { | ||
"jsdoc": { | ||
"mode": "closure", | ||
"tagNamePreference": { | ||
"function": "method" | ||
} | ||
} | ||
} | ||
} |
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,24 @@ | ||
const template = env.opts.template || ''; | ||
const targetTs = template.includes('tsd-jsdoc'); | ||
|
||
const sourceIncludes = [ | ||
'src/UnionReplacer.js', | ||
'src/MatchingContext.js', | ||
'src/typedefs.js', | ||
]; | ||
|
||
if (!targetTs) { | ||
sourceIncludes.push('src/typedefs-tscompat.js'); | ||
} | ||
|
||
module.exports = { | ||
source: { include: sourceIncludes }, | ||
plugins: [ | ||
'./node_modules/tsd-jsdoc/dist/plugin', | ||
'plugins/markdown', | ||
], | ||
opts: { | ||
package: 'package.json', | ||
readme: 'README.md', | ||
}, | ||
}; |
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.