{"version":3,"sources":["../../src/rules/checkAccess.js"],"names":["accessLevels","report","utils","forEachPreferredTag","jsdocParameter","targetTagName","desc","name","description","includes","trim","accessLength","getTags","length","individualTagLength","getPresentTags","checkPrivate","iterateAllJsdocs","meta","docs","url","type"],"mappings":";;;;;;;AAAA;;;;AAEA,MAAMA,YAAY,GAAG,CAAC,SAAD,EAAY,SAAZ,EAAuB,WAAvB,EAAoC,QAApC,CAArB;;eAEe,2BAAa,CAAC;AAC3BC,EAAAA,MAD2B;AAE3BC,EAAAA;AAF2B,CAAD,KAGtB;AACJA,EAAAA,KAAK,CAACC,mBAAN,CAA0B,QAA1B,EAAoC,CAACC,cAAD,EAAiBC,aAAjB,KAAmC;AACrE,UAAMC,IAAI,GAAGF,cAAc,CAACG,IAAf,GAAsB,GAAtB,GAA4BH,cAAc,CAACI,WAAxD;;AAEA,QAAI,CAACR,YAAY,CAACS,QAAb,CAAsBH,IAAI,CAACI,IAAL,EAAtB,CAAL,EAAyC;AACvCT,MAAAA,MAAM,CACH,wBAAuBI,aAAc,SADlC,EAEJ,IAFI,EAGJD,cAHI,CAAN;AAKD;AACF,GAVD;AAWA,QAAMO,YAAY,GAAGT,KAAK,CAACU,OAAN,CAAc,QAAd,EAAwBC,MAA7C;AACA,QAAMC,mBAAmB,GAAGZ,KAAK,CAACa,cAAN,CAAqBf,YAArB,EAAmCa,MAA/D;;AACA,MAAIF,YAAY,IAAIG,mBAApB,EAAyC;AACvCb,IAAAA,MAAM,CACJ,iHADI,CAAN;AAGD;;AACD,MAAIU,YAAY,GAAG,CAAf,IAAoBG,mBAAmB,GAAG,CAA9C,EAAiD;AAC/Cb,IAAAA,MAAM,CACJ,iEADI,CAAN;AAGD;AACF,CA3Bc,EA2BZ;AACDe,EAAAA,YAAY,EAAE,IADb;AAEDC,EAAAA,gBAAgB,EAAE,IAFjB;AAGDC,EAAAA,IAAI,EAAE;AACJC,IAAAA,IAAI,EAAE;AACJX,MAAAA,WAAW,EAAE,gDADT;AAEJY,MAAAA,GAAG,EAAE;AAFD,KADF;AAKJC,IAAAA,IAAI,EAAE;AALF;AAHL,CA3BY,C","sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\nconst accessLevels = ['package', 'private', 'protected', 'public'];\n\nexport default iterateJsdoc(({\n report,\n utils,\n}) => {\n utils.forEachPreferredTag('access', (jsdocParameter, targetTagName) => {\n const desc = jsdocParameter.name + ' ' + jsdocParameter.description;\n\n if (!accessLevels.includes(desc.trim())) {\n report(\n `Missing valid JSDoc @${targetTagName} level.`,\n null,\n jsdocParameter,\n );\n }\n });\n const accessLength = utils.getTags('access').length;\n const individualTagLength = utils.getPresentTags(accessLevels).length;\n if (accessLength && individualTagLength) {\n report(\n 'The @access tag may not be used with specific access-control tags (@package, @private, @protected, or @public).',\n );\n }\n if (accessLength > 1 || individualTagLength > 1) {\n report(\n 'At most one access-control tag may be present on a jsdoc block.',\n );\n }\n}, {\n checkPrivate: true,\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Checks that `@access` tags have a valid value.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-access',\n },\n type: 'suggestion',\n },\n});\n"],"file":"checkAccess.js"}