kitajs / ts-html-plugin

🏛️ The Typescript LSP plugin to catch XSS vulnerabilities.
https://github.com/kitajs/html
MIT License
10 stars 2 forks source link

feat: support for the new escaping tag function "e" and "escape" #50

Closed JacopoPatroclo closed 9 months ago

JacopoPatroclo commented 9 months ago

This PR is related to this PR

I've encountered an issue running the tests locally because you had to build the lib and then run the pnpm install command again to make it so that there is the self package. I've added a script in the package.json that streamlines this process.

I've added a couple of tests but now they are all failing because the main package (kitajs/html) does not have a function called e. Locally I've linked the new version and the tests passed but that could be an issue for someone who wants to contribute. @arthurfiorette did you ever consider moving all these projects into a single mono-repo? That would solve those kinds of problems.

Anyway, this is the adaptation to make the plugin work with the new escaping tag function API. Hope I've helped.

arthurfiorette commented 9 months ago

@arthurfiorette did you ever consider moving all these projects into a single mono-repo? That would solve those kinds of problems.

In the beginning I wasn't planning to group it all, but the html "branch" of kitajs grew up fast, and will have even more packages. I'll have to do it sometime, but not for now as I have more important improvements to do.

I've added a couple of tests but now they are all failing because the main package (kitajs/html) does not have a function called e.

I'll release @kitajs/html with these features and then test your changes.

Thanks for the PR :)