14 Commits

Author SHA1 Message Date
Matt Godbolt
f824efe73e Library updates and lint fixes (#8099)
* Minor updates only
* Added explicit radix parameter (10) to all Number.parseInt() calls throughout the codebase (new lint rule)
* Updated several @ts-ignore comments to @ts-expect-error for better TypeScript practices (new lint rule)
* Removed unnecessary @ts-ignore comments in some mode files (ditto)
* Used "none return" based arrow functions for some map stuff
* Replaced a `map()` call that didn't return anything to a for() loop
* Fixed up some cypress stuff, noting work for the future
2025-09-12 14:23:49 -05:00
Ofek
1aef3f3863 Fix default imports/exports to be ES6 conformant (#7383)
<!-- THIS COMMENT IS INVISIBLE IN THE FINAL PR, BUT FEEL FREE TO REMOVE
IT
Thanks for taking the time to improve CE. We really appreciate it.
Before opening the PR, please make sure that the tests & linter pass
their checks,
  by running `make check`.
In the best case scenario, you are also adding tests to back up your
changes,
  but don't sweat it if you don't. We can discuss them at a later date.
Feel free to append your name to the CONTRIBUTORS.md file
Thanks again, we really appreciate this!
-->
2025-02-09 22:33:36 +02:00
Mats Jun Larsen
5eea63328f Migrate to Biome for linting and formatting (#7033) 2025-02-02 17:54:31 +00:00
Johel Ernesto Guerrero Peña
0a2f5f2655 feat: update grammar of Cpp2 (#7217)
This is an update to #6950.
The test cases: <https://highlight-cpp2.godbolt.org/z/Wbve44Mjv>.

<details><summary>Preview</summary>


![1734028425](https://github.com/user-attachments/assets/88b975bb-fdbb-41f8-a9b5-8a5db8706dbb)

</details>

Resolves #7153.
2024-12-13 04:08:09 -06:00
Ofek
c1985d64a1 Tsification binge #7 (#6974) 2024-10-25 12:19:04 +03:00
Johel Ernesto Guerrero Peña
601c3ec3d7 feat: update grammar of Cpp2 (#6950) 2024-10-12 18:37:29 +02:00
Johel Ernesto Guerrero Peña
36520c83fd feat: update grammar of Cpp2 (#6913) 2024-09-28 18:08:27 +02:00
Johel Ernesto Guerrero Peña
3ed3b0eb06 feat: update grammar of Cpp2 (#5727) 2023-11-10 11:30:39 +01:00
Johel Ernesto Guerrero Peña
2de088e691 feat: update grammar of Cpp2 (#5605) 2023-10-22 12:19:52 +02:00
Johel Ernesto Guerrero Peña
c2c5ffd458 feat: parse Cpp2 to highlight it (#5061)
This is the follow-up to #5027.
The test cases: <https://highlight-cpp2.godbolt.org/z/qrqYPvaWE>.

<details><summary>Preview</summary>


![1684378584](https://github.com/compiler-explorer/compiler-explorer/assets/21071787/8fcac705-880c-4ad0-bce9-4c28fe9f0359)

</details>
2023-05-22 22:34:36 -05:00
Johel Ernesto Guerrero Peña
c76b16ef69 lang(cpp2): improve highlighting (#5027) 2023-05-09 19:18:57 +02:00
Mats Jun Larsen
633eb82d18 Transition to ECMAScript Modules (#4780)
Makes the Compiler Explorer app, and all the tooling ESM compatible.
Things that have been done:

1. The package.json has `type: module` now
2. All relative imports have a .js ending
3. All directory imports are now directory/index.js to comply with ESM
standards
4. Dependency node-graceful is now imported into tree, because the
package is broken under esm
5. Dependency p-queue has been bumped to 7.x with ESM support
6. Dependency profanities has been bumped to 3.x with ESM support
7. Webpack config is now both ESM and CommonJS compatible
8. Non-ESM compatible imports have been rewritten
9. ESLint configuration has been tweaked to not fail on .js imports
10. Mocha is now hacked together and ran with ts-node-esm
11. Webpack is now hacked together and ran with ts-node-esm
12. Webpack config is now ESM compatible, so that it can be used in the
dev server
13. Cypress code still runs commonjs, and has been excluded from the
tsconfig
14. All sinon mock tests have been commented out, because sinon module
mocks do not work with ESModules (because ESModules are immutable)

A lot of tests are now giving warnings/errors to stdout, yet still pass.
Docenizer codegenerator scripts have been updated, but I did not re-run
them, and instead just changed their code.

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-02-27 18:06:38 -06:00
Jeremy Rifkin
59f8c45246 Update static/modes typing (#4582) 2023-01-13 19:54:26 -05:00
Matt Godbolt
a8a666aeac Fixes for cppfront (#4076)
* Rename cppx_cppfront to cpp2_cppfront
* Add some blurb about the compiler
* Some syntax highlighting
* Better output highlighting
* Some form of line tracking and filtering
2022-09-20 07:42:41 -05:00