Commit Graph

15 Commits

Author SHA1 Message Date
Matt Godbolt
53c7dd328b Configure Biome import organiser with grouped imports (#8431)
Enable Biome's `organizeImports` with groups matching the original
ESLint `import/order` configuration:

1. **Node builtins** (`node:fs`, `path`, etc.)
2. *(blank line)*
3. **Third-party packages** (`express`, `@sentry/node`, etc.)
4. *(blank line)*
5. **Local/relative imports** (`../foo.js`, `./bar.js`, aliases)

This resolves the inconsistency where Biome wasn't enforcing import
grouping, meaning new files would lose the blank-line separation that
the old ESLint config enforced.

### Impact
- **354 files** updated out of 738 checked (~48%)
- **+188 / -240 lines** (net -52) — almost entirely single blank line
additions/removals between import groups
- No import reordering; purely group separator consistency

Fixes #7373

🤖 Generated by LLM (Claude, via OpenClaw)
2026-02-01 20:50:46 -06:00
Jeremy Rifkin
edddddbc3f Pack trees in control flow graphs and add a setting for a wider or narrower layout (#7853)
Stacked on  #7850

This PR implements this aspect of the cutter layout algorithm, using
exact subtree shapes instead of the full bounding box


![image](https://github.com/user-attachments/assets/a2d90337-538d-466f-b42d-0c56f6d4e05f)

Example 1:


![image](https://github.com/user-attachments/assets/c3f321c9-58b6-4529-b35a-5f9f13e995c0)


![image](https://github.com/user-attachments/assets/e7918fe1-f145-4e39-a416-32c49a8c3100)

Example 2:


![image](https://github.com/user-attachments/assets/b8737738-8b35-40e1-ae82-cfa940827d39)



![image](https://github.com/user-attachments/assets/89a9634a-f10d-48e1-ae45-0c87c76c806c)
2025-08-16 09:51:18 -05:00
Matt Godbolt
8734c3e492 Update biome (#7956)
- latest biome, and fix its configuration
- fixes "static" content to be globally configured too (instead of
per-line)
- fixes issues:
  - imports fixed up
  - `Date.now()` vs `+new Date()`
  - some unused things `_` prefixed
 
After discussion with the team, turned off the unused parameter warning.
2025-07-28 10:34:46 -05:00
Mats Jun Larsen
03546bc4ef Conditionally render img tags for language logos (#7873) 2025-06-28 16:33:07 +02:00
Mats Jun Larsen
5eea63328f Migrate to Biome for linting and formatting (#7033) 2025-02-02 17:54:31 +00:00
Ofek
c1985d64a1 Tsification binge #7 (#6974) 2024-10-25 12:19:04 +03:00
Ofek
4cdef67bba fix Alert (#6771)
All `Alert` modal windows reuse the same yesButton/noButton.
The callback are setup in the Alert ctor -
```
        const yesNoModal = $('#yes-no');
        yesNoModal.find('button.yes').on('click', () => {
            this.yesHandler?.();
        });
        yesNoModal.find('button.no').on('click', () => {
            this.noHandler?.();
        });
    }
```
On every yes/no click, *All* callbacks of *All* alert instances are
called.
So each `Alert` instance needs to cleanup its callbacks after usage, and
it tries to - via the weirdly named `toggleEventListener`.
`toggleEventListener` only did

```
element.off(eventName);
```
Some of the renaming problems were caused by persistance of [this
callback](00648a7e1c/static/widgets/pane-renaming.ts (L68-L72)).
Extending the cleanup to -
```
        element.off(eventName);
        this.yesHandler = null;
        this.noHandler = null;
```
seems to solve it this particular problem - not even sure `element.off`
is even needed.
2024-08-17 22:50:46 +03:00
narpfel
077f9c99cf Decode UTF-8 encoded strings in numeric tooltip (#6234)
Compilers like to encode short-ish strings into immediate arguments to
various assembly instructions. This makes it hard to read the assembly.

To improve readability, show a string representation of a number’s bytes
when they’re valid UTF-8.

This now also shows a string representation for *unprintable* ASCII
characters, such as `10` being shown as `"\n"` or `1` as `"\u0001"`.

Resolves #6220.

## Examples

([link](https://godbolt.org/z/7hzn6b8YG))

* 8583909746840200552: `8'583'909'746'840'200'552 =
0x7720'2C6F'6C6C'6568 = 6.5188685003648344e+265 = "hello, w"`
* 1684828783: `1'684'828'783 = 0x646C'726F = 1.74467096e+22f = "orld"`
* -6934491452449512253: `-6'934'491'452'449'512'253 =
0x9FC3'BCC3'B6C3'A4C3 = -1.1500622354593239e-155 = "äöüß"`
* 1633837924: `1'633'837'924 = 0x6162'6364 = 2.61007876e+20f = "dcba"`
* 97: `97 = 0x61 = 1.35925951e-43f = "a"`
* 10: `10 = 0xA = 1.40129846e-44f = "\n"`
* 92: `92 = 0x5C = 1.28919459e-43f = "\\"`

## Open questions

* The code assumes little-endian encoding, so the string representation
is reversed compared to the numeric representation (see `integer`
example). Should this be configurable or should the bytes not be
reversed?
* Negative numbers are masked to 64-bit unsigned ints (same as in the
hex representation), so if the number is shorter than 8 bytes, it has
some leading `ff` bytes and is not valid UTF-8 (see
`small_negative_number` in the example link). Is this an acceptable
limitation?
* I'd like to add some tests for `getNumericToolTip`, but I’m not really
familiar with TypeScript. I tried to importing
`static/panes/compiler.ts` in a test file, but
([after](https://github.com/vitest-dev/vitest/discussions/1806#discussioncomment-3570047)
some [struggling](https://vitest.dev/config/#environment)) it seems that
that file needs a [specific DOM
element](3c26c64ca3/static/options.ts (L27))
that is not present during testing. The simplest solution I could come
up with is moving `getNumericToolTip` into another file (such as
`static/utils.ts`). Is that okay or is is it possible test
`static/panes/compiler.ts` some other way?

---------

Co-authored-by: Patrick Quist <partouf@gmail.com>
2024-03-17 12:43:43 +02:00
Cassio Neri
6a65100568 fix month (#5599) 2023-10-14 17:56:36 +02:00
Patrick Quist
9b983d6965 Load and show creation_date of shortlink (#5236) 2023-07-17 23:36:36 +02:00
Rubén Rincón Blanco
2dbca646f0 Address some low-hanging fruits from webstorm code inspection (#3582)
* Address some low-hanging fruits from webstorm code inspection
* Change editor code to silence eslint

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2022-04-29 14:24:29 -05:00
Rubén Rincón Blanco
db229b94bc Add strict tsc flag for the frontend ts code (#3356) 2022-02-12 02:41:01 +01:00
partouf
f778e769cb lintfixes 2022-02-11 15:38:06 +01:00
Luca Natilla
810cb5ad6f Ability to name panes (#3323) 2022-02-11 15:25:02 +01:00
Rubén Rincón Blanco
6a1dbe14f7 Some general UI touches (#2910)
* Touches and changes to the UI to make it more consistent

It fixes some problems, improves the UX of certain actions,
 and clears some code up

* More minor tweaks to the UI

* Fix class typo

* Add compiler picker opt group header background color in default theme

* Fix conformance view

* Removes some &nbsp; in favour of margins

Removes boostrap-slider, there's a built-in html solution
Fixes tab width setting having a wrong input type

* More UI tweaks

* Remove empty CSS rule
2021-09-03 05:51:05 +02:00