github-pages-deploy-action/node_modules/eslint-plugin-jsdoc/dist/rules/requireProperty.js.map

1 line
2.5 KiB
Plaintext
Raw Normal View History

2020-03-31 20:40:00 +08:00
{"version":3,"sources":["../../src/rules/requireProperty.js"],"names":["jsdoc","utils","propertyAssociatedTags","filterTags","tag","includes","length","targetTagName","getPreferredTagName","tagName","hasATag","forEach","propertyAssociatedTag","type","reportJSDoc","line","tags","push","description","name","optional","iterateAllJsdocs","meta","fixable"],"mappings":";;;;;;;AAAA;;;;eAEe,2BAAa,CAAC;AAC3BA,EAAAA,KAD2B;AAE3BC,EAAAA;AAF2B,CAAD,KAGtB;AACJ,QAAMC,sBAAsB,GAAGD,KAAK,CAACE,UAAN,CAAiB,CAAC;AAACC,IAAAA;AAAD,GAAD,KAAW;AACzD,WAAO,CAAC,SAAD,EAAY,WAAZ,EAAyBC,QAAzB,CAAkCD,GAAlC,CAAP;AACD,GAF8B,CAA/B;;AAGA,MAAI,CAACF,sBAAsB,CAACI,MAA5B,EAAoC;AAClC;AACD;;AACD,QAAMC,aAAa,GAAGN,KAAK,CAACO,mBAAN,CAA0B;AAACC,IAAAA,OAAO,EAAE;AAAV,GAA1B,CAAtB;;AAEA,MAAIR,KAAK,CAACS,OAAN,CAAc,CAACH,aAAD,CAAd,CAAJ,EAAoC;AAClC;AACD;;AAEDL,EAAAA,sBAAsB,CAACS,OAAvB,CAAgCC,qBAAD,IAA2B;AACxD,QAAI,CAAC,CAAC,QAAD,EAAW,QAAX,EAAqB,aAArB,EAAoCP,QAApC,CAA6CO,qBAAqB,CAACC,IAAnE,CAAL,EAA+E;AAC7E;AACD;;AACDZ,IAAAA,KAAK,CAACa,WAAN,CAAmB,kBAAiBP,aAAc,GAAlD,EAAsD,IAAtD,EAA4D,MAAM;AAChE,YAAMQ,IAAI,GAAGf,KAAK,CAACgB,IAAN,CAAWhB,KAAK,CAACgB,IAAN,CAAWV,MAAX,GAAoB,CAA/B,EAAkCS,IAAlC,GAAyC,CAAtD;AACAf,MAAAA,KAAK,CAACgB,IAAN,CAAWC,IAAX,CAAgB;AACdC,QAAAA,WAAW,EAAE,EADC;AAEdH,QAAAA,IAFc;AAGdI,QAAAA,IAAI,EAAE,EAHQ;AAIdC,QAAAA,QAAQ,EAAE,KAJI;AAKdhB,QAAAA,GAAG,EAAEG,aALS;AAMdM,QAAAA,IAAI,EAAE;AANQ,OAAhB;AAQD,KAVD;AAWD,GAfD;AAgBD,CAhCc,EAgCZ;AACDQ,EAAAA,gBAAgB,EAAE,IADjB;AAEDC,EAAAA,IAAI,EAAE;AACJC,IAAAA,OAAO,EAAE,MADL;AAEJV,IAAAA,IAAI,EAAE;AAFF;AAFL,CAhCY,C","sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\nexport default iterateJsdoc(({\n jsdoc,\n utils,\n}) => {\n const propertyAssociatedTags = utils.filterTags(({tag}) => {\n return ['typedef', 'namespace'].includes(tag);\n });\n if (!propertyAssociatedTags.length) {\n return;\n }\n const targetTagName = utils.getPreferredTagName({tagName: 'property'});\n\n if (utils.hasATag([targetTagName])) {\n return;\n }\n\n propertyAssociatedTags.forEach((propertyAssociatedTag) => {\n if (!['object', 'Object', 'PlainObject'].includes(propertyAssociatedTag.type)) {\n return;\n }\n utils.reportJSDoc(`Missing JSDoc @${targetTagName}.`, null, () => {\n const line = jsdoc.tags[jsdoc.tags.length - 1].line + 1;\n jsdoc.tags.push({\n description: '',\n line,\n name: '',\n optional: false,\n tag: targetTagName,\n type: '',\n });\n });\n });\n}, {\n iterateAllJsdocs: true,\n meta: {\n fixable: 'code',\n type: 'suggestion',\n },\n});\n"],"file":"requireProperty.js"}