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.

requireProperty.js 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. var _default = (0, _iterateJsdoc.default)(({
  9. utils
  10. }) => {
  11. const propertyAssociatedTags = utils.filterTags(({
  12. tag
  13. }) => {
  14. return ['typedef', 'namespace'].includes(tag);
  15. });
  16. if (!propertyAssociatedTags.length) {
  17. return;
  18. }
  19. const targetTagName = utils.getPreferredTagName({
  20. tagName: 'property'
  21. });
  22. if (utils.hasATag([targetTagName])) {
  23. return;
  24. }
  25. propertyAssociatedTags.forEach(propertyAssociatedTag => {
  26. if (!['object', 'Object', 'PlainObject'].includes(propertyAssociatedTag.type)) {
  27. return;
  28. }
  29. utils.reportJSDoc(`Missing JSDoc @${targetTagName}.`, null, () => {
  30. utils.addTag(targetTagName);
  31. });
  32. });
  33. }, {
  34. iterateAllJsdocs: true,
  35. meta: {
  36. docs: {
  37. description: 'Requires that all `@typedef` and `@namespace` tags have `@property` when their type is a plain `object`, `Object`, or `PlainObject`.',
  38. url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-property'
  39. },
  40. fixable: 'code',
  41. type: 'suggestion'
  42. }
  43. });
  44. exports.default = _default;
  45. module.exports = exports.default;
  46. //# sourceMappingURL=requireProperty.js.map