@@ -2,7 +2,7 @@ import { fileURLToPath } from 'node:url';
2
2
3
3
import { defineConfig , globalIgnores } from 'eslint/config' ;
4
4
import { includeIgnoreFile } from '@eslint/compat' ;
5
- // import { getJsdocProcessorPlugin } from 'eslint-plugin-jsdoc/getJsdocProcessorPlugin.js';
5
+ import { getJsdocProcessorPlugin } from 'eslint-plugin-jsdoc/getJsdocProcessorPlugin.js' ;
6
6
7
7
import globals from 'globals' ;
8
8
import js from '@eslint/js' ;
@@ -206,33 +206,27 @@ export default defineConfig([
206
206
...jsdocRules
207
207
}
208
208
} ,
209
- // @todo no errors are reported in IDE/CLI
210
- // {
211
- // name: 'jsdoc example processor',
212
- // files: ['src/**/*.js'],
213
- // plugins: {
214
- // examples: getJsdocProcessorPlugin({
215
- // // allowedLanguagesToProcess: ['js', 'javascript'],
216
- // // @todo
217
- // // https://github.com/gajus/eslint-plugin-jsdoc/blob/99cb131ee40fa10f943aadfd73a6d18da082882f/docs/rules/check-examples.md#examplecoderegex-and-rejectexamplecoderegex
218
- // // without the regex jsdoc fails to parse the examples
219
- // // the processor expects js but gets html
220
- // // "343:6 error @example error: Fatal: Parsing error: Unexpected token <"
221
- // exampleCodeRegex: '^<code>.*</code>$'
222
- // })
223
- // },
224
- // processor: 'examples/examples'
225
- // },
226
- // {
227
- // // https://github.com/gajus/eslint-plugin-jsdoc/blob/99cb131ee40fa10f943aadfd73a6d18da082882f/docs/processors.md#processors
228
- // // https://github.com/gajus/eslint-plugin-jsdoc/blob/99cb131ee40fa10f943aadfd73a6d18da082882f/src/index.js#L414
229
- // name: 'jsdoc example rules',
230
- // files: ['src/**/*.md/*.js'],
231
- // rules: {
232
- // ...commonRules,
233
- // 'no-undef': off
234
- // }
235
- // },
209
+ {
210
+ name : 'jsdoc example processor' ,
211
+ files : [ 'src/**/*.js' ] ,
212
+ plugins : {
213
+ examples : getJsdocProcessorPlugin ( {
214
+ allowedLanguagesToProcess : [ 'js' , 'javascript' ] ,
215
+ exampleCodeRegex : / < c o d e > \s ( [ \s \S ] * ?) < \/ c o d e > /
216
+ } )
217
+ } ,
218
+ processor : 'examples/examples'
219
+ } ,
220
+ {
221
+ // https://github.com/gajus/eslint-plugin-jsdoc/blob/99cb131ee40fa10f943aadfd73a6d18da082882f/docs/processors.md#processors
222
+ // https://github.com/gajus/eslint-plugin-jsdoc/blob/99cb131ee40fa10f943aadfd73a6d18da082882f/src/index.js#L414
223
+ name : 'jsdoc example rules' ,
224
+ files : [ 'src/**/*.md/*.js' ] ,
225
+ rules : {
226
+ 'no-undef' : off ,
227
+ 'no-unused-vars' : off
228
+ }
229
+ } ,
236
230
{
237
231
name : 'p5 node env' ,
238
232
files : [
0 commit comments