-
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.
fix(prettier-plugin-jsdoc): move providers load to another fn
- Loading branch information
Showing
3 changed files
with
42 additions
and
31 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,35 +1,7 @@ | ||
const path = require('path'); | ||
const { loadProviders, get } = require('./fns/app'); | ||
const { get } = require('./fns/app'); | ||
const { getPlugin } = require('./fns/getPlugin'); | ||
const { loadFns } = require('./loader'); | ||
|
||
loadProviders(path.join(__dirname, 'fns'), [ | ||
'formatAccessTag', | ||
'formatArrays', | ||
'formatDescription', | ||
'formatObjects', | ||
'formatStringLiterals', | ||
'formatTSTypes', | ||
'formatTags', | ||
'formatTagsDescription', | ||
'formatTagsTypes', | ||
'formatTypeAsCode', | ||
'getLanguages', | ||
'getOptions', | ||
'getParsers', | ||
'getPlugin', | ||
'prepareExampleTag', | ||
'prepareTagDescription', | ||
'prepareTagName', | ||
'prepareTags', | ||
'render', | ||
'renderExampleTag', | ||
'renderTagInColumns', | ||
'renderTagInLine', | ||
'replaceTagsSynonyms', | ||
'sortTags', | ||
'splitText', | ||
'trimTagsProperties', | ||
'utils', | ||
]); | ||
loadFns(); | ||
|
||
module.exports = get(getPlugin)(); |
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,38 @@ | ||
const path = require('path'); | ||
const { loadProviders } = require('./fns/app'); | ||
/** | ||
* Loads and registers the providers of all the plugin functions. | ||
*/ | ||
const loadFns = () => { | ||
loadProviders(path.join(__dirname, 'fns'), [ | ||
'formatAccessTag', | ||
'formatArrays', | ||
'formatDescription', | ||
'formatObjects', | ||
'formatStringLiterals', | ||
'formatTSTypes', | ||
'formatTags', | ||
'formatTagsDescription', | ||
'formatTagsTypes', | ||
'formatTypeAsCode', | ||
'getLanguages', | ||
'getOptions', | ||
'getParsers', | ||
'getPlugin', | ||
'prepareExampleTag', | ||
'prepareTagDescription', | ||
'prepareTagName', | ||
'prepareTags', | ||
'render', | ||
'renderExampleTag', | ||
'renderTagInColumns', | ||
'renderTagInLine', | ||
'replaceTagsSynonyms', | ||
'sortTags', | ||
'splitText', | ||
'trimTagsProperties', | ||
'utils', | ||
]); | ||
}; | ||
|
||
module.exports.loadFns = loadFns; |
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