- Linting (ESLint): Avoid unneeded tag name preference

- Linting (jsdoc): Avoid `Promise` without type
master
Brett Zamir 2019-05-24 10:12:10 +08:00
parent c8e09a8991
commit a7da98ca1b
3 changed files with 2 additions and 6 deletions

View File

@ -50,10 +50,6 @@ module.exports = {
// In case we need to extend // In case we need to extend
customTags: [] customTags: []
}, },
tagNamePreference: {
arg: "param",
return: "returns"
},
allowOverrideWithoutParam: true, allowOverrideWithoutParam: true,
allowImplementsWithoutParam: true, allowImplementsWithoutParam: true,
allowAugmentsExtendsWithoutParam: true, allowAugmentsExtendsWithoutParam: true,

View File

@ -47,7 +47,7 @@ const isNullish = (val) => {
* @param {HTMLCanvasElement|string} target canvas element or the id of a canvas element * @param {HTMLCanvasElement|string} target canvas element or the id of a canvas element
* @param {string|XMLDocument} s - svg string, url to svg file, or xml document * @param {string|XMLDocument} s - svg string, url to svg file, or xml document
* @param {module:canvg.CanvgOptions} [opts] Optional hash of options * @param {module:canvg.CanvgOptions} [opts] Optional hash of options
* @returns {Promise} All the function after the first render is completed with dom * @returns {Promise<XMLDocument|XMLDocument[]>} All the function after the first render is completed with dom
*/ */
export const canvg = function (target, s, opts) { export const canvg = function (target, s, opts) {
// no parameters // no parameters

View File

@ -21,7 +21,7 @@ let results = await Promise.all(fileMatchPatterns.map((fileMatchPattern) => {
{ {
// We grab to the end of the line as the `line` result for `find-in-files` // We grab to the end of the line as the `line` result for `find-in-files`
// only grabs from the beginning of the file to the end of the match. // only grabs from the beginning of the file to the end of the match.
term: `(@[^{\\n]*{[^}\\n]*(\\bobject|\\barray\\b|[^.]function|\\bnumber|\\*)[^}\\n]*}|@.*{} ).*`, term: `(@[^{\\n]*{[^}\\n]*(\\bobject|Promise(?!<|Result)|\\barray\\b|[^.]function|\\bnumber|\\*)[^}\\n]*}|@.*{} ).*`,
flags: 'gi' flags: 'gi'
}, },
fileMatchPattern, fileMatchPattern,