{
  "name": "@es-joy/jsdoccomment",
  "version": "0.20.1",
  "author": "Brett Zamir <brettz9@yahoo.com>",
  "contributors": [],
  "description": "Maintained replacement for ESLint's deprecated SourceCode#getJSDocComment along with other jsdoc utilities",
  "license": "MIT",
  "keywords": [
    "eslint",
    "sourcecode"
  ],
  "type": "module",
  "main": "./dist/index.cjs.cjs",
  "exports": {
    "import": "./src/index.js",
    "require": "./dist/index.cjs.cjs"
  },
  "c8": {
    "reporter": [
      "lcov",
      "text"
    ],
    "checkCoverage": true,
    "branches": 100,
    "statements": 100,
    "lines": 100,
    "functions": 100
  },
  "browserslist": [
    "cover 100%"
  ],
  "repository": {
    "type": "git",
    "url": "git+https://github.com/es-joy/jsdoccomment.git"
  },
  "bugs": {
    "url": "https://github.com/es-joy/jsdoccomment/issues"
  },
  "homepage": "https://github.com/es-joy/jsdoccomment",
  "engines": {
    "node": "^12 || ^14 || ^16 || ^17"
  },
  "dependencies": {
    "comment-parser": "1.3.0",
    "esquery": "^1.4.0",
    "jsdoc-type-pratt-parser": "~2.2.3"
  },
  "devDependencies": {
    "@babel/core": "^7.17.5",
    "@babel/plugin-syntax-class-properties": "^7.12.13",
    "@babel/preset-env": "^7.16.11",
    "@brettz9/eslint-plugin": "^1.0.4",
    "@rollup/plugin-babel": "^5.3.0",
    "c8": "^7.11.0",
    "chai": "^4.3.6",
    "eslint": "^8.9.0",
    "eslint-config-ash-nazg": "32.4.0",
    "eslint-config-standard": "^16.0.3",
    "eslint-plugin-array-func": "^3.1.7",
    "eslint-plugin-compat": "^4.0.2",
    "eslint-plugin-eslint-comments": "^3.2.0",
    "eslint-plugin-html": "^6.2.0",
    "eslint-plugin-import": "^2.25.4",
    "eslint-plugin-jsdoc": "^37.9.2",
    "eslint-plugin-markdown": "^2.2.1",
    "eslint-plugin-no-unsanitized": "^4.0.1",
    "eslint-plugin-no-use-extend-native": "^0.5.0",
    "eslint-plugin-node": "^11.1.0",
    "eslint-plugin-promise": "^6.0.0",
    "eslint-plugin-sonarjs": "^0.11.0",
    "eslint-plugin-unicorn": "^41.0.0",
    "espree": "^9.3.1",
    "estraverse": "^5.3.0",
    "mocha": "^9.2.0",
    "rollup": "^2.67.2"
  },
  "scripts": {
    "open": "open ./coverage/lcov-report/index.html",
    "rollup": "rollup -c",
    "eslint": "eslint --ext=js,cjs,md,html .",
    "lint": "npm run eslint --",
    "mocha": "mocha --require chai/register-expect.js",
    "c8": "c8 npm run mocha",
    "test": "npm run lint && npm run rollup && npm run c8"
  },
  "readme": "# @es-joy/jsdoccomment\n\n[![Node.js CI status](https://github.com/brettz9/getJSDocComment/workflows/Node.js%20CI/badge.svg)](https://github.com/brettz9/getJSDocComment/actions)\n\nThis project aims to preserve and expand upon the\n`SourceCode#getJSDocComment` functionality of the deprecated ESLint method.\n\nIt also exports a number of functions currently for working with JSDoc:\n\n## API\n\n### `parseComment`\n\nFor parsing `comment-parser` in a JSDoc-specific manner.\nMight wish to have tags with or without tags, etc. derived from a split off\nJSON file.\n\n### `commentParserToESTree`\n\nConverts [comment-parser](https://github.com/syavorsky/comment-parser)\nAST to ESTree/ESLint/Babel friendly AST. See the \"ESLint AST...\" section below.\n\n### `jsdocVisitorKeys`\n\nThe [VisitorKeys](https://github.com/eslint/eslint-visitor-keys)\nfor `JsdocBlock`, `JsdocDescriptionLine`, and `JsdocTag`. More likely to be\nsubject to change or dropped in favor of another type parser.\n\n### `jsdocTypeVisitorKeys`\n\nJust a re-export of [VisitorKeys](https://github.com/eslint/eslint-visitor-keys)\nfrom [`jsdoc-type-pratt-parser`](https://github.com/simonseyock/jsdoc-type-pratt-parser/).\n\n### `getDefaultTagStructureForMode`\n\nProvides info on JSDoc tags:\n\n- `nameContents` ('namepath-referencing'|'namepath-defining'|\n    'dual-namepath-referencing'|false) - Whether and how a name is allowed\n    following any type. Tags without a proper name (value `false`) may still\n    have a description (which can appear like a name); `descriptionAllowed`\n    in such cases would be `true`.\n    The presence of a truthy `nameContents` value is therefore only intended\n    to signify whether separate parsing should occur for a name vs. a\n    description, and what its nature should be.\n- `nameRequired` (boolean) - Whether a name must be present following any type.\n- `descriptionAllowed` (boolean) - Whether a description (following any name)\n    is allowed.\n- `typeAllowed` (boolean) - Whether the tag accepts a curly bracketed portion.\n    Even without a type, a tag may still have a name and/or description.\n- `typeRequired` (boolean) - Whether a curly bracketed type must be present.\n- `typeOrNameRequired` (boolean) - Whether either a curly bracketed type is\n    required or a name, but not necessarily both.\n\n### Miscellaneous\n\nAlso currently exports these utilities, though they might be removed in the\nfuture:\n\n- `getTokenizers` - Used with `parseComment` (its main core)\n- `toCamelCase` - Convert to CamelCase.\n- `hasSeeWithLink` - A utility to detect if a tag is `@see` and has a `@link`\n- `commentHandler` - Used by `eslint-plugin-jsdoc`. Might be removed in future.\n- `commentParserToESTree`- Converts [comment-parser](https://github.com/syavorsky/comment-parser)\n    AST to ESTree/ESLint/Babel friendly AST\n- `jsdocVisitorKeys` - The [VisitorKeys](https://github.com/eslint/eslint-visitor-keys)\n    for `JSDocBlock`, `JSDocDescriptionLine`, and `JSDocTag`. Might change.\n- `jsdocTypeVisitorKeys` - [VisitorKeys](https://github.com/eslint/eslint-visitor-keys)\n    for `jsdoc-type-pratt-parser`.\n- `getTokenizers` - A utility. Might be removed in future.\n- `toCamelCase` - A utility. Might be removed in future.\n- `hasSeeWithLink` - A utility to detect if a tag is `@see` and has a `@link`\n- `defaultNoTypes` = The tags which allow no types by default:\n    `default`, `defaultvalue`, `see`;\n- `defaultNoNames` - The tags which allow no names by default:\n    `access`, `author`, `default`, `defaultvalue`, `description`, `example`,\n    `exception`, `kind`, `license`, `return`, `returns`, `since`, `summary`,\n    `throws`, `version`, `variation`\n\n## ESLint AST produced for `comment-parser` nodes (`JsdocBlock`, `JsdocTag`, and `JsdocDescriptionLine`)\n\nNote: Although not added in this package, `@es-joy/jsdoc-eslint-parser` adds\na `jsdoc` property to other ES nodes (using this project's `getJSDocComment`\nto determine the specific comment-block that will be attached as AST).\n\n### `JsdocBlock`\n\nHas two visitable properties:\n\n1. `tags` (an array of `JsdocTag`; see below)\n2. `descriptionLines` (an array of `JsdocDescriptionLine` for multiline\n    descriptions).\n\nHas the following custom non-visitable property:\n\n1. `lastDescriptionLine` - A number\n2. `endLine` - A number representing the line number with `end`\n\nMay also have the following non-visitable properties from `comment-parser`:\n\n1. `description` - Same as `descriptionLines` but as a string with newlines.\n2. `delimiter`\n3. `postDelimiter`\n4. `lineEnd`\n5. `end`\n\n### `JsdocTag`\n\nHas three visitable properties:\n\n1. `parsedType` (the `jsdoc-type-pratt-parser` AST representation of the tag's\n    type (see the `jsdoc-type-pratt-parser` section below)).\n2. `descriptionLines` (an array of `JsdocDescriptionLine` for multiline\n    descriptions)\n3. `typeLines` (an array of `JsdocTypeLine` for multiline type strings)\n\nMay also have the following non-visitable properties from `comment-parser`\n(note that all are included from `comment-parser` except `end` as that is only\nfor JSDoc blocks and note that `type` is renamed to `rawType`):\n\n1. `description` - Same as `descriptionLines` but as a string with newlines.\n2. `rawType` - `comment-parser` has this named as `type`, but because of a\n    conflict with ESTree using `type` for Node type, we renamed it to\n    `rawType`. It is otherwise the same as in `comment-parser`, i.e., a string\n    with newlines, though with the initial `{` and final `}` stripped out.\n    See `typeLines` for the array version of this property.\n3. `start`\n4. `delimiter`\n5. `postDelimiter`\n6. `tag` (this does differ from `comment-parser` now in terms of our stripping\n    the initial `@`)\n7. `postTag`\n8. `name`\n9. `postName`\n10. `postType`\n\n### `JsdocDescriptionLine`\n\nNo visitable properties.\n\nMay also have the following non-visitable properties from `comment-parser`:\n\n1. `delimiter`\n2. `postDelimiter`\n3. `start`\n4. `description`\n\n### `JsdocTypeLine`\n\nNo visitable properties.\n\nMay also have the following non-visitable properties from `comment-parser`:\n\n1. `delimiter`\n2. `postDelimiter`\n3. `start`\n4. `rawType` - Renamed from `comment-parser` to avoid a conflict. See\n    explanation under `JsdocTag`\n\n## ESLint AST produced for `jsdoc-type-pratt-parser`\n\nThe AST, including `type`, remains as is from [jsdoc-type-pratt-parser](https://github.com/simonseyock/jsdoc-type-pratt-parser/).\n\nThe type will always begin with a `JsdocType` prefix added, along with a\ncamel-cased type name, e.g., `JsdocTypeUnion`.\n\nThe `jsdoc-type-pratt-parser` visitor keys are also preserved without change.\n\n## Installation\n\n```shell\nnpm i @es-joy/jsdoccomment\n```\n\n## Changelog\n\nThe changelog can be found on the [CHANGES.md](./CHANGES.md).\n<!--## Contributing\n\nEveryone is welcome to contribute. Please take a moment to review the [contributing guidelines](CONTRIBUTING.md).\n-->\n## Authors and license\n\n[Brett Zamir](http://brett-zamir.me/) and\n[contributors](https://github.com/es-joy/jsdoc-eslint-parser/graphs/contributors).\n\nMIT License, see the included [LICENSE-MIT.txt](LICENSE-MIT.txt) file.\n\n## To-dos\n\n1. Get complete code coverage\n"
}