p2r3 / epochtal

Portal 2 tournament framework
https://epochtal.p2r3.com/
GNU General Public License v3.0
8 stars 4 forks source link

ESLint & Bun extension support #69

Closed PancakeTAS closed 4 months ago

PancakeTAS commented 4 months ago

This PR adds an epochtal-tailored ESLint configuration and fixes issues addressed by it. This PR also adds Bun files for quick launching of epochtal.

I will make a very short video outlining how to set stuff up (once the PR is ready), because VSCode makes this incredibly confusing.

Closes #67 Closes #30 Let's see if this works: Closes #55

PancakeTAS commented 4 months ago

Okay I think it's ready. I added basic syntax checking for the frontend, because adding actual error highlighting and stuff just straight up does not work with the frontend because of it's incredibly weird global scope. The spplice file has proper error checking again though, lol.

Also screw making a video, it'll go 10x quick if I just write it in text.

  1. Install eslint and eslint-language-server (these are Arch packages, not necessary but they help get a summary of the whole codebase in one console command)
  2. Install extensions "ESLint" by Microsoft and "Bun" by Oven (not by Pandy!).
  3. Switch to this branch.. or main, if it's merged
  4. Run bun i to install the deps
  5. Open commands window (ctrl shift p) and run "ESLint: Restart ESLint Server"
  6. Mess up the code and check highlighted code or the "Problems" panel

If you wanna run Epochtal:

  1. Head to the "Run and Debug" sidebar
  2. Select "Run Epochtal" in the dropdown at the top
  3. Click the run icon right next to it

Once Epochtal is running, you can do these things:

If you wanna bind starting and restarting Epochtal to a key, you have to bind Debug: Restart aka workbench.action.debug.restart in the settings and not any of the other ones.