mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
1 line
5.5 KiB
Plaintext
1 line
5.5 KiB
Plaintext
|
{"version":3,"sources":["../../src/rules/requireParam.js"],"names":["jsdoc","utils","functionParameterNames","getFunctionParameterNames","jsdocParameterNames","getJsdocTags","avoidDocs","hasTag","preferredTagName","getPreferredTagName","tagName","findExpectedIndex","jsdocTags","indexAtFunctionParams","functionTags","filter","tag","expectedIndex","length","forEach","index","indexOf","missingTags","functionParameterName","functionParameterIdx","includes","find","name","push","fixAll","missings","tags","expectedIdx","splice","fixer","reportJSDoc","meta","fixable","schema","additionalProperties","properties","exemptedBy","items","type"],"mappings":";;;;;;;AAAA;;;;eAEe,2BAAa,CAAC;AAC3BA,EAAAA,KAD2B;AAE3BC,EAAAA;AAF2B,CAAD,KAGtB;AACJ,QAAMC,sBAAsB,GAAGD,KAAK,CAACE,yBAAN,EAA/B;AACA,QAAMC,mBAAmB,GAAGH,KAAK,CAACI,YAAN,CAAmB,OAAnB,CAA5B;;AACA,MAAI,CAACD,mBAAL,EAA0B;AACxB;AACD;;AAED,MAAIH,KAAK,CAACK,SAAN,EAAJ,EAAuB;AACrB;AACD,GATG,CAWJ;;;AACA,MAAIL,KAAK,CAACM,MAAN,CAAa,MAAb,CAAJ,EAA0B;AACxB;AACD;;AAED,QAAMC,gBAAgB,GAAGP,KAAK,CAACQ,mBAAN,CAA0B;AAACC,IAAAA,OAAO,EAAE;AAAV,GAA1B,CAAzB;;AAEA,QAAMC,iBAAiB,GAAG,CAACC,SAAD,EAAYC,qBAAZ,KAAsC;AAC9D,UAAMC,YAAY,GAAGF,SAAS,CAACG,MAAV,CAAiB,CAAC;AAACC,MAAAA;AAAD,KAAD,KAAW;AAC/C,aAAOA,GAAG,KAAKR,gBAAf;AACD,KAFoB,CAArB;AAGA,QAAIS,aAAa,GAAGL,SAAS,CAACM,MAA9B;AACAN,IAAAA,SAAS,CAACO,OAAV,CAAkB,CAACH,GAAD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B,KAAoC;AACtD;AACA,UAAMc,KAAK,GAAGd,KAAK,GAAG,CAAR,GAAY,IAAZ,GAAmB,MAAM;AACrC,UAAI,CAACpB,KAAK,CAAC+B,IAAX,EAAiB;AACf/B,QAAAA,KAAK,CAAC+B,IAAN,GAAa,EAAb;AACD;;AAEDF,MAAAA,MAAM,CAACP,WAAD,EAActB,KAAK,CAAC+B,IAApB,CAAN;AACD,KAND;AAOA9B,IAAAA,KAAK,CAACkC,WAAN,CAAmB,kBAAiB3B,gBAAiB,KAAIe,qBAAsB,gBAA/E,EAAgG,IAAhG,EAAsGW,KAAtG;AACD,GAVD;AAWD,CA5Ec,EA4EZ;AACDE,EAAAA,IAAI,EAAE;AACJC,IAAAA,OAAO,EAAE,MADL;AAEJC,IAAAA,MAAM,EAAE,CACN;AACEC,MAAAA,oBAAoB,EAAE,KADxB;AAEEC,MAAAA,UAAU,EAAE;AACVC,QAAAA,UAAU,EAAE;AACVC,UAAAA,KAAK,EAAE;AACLC,YAAAA,IAAI,EAAE;AADD,WADG;AAIVA,UAAAA,IAAI,EAAE;AAJI;AADF,OAFd;AAUEA,MAAAA,IAAI,EAAE;AAVR,KADM,CAFJ;AAgBJA,IAAAA,IAAI,EAAE;AAhBF;AADL,CA5EY,C","sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\nexport default iterateJsdoc(({\n jsdoc,\n utils,\n}) => {\n const functionParameterNames = utils.getFunctionParameterNames();\n const jsdocParameterNames = utils.getJsdocTags('param');\n if (!jsdocParameterNames) {\n return;\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 preferredTagName = utils.getPreferredTagName({tagName: 'param'});\n\n const findExpectedIndex = (jsdocTags, indexAtFunctionParams) => {\n const functionTags = jsdocTags.filter(({tag}) => {\n return tag === preferredTagName;\n });\n let expectedIndex = jsdocTags.length;\n jsdocTags.forEach((tag, index) => {\n if (tag.tag === preferredTagName) {\n expectedIndex = index;\n if (functionTags.indexOf(tag) < indexAtFunctionParams) {\n expectedIndex += 1;\n }\n }\n });\n\n return expectedIndex;
|