Skip to content

Commit 6d629ad

Browse files
prepare: lint jsdoc examples
1 parent c5f9c0e commit 6d629ad

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

eslint.config.mjs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,19 +163,19 @@ export default defineConfig([
163163
...jsdocRules
164164
}
165165
},
166-
// @todo no errors are reported in IDE/CLI
166+
// https://github.com/processing/p5.js/actions/runs/15584716142/job/43887979759#step:5:5160
167+
// @todo failed as **expected** due to `Parsing Error`s
168+
// * src/io/p5.Table.js - 256:6
169+
// * src/math/Matrices/Matrix.js - 532:12
170+
// @todo failed **unexpected** due to `Parsing Error`
171+
// * src/webgl/p5.Geometry.js - 49:42
167172
// {
168173
// name: 'jsdoc example processor',
169174
// files: ['src/**/*.js'],
170175
// plugins: {
171176
// examples: getJsdocProcessorPlugin({
172-
// // allowedLanguagesToProcess: ['js', 'javascript'],
173-
// // @todo
174-
// // https://github.com/gajus/eslint-plugin-jsdoc/blob/99cb131ee40fa10f943aadfd73a6d18da082882f/docs/rules/check-examples.md#examplecoderegex-and-rejectexamplecoderegex
175-
// // without the regex jsdoc fails to parse the examples
176-
// // the processor expects js but gets html
177-
// // "343:6 error @example error: Fatal: Parsing error: Unexpected token <"
178-
// exampleCodeRegex: '^<code>.*</code>$'
177+
// allowedLanguagesToProcess: ['js', 'javascript'],
178+
// exampleCodeRegex: /<code>\s([\s\S]*?)<\/code>/
179179
// })
180180
// },
181181
// processor: 'examples/examples'
@@ -187,7 +187,8 @@ export default defineConfig([
187187
// files: ['src/**/*.md/*.js'],
188188
// rules: {
189189
// ...commonRules,
190-
// 'no-undef': off
190+
// 'no-undef': off,
191+
// 'no-unused-vars': off
191192
// }
192193
// },
193194
{
@@ -263,6 +264,7 @@ export default defineConfig([
263264
'markdown/table-column-count': warn
264265
}
265266
}
267+
// https://github.com/eslint/markdown?tab=readme-ov-file#file-name-details
266268
// @todo
267269
// works out of the box but results in some `Parsing error`s
268270
// which will make github workflows & actions fail e.g.

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"concurrently": "^8.2.2",
5353
"documentation": "^14.0.3",
5454
"eslint": "^9.28.0",
55-
"eslint-plugin-jsdoc": "^50.7.1",
55+
"eslint-plugin-jsdoc": "^50.8.0",
5656
"glob": "^11.0.1",
5757
"globals": "^16.2.0",
5858
"husky": "^4.2.3",

0 commit comments

Comments
 (0)