ESlint should check example from docs without errors.
Actual behavior
Name of my project directory contains a dot, let's say it has name eslint.with.dot.test
I get the following error :
error @example error: Parsing error: The keyword 'const' is reserved jsdoc/check-examples
/**
* Do something.
* @param {String} [name] Some name
* @example
* const res = myfunc('name');
* @returns {Object} Some result
*/
let myfunc = function (name) {};
// Format JS code here
Expected behavior
ESlint should check example from docs without errors.
Actual behavior
Name of my project directory contains a dot, let's say it has name eslint.with.dot.test I get the following error : error @example error: Parsing error: The keyword 'const' is reserved jsdoc/check-examples
I investigated this behavior and the reason is the following: ESlint config from my project was not found. It was not found because this regex cuts directory name https://github.com/gajus/eslint-plugin-jsdoc/blob/main/src/rules/checkExamples.js#L353 It looks like it should be changed to /.[^.]+$/u
ESLint Config
ESLint sample
Environment
eslint-plugin-jsdoc
version: 46.9.0