Add rslint-pragma
to specify the source type of a file
#39
Labels
C-enhancement
Category: enhancement
E-medium
Fixing/implementing this issue is moderately hard and you may need some prior experience
T-Runner
This issue primary relates to the lint runner, rslint_core
I noticed this being talked about in a deno_lint issue, and i think it would work well (but sadly deno_lint cannot implement it efficiently since they would need a lossless lexer to run on the code first or parse the code twice). To get this to work for us we would simply have to refactor a couple of things:
rslint_parser::tokenize
.js
, module for.mjs
)rslint_parser::TokenSource
There would be no need to run through a proper directive parser, just check for
rslint-pragma script
andrslint-pragma module
.The text was updated successfully, but these errors were encountered: