Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

requireParam.js.map 24KB

1
  1. {"version":3,"sources":["../../src/rules/requireParam.js"],"names":["rootNamer","desiredRoots","currentIndex","name","idx","incremented","length","base","suffix","shift","jsdoc","utils","context","preferredTagName","getPreferredTagName","tagName","jsdocParameterNames","getJsdocTagsDeep","shallowJsdocParameterNames","filter","tag","includes","map","avoidDocs","hasTag","autoIncrementBase","checkRestProperty","checkDestructured","checkDestructuredRoots","checkTypesPattern","enableFixer","enableRootFixer","enableRestElementFixer","unnamedRootBase","useDefaultObjectProperties","options","checkTypesRegex","getRegexFromString","missingTags","functionParameterNames","getFunctionParameterNames","flattenedRoots","flattenRoots","names","paramIndex","hasParamIndex","cur","_","has","dropPathSegmentQuotes","String","getParamIndex","setParamIndex","forEach","findExpectedIndex","jsdocTags","indexAtFunctionParams","remainingRoots","slice","foundIndex","findIndex","newAdd","some","remainingRoot","Array","isArray","tags","tagLineCount","source","tokens","end","nextRootName","namer","functionParameterName","functionParameterIdx","inc","matchedJsdoc","rootName","type","search","hasRestElement","hasPropertyRest","rests","notCheckingNames","paramName","find","fpn","emptyParamIdx","push","remove","fullParamName","notCheckingName","paramType","comparePaths","undefined","startsWith","funcParamName","restElement","fix","createTokens","tagIndex","sourceIndex","spliceCount","number","delimiter","description","lineEnd","postDelimiter","postName","postTag","postType","start","splice","firstNumber","src","offset","expectedIdx","fixer","missingTag","makeMultiline","reportJSDoc","contextDefaults","meta","docs","url","fixable","schema","additionalProperties","properties","default","checkConstructors","checkGetters","checkSetters","contexts","items","anyOf","comment","exemptedBy"],"mappings":";;;;;;;AAAA;;AACA;;;;AAGA,MAAMA,SAAS,GAAG,CAACC,YAAD,EAAyBC,YAAzB,KAAqD;AACrE,MAAIC,IAAJ;AACA,MAAIC,GAAG,GAAGF,YAAV;AACA,QAAMG,WAAW,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AI,EAAE;AADgB,SAzDd;AA4DV/C,QAAAA,eAAe,EAAE;AACf+C,UAAAA,IAAI,EAAE;AADS,SA5DP;AA+DV2D,QAAAA,UAAU,EAAE;AACVH,UAAAA,KAAK,EAAE;AACLxD,YAAAA,IAAI,EAAE;AADD,WADG;AAIVA,UAAAA,IAAI,EAAE;AAJI,SA/DF;AAqEV7C,QAAAA,eAAe,EAAE;AACfqG,UAAAA,KAAK,EAAE;AACLxD,YAAAA,IAAI,EAAE;AADD,WADQ;AAIfA,UAAAA,IAAI,EAAE;AAJS,SArEP;AA2EV5C,QAAAA,0BAA0B,EAAE;AAC1B4C,UAAAA,IAAI,EAAE;AADoB;AA3ElB,OAFd;AAiFEA,MAAAA,IAAI,EAAE;AAjFR,KADM,CANJ;AA2FJA,IAAAA,IAAI,EAAE;AA3FF;AAFL,CA7RY,C","sourcesContent":["import _ from 'lodash';\nimport iterateJsdoc from '../iterateJsdoc';\n\ntype T = [string, () => T];\nconst rootNamer = (desiredRoots: string[], currentIndex: number): T => {\n let name;\n let idx = currentIndex;\n const incremented = desiredRoots.length <= 1;\n if (incremented) {\n const base = desiredRoots[0];\n const suffix = idx++;\n name = `${base}${suffix}`;\n } else {\n name = desiredRoots.shift();\n }\n\n return [name, incremented, () => {\n return rootNamer(desiredRoots, idx);\n }];\n};\n\nexport default iterateJsdoc(({\n jsdoc,\n utils,\n context,\n}) => {\n const preferredTagName = utils.getPreferredTagName({tagName: 'param'});\n if (!preferredTagName) {\n return;\n }\n const jsdocParameterNames = utils.getJsdocTagsDeep(preferredTagName);\n\n const shallowJsdocParameterNames = jsdocParameterNames.filter((tag) => {\n return !tag.name.includes('.');\n }).map((tag, idx) => {\n return {...tag,\n idx};\n });\n\n if (utils.avoidDocs()) {\n return;\n }\n\n // Param type is specified by type in @type\n if (utils.hasTag('type')) {\n return;\n }\n\n const {\n autoIncrementBase = 0,\n checkRestProperty = false,\n checkDestructured = true,\n checkDestructuredRoots = true,\n checkTypesPattern = '/^(?:[oO]bject|[aA]rray|PlainObject|Generic(?:Object|Array))$/',\n enableFixer = true,\n enableRootFixer = true,\n enableRestElementFixer = true,\n unnamedRootBase = ['root'],\n useDefaultObjectProperties = false,\n } = context.options[0] || {};\n\n const checkTypesRegex = utils.getRegexFromString(checkTypesPattern);\n\n const missingTags = [];\n const functionParameterNames = utils.getFunctionParameterNames(useDefaultObjectProperties);\n const flattenedRoots = utils.flattenRoots(functionParameterNames).names;\n\n const paramIndex = {};\n const hasParamIndex = (cur) => {\n return _.has(paramIndex, utils.dropPathSegmentQuotes(String(cur)));\n };\n const getParamIndex = (cur) => {\n return paramIndex[utils.dropPathSegmentQuotes(String(cur))];\n };\n const setParamIndex = (cur, idx) => {\n paramIndex[utils.dropPathSegmentQuotes(String(cur))] = idx;\n };\n flattenedRoots.forEach((cur, idx) => {\n setParamIndex(cur, idx);\n });\n\n const findExpectedIndex = (jsdocTags, indexAtFunctionParams) => {\n const remainingRoots = functionParameterNames.slice(indexAtFunctionParams || 0);\n const foundIndex = jsdocTags.findIndex(({name, newAdd}) => {\n return !newAdd && remainingRoots.some((remainingRoot) => {\n if (Array.isArray(remainingRoot)) {\n return remainingRoot[1].names.includes(name);\n }\n if (typeof remainingRoot === 'object') {\n return name === remainingRoot.name;\n }\n\n return name === remainingRoot;\n });\n });\n\n const tags = foundIndex > -1 ?\n jsdocTags.slice(0, foundIndex) :\n jsdocTags.filter(({tag}) => {\n return tag === preferredTagName;\n });\n\n let tagLineCount = 0;\n tags.forEach(({source}) => {\n source.forEach(({tokens: {end}}) => {\n if (!end) {\n tagLineCount++;\n }\n });\n });\n\n return tagLineCount;\n };\n\n let [nextRootName, incremented, namer] = rootNamer([...unnamedRootBase], autoIncrementBase);\n\n functionParameterNames.forEach((functionParameterName, functionParameterIdx) => {\n let inc;\n if (Array.isArray(functionParameterName)) {\n const matchedJsdoc = shallowJsdocParameterNames[functionParameterIdx] ||\n jsdocParameterNames[functionParameterIdx];\n\n let rootName;\n if (functionParameterName[0]) {\n rootName = functionParameterName[0];\n } else if (matchedJsdoc && matchedJsdoc.name) {\n rootName = matchedJsdoc.name;\n if (matchedJsdoc.type && matchedJsdoc.type.search(checkTypesRegex) === -1) {\n return;\n }\n } else {\n rootName = nextRootName;\n inc = incremented;\n [nextRootName, incremented, namer] = namer();\n }\n\n const {hasRestElement, hasPropertyRest, rests, names} = functionParameterName[1];\n const notCheckingNames = [];\n if (!enableRestElementFixer && hasRestElement) {\n return;\n }\n\n if (!checkDestructuredRoots) {\n return;\n }\n\n names.forEach((paramName, idx) => {\n // Add root if the root name is not in the docs (and is not already\n // in the tags to be fixed)\n if (!jsdocParameterNames.find(({name}) => {\n return name === rootName;\n }) && !missingTags.find(({functionParameterName: fpn}) => {\n return fpn === rootName;\n })) {\n const emptyParamIdx = jsdocParameterNames.findIndex(({name}) => {\n return !name;\n });\n\n if (emptyParamIdx > -1) {\n missingTags.push({\n functionParameterIdx: emptyParamIdx,\n functionParameterName: rootName,\n inc,\n remove: true,\n });\n } else {\n missingTags.push({\n functionParameterIdx: hasParamIndex(rootName) ?\n getParamIndex(rootName) :\n getParamIndex(paramName),\n functionParameterName: rootName,\n inc,\n });\n }\n }\n\n if (!checkDestructured) {\n return;\n }\n\n if (!checkRestProperty && rests[idx]) {\n return;\n }\n\n const fullParamName = `${rootName}.${paramName}`;\n\n const notCheckingName = jsdocParameterNames.find(({name, type: paramType}) => {\n return utils.comparePaths(name)(fullParamName) && paramType.search(checkTypesRegex) === -1 && paramType !== '';\n });\n\n if (notCheckingName !== undefined) {\n notCheckingNames.push(notCheckingName.name);\n }\n\n if (notCheckingNames.find((name) => {\n return fullParamName.startsWith(name);\n })) {\n return;\n }\n\n if (jsdocParameterNames && !jsdocParameterNames.find(({name}) => {\n return utils.comparePaths(name)(fullParamName);\n })) {\n missingTags.push({\n functionParameterIdx: getParamIndex(\n functionParameterName[0] ? fullParamName : paramName,\n ),\n functionParameterName: fullParamName,\n inc,\n type: hasRestElement && !hasPropertyRest ? '{...any}' : undefined,\n });\n }\n });\n\n return;\n }\n let funcParamName;\n let type;\n if (typeof functionParameterName === 'object') {\n if (!enableRestElementFixer && functionParameterName.restElement) {\n return;\n }\n funcParamName = functionParameterName.name;\n type = '{...any}';\n } else {\n funcParamName = functionParameterName;\n }\n\n if (jsdocParameterNames && !jsdocParameterNames.find(({name}) => {\n return name === funcParamName;\n })) {\n missingTags.push({\n functionParameterIdx: getParamIndex(funcParamName),\n functionParameterName: funcParamName,\n inc,\n type,\n });\n }\n });\n\n const fix = ({\n functionParameterIdx, functionParameterName, remove, inc, type,\n }) => {\n if (inc && !enableRootFixer) {\n return;\n }\n const createTokens = (tagIndex, sourceIndex, spliceCount) => {\n // console.log(sourceIndex, tagIndex, jsdoc.tags, jsdoc.source);\n const tokens = {\n number: sourceIndex + 1,\n tokens: {\n delimiter: '*',\n description: '',\n end: '',\n lineEnd: '',\n name: functionParameterName,\n newAdd: true,\n postDelimiter: ' ',\n postName: '',\n postTag: ' ',\n postType: type ? ' ' : '',\n start: jsdoc.source[sourceIndex].tokens.start,\n tag: `@${preferredTagName}`,\n type: type ?? '',\n },\n };\n jsdoc.tags.splice(tagIndex, spliceCount, {\n name: functionParameterName,\n newAdd: true,\n source: [tokens],\n tag: preferredTagName,\n type: type ?? '',\n });\n const firstNumber = jsdoc.source[0].number;\n jsdoc.source.splice(sourceIndex, spliceCount, tokens);\n jsdoc.source.slice(sourceIndex).forEach((src, idx) => {\n src.number = firstNumber + sourceIndex + idx;\n });\n };\n const offset = jsdoc.source.findIndex(({tokens: {tag, end}}) => {\n return tag || end;\n });\n if (remove) {\n createTokens(functionParameterIdx, offset + functionParameterIdx, 1);\n } else {\n const expectedIdx = findExpectedIndex(jsdoc.tags, functionParameterIdx);\n createTokens(expectedIdx, offset + expectedIdx, 0);\n }\n };\n\n const fixer = () => {\n missingTags.forEach((missingTag) => {\n fix(missingTag);\n });\n };\n\n if (missingTags.length && jsdoc.source.length === 1) {\n utils.makeMultiline();\n }\n missingTags.forEach(({functionParameterName}) => {\n utils.reportJSDoc(\n `Missing JSDoc @${preferredTagName} \"${functionParameterName}\" declaration.`,\n null,\n enableFixer ? fixer : null,\n );\n });\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that all function parameters are documented.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param',\n },\n fixable: 'code',\n schema: [\n {\n additionalProperties: false,\n properties: {\n autoIncrementBase: {\n default: 0,\n type: 'integer',\n },\n checkConstructors: {\n default: true,\n type: 'boolean',\n },\n checkDestructured: {\n default: true,\n type: 'boolean',\n },\n checkDestructuredRoots: {\n default: true,\n type: 'boolean',\n },\n checkGetters: {\n default: false,\n type: 'boolean',\n },\n checkRestProperty: {\n default: false,\n type: 'boolean',\n },\n checkSetters: {\n default: false,\n type: 'boolean',\n },\n checkTypesPattern: {\n type: 'string',\n },\n contexts: {\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n comment: {\n type: 'string',\n },\n context: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n enableFixer: {\n type: 'boolean',\n },\n enableRestElementFixer: {\n type: 'boolean',\n },\n enableRootFixer: {\n type: 'boolean',\n },\n exemptedBy: {\n items: {\n type: 'string',\n },\n type: 'array',\n },\n unnamedRootBase: {\n items: {\n type: 'string',\n },\n type: 'array',\n },\n useDefaultObjectProperties: {\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"file":"requireParam.js"}