-
-
Notifications
You must be signed in to change notification settings - Fork 685
Description
Description
In order to run JavaScript plugins in Biome, we need to implement a runtime. This issue focuses on tasks needed to implement basic linter rules in JS plugins.
To see how this issue fits into our plugin efforts, please look at the overview here: #2463
How to Contribute
Everyone is welcome to contribute pieces here! If you'd like to tackle something, please leave a comment below this issue for which item(s) of the checklist below you'd like to pick up. We will create a separate issue and assign it to you to simplify tracking.
Note
In order to have the issue assigned to you, you must comment on this issue.
Please only pick a single piece or group to work on at a time, and try to have time available to work on the piece when you select it so that we can keep progressing quickly. If you need any help or have any questions about our plugin efforts in Biome, feel free to ask in the #plugins
channel in Discord.
Tasks
- Prerequisite: ☂️ Linter plugin configuration #2458
- Load script and evaluate inside JS engine
- Proof of concept can be as simple as displaying "Hello, World" in the terminal
- Please look at the following discussion for a suitable choice of engine: Biome JS runtime: What engine to use? #2467
- Use transpilation to support TypeScript scripts
- We already have biome_js_transform crate you can use
- Create an API to emit diagnostics from JS
- Create an API to register callbacks for node traversal in JS
- Create an API for transformations, so we can implement fixers in JS
Notes
- The plugin RFC has some suggestions for APIs, though it's no more than a "mockup". We will need more concrete API designs when we get to the latter tasks. Feel free to more proposals!