Commit Graph
12 Commits
Author SHA1 Message Date
Brian Donovan 0e841f8411 fix(check): allow hook calls inside closure hooks 2023-07-24 18:58:19 -07:00
Brian Donovan b51ffa0590 fix(playwright): remove unnecessary awaits (#1239)
`page.locator` is a synchronous method.
2023-07-24 11:36:16 -05:00
Brian Donovan dc7e1a5f13 docs(clean): fix copy-paste docs from build (#1240) 2023-07-24 11:32:13 -05:00
Brian Donovan 420bc39ecc docs(cli): re-sync dx --help output 2023-07-23 18:57:23 -07:00
Brian Donovan 8f8627af18 attempt to hoist prettier-please dependencies 2023-07-23 16:06:55 -07:00
Brian Donovan 1531893a45 improve test coverage and display output 2023-07-23 16:06:55 -07:00
Brian Donovan 899d9562b3 fix(check): colorize line numbers a la rustc 2023-07-23 16:06:55 -07:00
Brian Donovan eb4438ef74 docs(check): update README
It was just copy-pasted from `dioxus-autofmt`.
2023-07-23 16:06:55 -07:00
Brian Donovan 2c2534d1cc feat(check): adds dx check
At the moment this only checks the Rules of Hooks, ensuring that hook functions (i.e. `use_*`) are being called as expected.

https://dioxuslabs.com/docs/0.3/guide/en/interactivity/hooks.html

Closes #1202
2023-07-23 16:06:55 -07:00
Brian Donovan 947b7b650e chore: rename playwrite to playwright (#1203)
I assume this was a mistake and not intentional.
2023-07-17 11:00:59 -05:00
Brian Donovan 9cef71b6b9 fix(cli): improve error message for invalid config (#1200)
Previously an invalid `Dioxus.toml` file would yield this error when running e.g. `dx serve`:

```
Error: Failed to load `Dioxus.toml` because: Dioxus.toml parse failed
```

This doesn't give any indication why it failed to parse. This commit updates it to include why the parsing failed, e.g.:

```
Error: Failed to load Dioxus config because: Dioxus.toml missing field `name` for key `application` at line 38 column 1
```

I initially had it format the message to include `Dioxus.toml:38:1` to be clickable in some terminals, but the location specified didn't always seem particularly relevant to the actual problem so I left it as-is.

This also fixes what I believe would be an issue on case-sensitive file systems where if `dioxus.toml` existed it would try to read `Dioxus.toml`.

I'm still fairly new to Rust, so the `.as_path()` calls may not be the best way to deal with the fact that the borrow checker wouldn't let me re-use `crate_dir` and `dioxus_conf_file`. I'm open to suggestions!
2023-07-15 11:13:22 -05:00
Brian Donovan cad19fb59f docs: fix typo in use_effect description 2023-07-14 18:38:11 -04:00