eslint-plugin-oxfmt 0.7.0 → 0.9.0

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 CHANGED
@@ -190,8 +190,8 @@ All options are optional and default to sensible values.
190
190
 
191
191
  When `useConfig` is `true`, the plugin loads config using `load-oxfmt-config`.
192
192
 
193
- - Config discovery order (from `cwd`, walking upward): `.oxfmtrc.json` → `.oxfmtrc.jsonc` → `oxfmt.config.ts` / `oxfmt.config.mts` / `oxfmt.config.cts` / `oxfmt.config.js` / `oxfmt.config.mjs` / `oxfmt.config.cjs`
194
- - `.editorconfig` support: nearest `.editorconfig` (including section overrides) is merged into the final options
193
+ - Config discovery order (from the formatted file's directory, walking upward): `.oxfmtrc.json` → `.oxfmtrc.jsonc` → `oxfmt.config.ts` / `oxfmt.config.mts` / `oxfmt.config.cts` / `oxfmt.config.js` / `oxfmt.config.mjs` / `oxfmt.config.cjs`
194
+ - `.editorconfig` support follows oxfmt behavior: only the nearest `.editorconfig` is loaded for the current file (with section overrides in that file)
195
195
  - Set `editorconfig: false` to disable `.editorconfig` merging
196
196
  - Set `editorconfig: { onlyCwd: true }` to read only the current `cwd`'s `.editorconfig` (no upward traversal)
197
197
  - Set `editorconfig: { cwd: '/path/to/base' }` to customize editorconfig resolution base directory
package/dist/index.d.mts CHANGED
@@ -1,4 +1,3 @@
1
- import * as _$eslint from "eslint";
2
1
  import { Linter, Rule } from "eslint";
3
2
  //#region src/types.d.ts
4
3
  interface PluginOxfmt {
@@ -24,7 +23,7 @@ declare const meta: {
24
23
  //#endregion
25
24
  //#region src/rules/index.d.ts
26
25
  declare const rules: {
27
- oxfmt: _$eslint.Rule.RuleModule;
26
+ oxfmt: import("eslint").Rule.RuleModule;
28
27
  };
29
28
  //#endregion
30
29
  //#region src/parser.d.ts
package/dist/index.mjs CHANGED
@@ -79,7 +79,7 @@ const configs = {
79
79
  //#region src/meta.ts
80
80
  const meta = {
81
81
  name: "eslint-plugin-oxfmt",
82
- version: "0.7.0"
82
+ version: "0.9.0"
83
83
  };
84
84
  //#endregion
85
85
  //#region src/dir.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eslint-plugin-oxfmt",
3
3
  "type": "module",
4
- "version": "0.7.0",
4
+ "version": "0.9.0",
5
5
  "description": "An ESLint plugin for formatting code with oxfmt.",
6
6
  "keywords": [
7
7
  "eslint",
@@ -44,7 +44,7 @@
44
44
  "sideEffects": false,
45
45
  "peerDependencies": {
46
46
  "eslint": "^9.5.0 || ^10.0.0",
47
- "oxfmt": ">=0.49.0",
47
+ "oxfmt": ">=0.53.0",
48
48
  "svelte": "*"
49
49
  },
50
50
  "peerDependenciesMeta": {
@@ -54,33 +54,33 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "generate-differences": "^0.1.1",
57
- "load-oxfmt-config": "^0.8.0",
57
+ "load-oxfmt-config": "^0.9.0",
58
58
  "picomatch": "^4.0.4",
59
- "synckit": "^0.11.12"
59
+ "synckit": "^0.11.13"
60
60
  },
61
61
  "devDependencies": {
62
- "@ntnyq/eslint-config": "^6.1.3",
62
+ "@ntnyq/eslint-config": "^6.1.5",
63
63
  "@types/json-schema": "^7.0.15",
64
- "@types/node": "^25.7.0",
65
- "@typescript/native-preview": "^7.0.0-dev.20260511.1",
64
+ "@types/node": "^25.9.1",
65
+ "@typescript/native-preview": "^7.0.0-dev.20260527.2",
66
66
  "bumpp": "^11.1.0",
67
- "eslint": "^10.3.0",
67
+ "eslint": "^10.4.1",
68
68
  "eslint-parser-plain": "^0.1.1",
69
69
  "eslint-typegen": "^2.3.1",
70
70
  "eslint-vitest-rule-tester": "^3.1.0",
71
71
  "husky": "^9.1.7",
72
72
  "jsonc-eslint-parser": "^3.1.0",
73
73
  "nano-staged": "^1.0.2",
74
- "npm-run-all2": "^8.0.4",
75
- "oxfmt": "^0.49.0",
74
+ "npm-run-all2": "^9.0.1",
75
+ "oxfmt": "^0.53.0",
76
76
  "show-invisibles": "^0.0.2",
77
- "svelte": "^5.55.5",
78
- "tinyglobby": "^0.2.16",
79
- "tsdown": "^0.22.0",
80
- "tsx": "^4.21.0",
77
+ "svelte": "^5.56.0",
78
+ "tinyglobby": "^0.2.17",
79
+ "tsdown": "^0.22.1",
80
+ "tsx": "^4.22.4",
81
81
  "typescript": "^6.0.3",
82
- "vitest": "^4.1.6",
83
- "eslint-plugin-oxfmt": "0.7.0"
82
+ "vitest": "^4.1.7",
83
+ "eslint-plugin-oxfmt": "0.9.0"
84
84
  },
85
85
  "engines": {
86
86
  "node": "^20.19.0 || >=22.12.0"
package/workers/oxfmt.mjs CHANGED
@@ -172,16 +172,12 @@ async function formatViaOxfmt(filename, sourceText, options = {}) {
172
172
  let finalOptions
173
173
 
174
174
  if (useConfig) {
175
- const configResolutionCwd = pluginOptions.configPath
176
- ? cwd
177
- : pluginOptions.disableNestedConfig
178
- ? cwd
179
- : dirname(filename)
180
-
181
175
  const loaded = await loadOxfmtConfig({
182
176
  configPath: pluginOptions.configPath,
183
- cwd: configResolutionCwd,
177
+ cwd: cwd ?? dirname(filename),
178
+ disableNestedConfig: pluginOptions.disableNestedConfig,
184
179
  editorconfig: pluginOptions.editorconfig,
180
+ filepath: filename,
185
181
  useCache: pluginOptions.useCache,
186
182
  })
187
183
  const { overrides: configOverrides, ...loadedConfig } = loaded.config