mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
1 line
3.2 KiB
Plaintext
1 line
3.2 KiB
Plaintext
{"version":3,"sources":["../../src/rules/noDefaults.js"],"names":["context","utils","options","noOptionalParamNames","paramTags","getPresentTags","forEach","tag","optional","reportJSDoc","default","defaultTags","description","contextDefaults","meta","fixable","schema","additionalProperties","properties","contexts","items","type"],"mappings":";;;;;;;AAAA;;;;eAEe,2BAAa,CAAC;AAC3BA,EAAAA,OAD2B;AAE3BC,EAAAA;AAF2B,CAAD,KAGtB;AAAA,eAC2BD,OAAO,CAACE,OAAR,CAAgB,CAAhB,KAAsB,EADjD;AAAA,QACGC,oBADH,QACGA,oBADH;;AAEJ,QAAMC,SAAS,GAAGH,KAAK,CAACI,cAAN,CAAqB,CAAC,OAAD,EAAU,KAAV,EAAiB,UAAjB,CAArB,CAAlB;AACAD,EAAAA,SAAS,CAACE,OAAV,CAAmBC,GAAD,IAAS;AACzB,QAAIJ,oBAAoB,IAAII,GAAG,CAACC,QAAhC,EAA0C;AACxCP,MAAAA,KAAK,CAACQ,WAAN,CAAmB,8CAA6CF,GAAG,CAACA,GAAI,GAAxE,EAA4EA,GAA5E,EAAiF,MAAM;AACrFA,QAAAA,GAAG,CAACG,OAAJ,GAAc,EAAd;AACAH,QAAAA,GAAG,CAACC,QAAJ,GAAe,KAAf;AACD,OAHD;AAID,KALD,MAKO,IAAID,GAAG,CAACG,OAAR,EAAiB;AACtBT,MAAAA,KAAK,CAACQ,WAAN,CAAmB,kCAAiCF,GAAG,CAACA,GAAI,GAA5D,EAAgEA,GAAhE,EAAqE,MAAM;AACzEA,QAAAA,GAAG,CAACG,OAAJ,GAAc,EAAd;AACD,OAFD;AAGD;AACF,GAXD;AAYA,QAAMC,WAAW,GAAGV,KAAK,CAACI,cAAN,CAAqB,CAAC,SAAD,EAAY,cAAZ,CAArB,CAApB;AACAM,EAAAA,WAAW,CAACL,OAAZ,CAAqBC,GAAD,IAAS;AAC3B,QAAIA,GAAG,CAACK,WAAR,EAAqB;AACnBX,MAAAA,KAAK,CAACQ,WAAN,CAAmB,wCAAuCF,GAAG,CAACA,GAAI,GAAlE,EAAsEA,GAAtE,EAA2E,MAAM;AAC/EA,QAAAA,GAAG,CAACK,WAAJ,GAAkB,EAAlB;AACD,OAFD;AAGD;AACF,GAND;AAOD,CA1Bc,EA0BZ;AACDC,EAAAA,eAAe,EAAE,IADhB;AAEDC,EAAAA,IAAI,EAAE;AACJC,IAAAA,OAAO,EAAE,MADL;AAEJC,IAAAA,MAAM,EAAE,CACN;AACEC,MAAAA,oBAAoB,EAAE,KADxB;AAEEC,MAAAA,UAAU,EAAE;AACVC,QAAAA,QAAQ,EAAE;AACRC,UAAAA,KAAK,EAAE;AACLC,YAAAA,IAAI,EAAE;AADD,WADC;AAIRA,UAAAA,IAAI,EAAE;AAJE,SADA;AAOVlB,QAAAA,oBAAoB,EAAE;AACpBkB,UAAAA,IAAI,EAAE;AADc;AAPZ,OAFd;AAaEA,MAAAA,IAAI,EAAE;AAbR,KADM,CAFJ;AAmBJA,IAAAA,IAAI,EAAE;AAnBF;AAFL,CA1BY,C","sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\nexport default iterateJsdoc(({\n context,\n utils,\n}) => {\n const {noOptionalParamNames} = context.options[0] || {};\n const paramTags = utils.getPresentTags(['param', 'arg', 'argument']);\n paramTags.forEach((tag) => {\n if (noOptionalParamNames && tag.optional) {\n utils.reportJSDoc(`Optional param names are not permitted on @${tag.tag}.`, tag, () => {\n tag.default = '';\n tag.optional = false;\n });\n } else if (tag.default) {\n utils.reportJSDoc(`Defaults are not permitted on @${tag.tag}.`, tag, () => {\n tag.default = '';\n });\n }\n });\n const defaultTags = utils.getPresentTags(['default', 'defaultvalue']);\n defaultTags.forEach((tag) => {\n if (tag.description) {\n utils.reportJSDoc(`Default values are not permitted on @${tag.tag}.`, tag, () => {\n tag.description = '';\n });\n }\n });\n}, {\n contextDefaults: true,\n meta: {\n fixable: 'code',\n schema: [\n {\n additionalProperties: false,\n properties: {\n contexts: {\n items: {\n type: 'string',\n },\n type: 'array',\n },\n noOptionalParamNames: {\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"file":"noDefaults.js"} |