You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 */letmyfunc=function(name){};// Format JS code here
Environment
Node version: 16.14.2
ESLint version 7.32.0
eslint-plugin-jsdoc version: 46.9.0
The text was updated successfully, but these errors were encountered:
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.0The text was updated successfully, but these errors were encountered: