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.

checkAccess.js 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc"));
  7. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  8. const accessLevels = ['package', 'private', 'protected', 'public'];
  9. var _default = (0, _iterateJsdoc.default)(({
  10. report,
  11. utils
  12. }) => {
  13. utils.forEachPreferredTag('access', (jsdocParameter, targetTagName) => {
  14. const desc = jsdocParameter.name + ' ' + jsdocParameter.description;
  15. if (!accessLevels.includes(desc.trim())) {
  16. report(`Missing valid JSDoc @${targetTagName} level.`, null, jsdocParameter);
  17. }
  18. });
  19. const accessLength = utils.getTags('access').length;
  20. const individualTagLength = utils.getPresentTags(accessLevels).length;
  21. if (accessLength && individualTagLength) {
  22. report('The @access tag may not be used with specific access-control tags (@package, @private, @protected, or @public).');
  23. }
  24. if (accessLength > 1 || individualTagLength > 1) {
  25. report('At most one access-control tag may be present on a jsdoc block.');
  26. }
  27. }, {
  28. checkPrivate: true,
  29. iterateAllJsdocs: true,
  30. meta: {
  31. docs: {
  32. description: 'Checks that `@access` tags have a valid value.',
  33. url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-access'
  34. },
  35. type: 'suggestion'
  36. }
  37. });
  38. exports.default = _default;
  39. module.exports = exports.default;
  40. //# sourceMappingURL=checkAccess.js.map