checkSyntax.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js"));
  7. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  8. var _default = exports.default = (0, _iterateJsdoc.default)(({
  9. jsdoc,
  10. report,
  11. settings
  12. }) => {
  13. const {
  14. mode
  15. } = settings;
  16. // Don't check for "permissive" and "closure"
  17. if (mode === 'jsdoc' || mode === 'typescript') {
  18. for (const tag of jsdoc.tags) {
  19. if (tag.type.slice(-1) === '=') {
  20. report('Syntax should not be Google Closure Compiler style.', null, tag);
  21. break;
  22. }
  23. }
  24. }
  25. }, {
  26. iterateAllJsdocs: true,
  27. meta: {
  28. docs: {
  29. description: 'Reports against syntax not valid for the mode (e.g., Google Closure Compiler in non-Closure mode).',
  30. url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-syntax.md#repos-sticky-header'
  31. },
  32. type: 'suggestion'
  33. }
  34. });
  35. module.exports = exports.default;
  36. //# sourceMappingURL=checkSyntax.js.map