Skip to content

Commit 74186a3

Browse files
authored
fix(getJsdocProcessPlugin): auto-escape *\/ and entities (#1537)
* fix(`getJsdocProcessPlugin`): auto-escape `*\/`; fixes #710 * fix(`getJsdocProcessorPlugin`): escape entities * docs: share links to AST demos * chore: update jsdoccomment and devDeps. * chore: change `run-if-changed` target * chore: linting * chore: avoid missing option
1 parent 001c4a9 commit 74186a3

File tree

9 files changed

+527
-635
lines changed

9 files changed

+527
-635
lines changed

.README/advanced.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ providing some of your JavaScript to the wonderful
6767
[AST Explorer](https://astexplorer.net/) tool and see what AST is built out
6868
of your code. You can set the tool to the specific parser which you are using.
6969

70+
For comment AST, see the [@es-joy/jsdoccomment demo](https://es-joy.github.io/jsdoccomment/demo/)
71+
or if you are only interested in type AST, see the
72+
[jsdoc-type-pratt-parser demo](https://jsdoc-type-pratt-parser.github.io/jsdoc-type-pratt-parser/).
73+
7074
#### Uses/Tips for AST
7175

7276
And if you wish to introspect on the AST of code within your projects, you can

docs/advanced.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ providing some of your JavaScript to the wonderful
8282
[AST Explorer](https://astexplorer.net/) tool and see what AST is built out
8383
of your code. You can set the tool to the specific parser which you are using.
8484

85+
For comment AST, see the [@es-joy/jsdoccomment demo](https://es-joy.github.io/jsdoccomment/demo/)
86+
or if you are only interested in type AST, see the
87+
[jsdoc-type-pratt-parser demo](https://jsdoc-type-pratt-parser.github.io/jsdoc-type-pratt-parser/).
88+
8589
<a name="user-content-advanced-ast-and-selectors-uses-tips-for-ast"></a>
8690
<a name="advanced-ast-and-selectors-uses-tips-for-ast"></a>
8791
#### Uses/Tips for AST

eslint.config.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import {
44
import {
55
recommended as canonical,
66
} from 'eslint-config-canonical/canonical';
7-
import {
8-
recommended as canonicalJsdoc,
9-
} from 'eslint-config-canonical/jsdoc';
7+
// import {
8+
// recommended as canonicalJsdoc,
9+
// } from 'eslint-config-canonical/jsdoc';
1010
import globals from 'globals';
1111

1212
const common = {
@@ -18,7 +18,10 @@ const common = {
1818

1919
export default [
2020
...canonical,
21-
...canonicalJsdoc,
21+
// ...canonicalJsdoc,
22+
jsdoc({
23+
config: 'flat/recommended',
24+
}),
2225
...jsdoc({
2326
config: 'examples-and-default-expressions',
2427
}),
@@ -43,6 +46,9 @@ export default [
4346
'filenames/match-regex': 0,
4447
'import/extensions': 0,
4548
'import/no-useless-path-segments': 0,
49+
'jsdoc/require-param-description': 0,
50+
'jsdoc/require-returns': 0,
51+
'jsdoc/require-returns-description': 0,
4652
'linebreak-style': 0,
4753
'no-inline-comments': 0,
4854
'prefer-named-capture-group': 0,

package.json

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
"url": "http://gajus.com"
66
},
77
"dependencies": {
8-
"@es-joy/jsdoccomment": "~0.58.0",
8+
"@es-joy/jsdoccomment": "~0.60.0",
99
"are-docs-informative": "^0.0.2",
1010
"comment-parser": "1.4.1",
1111
"debug": "^4.4.3",
1212
"escape-string-regexp": "^4.0.0",
1313
"espree": "^10.4.0",
1414
"esquery": "^1.6.0",
15+
"html-entities": "^2.6.0",
1516
"object-deep-merge": "^1.0.5",
1617
"parse-imports-exports": "^0.2.4",
1718
"semver": "^7.7.2",
@@ -28,7 +29,7 @@
2829
"@babel/preset-env": "^7.28.3",
2930
"@es-joy/escodegen": "^3.5.1",
3031
"@es-joy/jsdoc-eslint-parser": "^0.23.0",
31-
"@eslint/core": "^0.15.2",
32+
"@eslint/core": "^0.16.0",
3233
"@hkdobrev/run-if-changed": "^0.6.3",
3334
"@semantic-release/commit-analyzer": "^13.0.1",
3435
"@semantic-release/github": "^11.0.6",
@@ -40,34 +41,34 @@
4041
"@types/estree": "^1.0.8",
4142
"@types/json-schema": "^7.0.15",
4243
"@types/mocha": "^10.0.10",
43-
"@types/node": "^24.4.0",
44+
"@types/node": "^24.5.2",
4445
"@types/semver": "^7.7.1",
4546
"@types/spdx-expression-parse": "^3.0.5",
46-
"@typescript-eslint/types": "^8.43.0",
47+
"@typescript-eslint/types": "^8.44.1",
4748
"babel-plugin-add-module-exports": "^1.0.4",
4849
"babel-plugin-istanbul": "^7.0.1",
4950
"babel-plugin-transform-import-meta": "^2.3.3",
5051
"c8": "^10.1.3",
5152
"camelcase": "^8.0.0",
5253
"chai": "^6.0.1",
5354
"decamelize": "^6.0.1",
54-
"eslint": "9.35.0",
55-
"eslint-config-canonical": "~45.0.0",
55+
"eslint": "9.36.0",
56+
"eslint-config-canonical": "^45.0.0",
5657
"gitdown": "^4.1.1",
5758
"glob": "^11.0.3",
5859
"globals": "^16.4.0",
5960
"husky": "^9.1.7",
6061
"jsdoc-type-pratt-parser": "^5.4.0",
6162
"json-schema": "^0.4.0",
6263
"json-schema-to-typescript": "^15.0.4",
63-
"lint-staged": "^16.1.6",
64+
"lint-staged": "^16.2.0",
6465
"mocha": "^11.7.2",
6566
"open-editor": "^5.1.0",
6667
"replace": "^1.2.2",
6768
"rimraf": "^6.0.1",
68-
"semantic-release": "^24.2.8",
69+
"semantic-release": "^24.2.9",
6970
"typescript": "5.9.2",
70-
"typescript-eslint": "^8.43.0"
71+
"typescript-eslint": "^8.44.1"
7172
},
7273
"engines": {
7374
"node": ">=20.11.0"
@@ -150,7 +151,12 @@
150151
"url": "https://github.com/gajus/eslint-plugin-jsdoc/issues"
151152
},
152153
"run-if-changed": {
153-
"package-lock.json": "pnpm run install-offline"
154+
"pnpm-lock.yaml": "pnpm run install-offline"
155+
},
156+
"pnpm": {
157+
"overrides": {
158+
"@types/eslint": "0.0.0-interferes-with-eslint-now"
159+
}
154160
},
155161
"scripts": {
156162
"ruleTypes": "node ./src/bin/generateRuleTypes.js",
@@ -163,7 +169,7 @@
163169
"create-docs": "pnpm run create-options && node ./src/bin/generateDocs.js && pnpm ruleTypes",
164170
"create-rule": "node ./src/bin/generateRule.js",
165171
"create-options": "node ./src/bin/generateOptions.js",
166-
"install-offline": "pnpm install --prefer-offline --no-audit",
172+
"install-offline": "pnpm install --prefer-offline",
167173
"lint": "eslint",
168174
"lint-fix": "eslint --fix",
169175
"prepare": "husky",

0 commit comments

Comments
 (0)