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
RDambrosio016 opened this issue
Oct 14, 2020
· 0 comments
Labels
E-mediumFixing/implementing this issue is moderately hard and you may need some prior experienceE-mentorT-CLIThis issue primarily relates to the CLI (rslint_cli)T-RunnerThis issue primary relates to the lint runner, rslint_core
This is a pretty easy but useful feature, being able to lint markdown files. Implementing this should be quite easy, simply use a regex like
\`\`\`(?:js|javascript)\n([\s\S]*?)\n\`\`\`
Then add a variant to JsFileKind for markdown. Then you can extract each code block using the regex and the first capture group. Then run rules as you would using the src of each group and the same file id. And finally merge the results from each code block run by offsetting the range of each label by the offset of the block. There might be some wonky handling for non-Ok lint runs but overall it should be pretty easy.
The text was updated successfully, but these errors were encountered:
RDambrosio016
added
T-Runner
This issue primary relates to the lint runner, rslint_core
T-CLI
This issue primarily relates to the CLI (rslint_cli)
E-mentor
E-medium
Fixing/implementing this issue is moderately hard and you may need some prior experience
labels
Oct 14, 2020
E-mediumFixing/implementing this issue is moderately hard and you may need some prior experienceE-mentorT-CLIThis issue primarily relates to the CLI (rslint_cli)T-RunnerThis issue primary relates to the lint runner, rslint_core
This is a pretty easy but useful feature, being able to lint markdown files. Implementing this should be quite easy, simply use a regex like
Then add a variant to JsFileKind for markdown. Then you can extract each code block using the regex and the first capture group. Then run rules as you would using the src of each group and the same file id. And finally merge the results from each code block run by offsetting the range of each label by the offset of the block. There might be some wonky handling for non-Ok lint runs but overall it should be pretty easy.
The text was updated successfully, but these errors were encountered: