source-academy / modules

Modules that can be imported by programs in Source Academy, an online experiential environment for computational thinking
Apache License 2.0
8 stars 28 forks source link

Scripts Refactor #296

Closed leeyi45 closed 6 months ago

leeyi45 commented 7 months ago

The first rewriting of the module scripts left a lot to be desired. With the benefit of new packages and lots of hindsight, here is a streamlined set of scripts that should resolve the issues where linting errors were not being properly caught by the CI.

Currently there's a really weird bug that continues to escape me with the testing for the json command, so I have that disabled. It's not really too important this instant, but it would be nice to figure out why Jest isn't calling the mocked function.

This refactor also includes some changes to how modules are loaded and how the JSON documentation is stored. I'll have the corresponding PRs in js-slang up.

leeyi45 commented 7 months ago

With the new flat configurations that ESLint is moving towards, I basically redid the ESLint setup for the repository. It should be far less janky than the way it had been setup previously and should play nicely with the VSCode extension (if you use the defaults provided in the .vscode folder)

martin-henz commented 6 months ago

The current sourceacademy.org frontend needs this PR to run modules.