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
I have an error when trying to parse a markdown file wiht code snippets and when the code is fenced. I'm getting this error:
Cannot read property 'tokens' of undefined
TypeError: Cannot read property 'tokens' of undefined
at validate (/home/[...]/node_modules/eslint/lib/util/source-code.js:28:14)
at ...
Example of files and configuration causing the error:
I've seen that in the mdProcessor.js of this plugin, line 34, inside preprocess function, it is storing some sort of filename with the extension of the code snippet appended to it and perhaps it could be giving problems:
const jsBlocksResult = nonMdBlocksInner.map(({ text, lang }, i) => ({
text,
// eslint internal code appends this filename to real filename
filename: `/../../${partName}.${lang}`,
}))
As you can see in the example, I disabled the lint-fenced-code-flag in order to be able to pass the validation by removing the language from the code snippets, but this is not an option since I have many md files plenty of this feature.
The text was updated successfully, but these errors were encountered:
Version of the
eslint-plugin-md
: 1.0.19I have an error when trying to parse a markdown file wiht code snippets and when the code is fenced. I'm getting this error:
Example of files and configuration causing the error:
README.md
.eslintrc (
yaml
syntax):I've seen that in the
mdProcessor.js
of this plugin, line 34, insidepreprocess
function, it is storing some sort of filename with the extension of the code snippet appended to it and perhaps it could be giving problems:As you can see in the example, I disabled the
lint-fenced-code-flag
in order to be able to pass the validation by removing the language from the code snippets, but this is not an option since I have manymd
files plenty of this feature.The text was updated successfully, but these errors were encountered: