@0zd0/nx-oxfmt 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# nx-oxfmt
|
|
2
2
|
|
|
3
|
+
> [!WARNING]
|
|
4
|
+
> **Deprecated and archived.** This plugin is no longer maintained and is not needed.
|
|
5
|
+
>
|
|
6
|
+
> `oxfmt` is fast enough to format the whole workspace in a single run, and it resolves nested
|
|
7
|
+
> `.oxfmtrc.json` files on its own (each file uses the nearest config, like Prettier).
|
|
8
|
+
> Running it through Nx does not require a plugin — see [Using oxfmt in Nx without a plugin](#using-oxfmt-in-nx-without-a-plugin).
|
|
9
|
+
> For linting, use the official [`@nx/oxlint`](https://nx.dev/docs/technologies/oxlint/introduction) plugin.
|
|
10
|
+
|
|
11
|
+
## Using oxfmt in Nx without a plugin
|
|
12
|
+
|
|
13
|
+
Install `oxfmt` at the workspace root:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm add -D oxfmt
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Add scripts to the root `package.json`:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"scripts": {
|
|
24
|
+
"fmt": "oxfmt",
|
|
25
|
+
"fmt:check": "oxfmt --check"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Nx infers targets from `package.json` scripts, so you can run:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
nx fmt
|
|
34
|
+
nx fmt:check
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The target is called `fmt` because `nx format` is a built-in Nx command that uses Prettier.
|
|
38
|
+
|
|
39
|
+
Per-package settings work out of the box: put a `.oxfmtrc.json` in any package directory and it
|
|
40
|
+
overrides the root config for files inside that package.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Legacy documentation
|
|
45
|
+
|
|
3
46
|
An Nx plugin for [oxfmt](https://oxc.rs/docs/guide/usage/formatter.html) - the high-performance JavaScript/TypeScript formatter.
|
|
4
47
|
|
|
5
48
|
## Install
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0zd0/nx-oxfmt",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Deprecated: not needed anymore. Run oxfmt from the workspace root instead (nested .oxfmtrc.json files are supported).",
|
|
4
5
|
"main": "./src/index.js",
|
|
5
6
|
"types": "./src/index.d.ts",
|
|
6
7
|
"dependencies": {
|