@0zd0/nx-oxfmt 0.1.0 → 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.
Files changed (2) hide show
  1. package/README.md +38 -12
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -1,30 +1,56 @@
1
1
  # nx-oxfmt
2
2
 
3
- An Nx plugin for [oxfmt](https://oxc.rs/docs/guide/usage/formatter/cli.html) - the high-performance JavaScript/TypeScript formatter.
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.
4
10
 
5
- ## Manual Setup
11
+ ## Using oxfmt in Nx without a plugin
6
12
 
7
- ### Install
13
+ Install `oxfmt` at the workspace root:
8
14
 
9
15
  ```bash
10
- npx nx add @0zd0/nx-oxfmt
16
+ pnpm add -D oxfmt
11
17
  ```
12
18
 
13
- ### Add the executor to `project.json`:
19
+ Add scripts to the root `package.json`:
14
20
 
15
21
  ```json
16
22
  {
17
- "targets": {
18
- "fmt": {
19
- "executor": "@nx-oxfmt/plugin:fmt",
20
- "options": {
21
- "write": true
22
- }
23
- }
23
+ "scripts": {
24
+ "fmt": "oxfmt",
25
+ "fmt:check": "oxfmt --check"
24
26
  }
25
27
  }
26
28
  ```
27
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
+
46
+ An Nx plugin for [oxfmt](https://oxc.rs/docs/guide/usage/formatter.html) - the high-performance JavaScript/TypeScript formatter.
47
+
48
+ ## Install
49
+
50
+ ```bash
51
+ nx add @0zd0/nx-oxfmt
52
+ ```
53
+
28
54
  ## Run Formatting:
29
55
 
30
56
  ```bash
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@0zd0/nx-oxfmt",
3
- "version": "0.1.0",
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": {