eslint-plugin-oxfmt 0.0.12 → 0.0.13

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/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import * as eslint0 from "eslint";
1
+ import * as eslint from "eslint";
2
2
  import { Linter, Rule } from "eslint";
3
3
 
4
4
  //#region src/types.d.ts
@@ -23,7 +23,7 @@ declare const meta: {
23
23
  //#endregion
24
24
  //#region src/rules/index.d.ts
25
25
  declare const rules: {
26
- oxfmt: eslint0.Rule.RuleModule;
26
+ oxfmt: eslint.Rule.RuleModule;
27
27
  };
28
28
  //#endregion
29
29
  //#region src/parser.d.ts
package/dist/index.mjs CHANGED
@@ -3,9 +3,9 @@ import { createSyncFn } from "synckit";
3
3
  import { URL, fileURLToPath } from "node:url";
4
4
  import { DIFFERENCE, generateDifferences } from "generate-differences";
5
5
 
6
- //#region rolldown:runtime
6
+ //#region \0rolldown/runtime.js
7
7
  var __defProp = Object.defineProperty;
8
- var __exportAll = (all, symbols) => {
8
+ var __exportAll = (all, no_symbols) => {
9
9
  let target = {};
10
10
  for (var name in all) {
11
11
  __defProp(target, name, {
@@ -13,7 +13,7 @@ var __exportAll = (all, symbols) => {
13
13
  enumerable: true
14
14
  });
15
15
  }
16
- if (symbols) {
16
+ if (!no_symbols) {
17
17
  __defProp(target, Symbol.toStringTag, { value: "Module" });
18
18
  }
19
19
  return target;
@@ -58,7 +58,7 @@ const recommended = {
58
58
  name: "oxfmt/recommended",
59
59
  languageOptions: { parser: parserPlain },
60
60
  plugins: { get oxfmt() {
61
- return src_default;
61
+ return plugin;
62
62
  } },
63
63
  rules: { "oxfmt/oxfmt": "error" }
64
64
  };
@@ -67,7 +67,7 @@ const configs = { recommended };
67
67
  //#endregion
68
68
  //#region package.json
69
69
  var name = "eslint-plugin-oxfmt";
70
- var version = "0.0.12";
70
+ var version = "0.0.13";
71
71
 
72
72
  //#endregion
73
73
  //#region src/meta.ts
@@ -447,8 +447,8 @@ const oxfmt = {
447
447
  },
448
448
  create(context) {
449
449
  if (!formatViaOxfmt) formatViaOxfmt = createSyncFn(join(dirWorkers, "oxfmt.mjs"));
450
+ const sourceText = context.sourceCode.text;
450
451
  return { Program() {
451
- const sourceText = context.sourceCode.text;
452
452
  try {
453
453
  const formatResult = formatViaOxfmt(context.filename, sourceText, {
454
454
  ...context.options?.[0],
@@ -511,7 +511,6 @@ const plugin = {
511
511
  meta,
512
512
  rules
513
513
  };
514
- var src_default = plugin;
515
514
 
516
515
  //#endregion
517
- export { configs, src_default as default, meta, parserPlain, plugin, recommended, rules };
516
+ export { configs, plugin as default, plugin, meta, parserPlain, recommended, rules };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eslint-plugin-oxfmt",
3
3
  "type": "module",
4
- "version": "0.0.12",
4
+ "version": "0.0.13",
5
5
  "description": "An ESLint plugin for formatting code with oxfmt.",
6
6
  "keywords": [
7
7
  "eslint",
@@ -48,31 +48,31 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "generate-differences": "^0.1.1",
51
- "load-oxfmt-config": "^0.1.0",
51
+ "load-oxfmt-config": "^0.1.1",
52
52
  "picomatch": "^4.0.3",
53
53
  "synckit": "^0.11.12"
54
54
  },
55
55
  "devDependencies": {
56
- "@ntnyq/eslint-config": "^6.0.0-beta.6",
56
+ "@ntnyq/eslint-config": "^6.0.0-beta.7",
57
57
  "@types/json-schema": "^7.0.15",
58
- "@types/node": "^25.2.0",
59
- "@typescript/native-preview": "^7.0.0-dev.20260202.1",
60
- "bumpp": "^10.4.0",
58
+ "@types/node": "^25.2.2",
59
+ "@typescript/native-preview": "^7.0.0-dev.20260208.1",
60
+ "bumpp": "^10.4.1",
61
61
  "eslint": "^9.39.2",
62
62
  "eslint-parser-plain": "^0.1.1",
63
63
  "eslint-typegen": "^2.3.0",
64
- "eslint-vitest-rule-tester": "^3.0.1",
64
+ "eslint-vitest-rule-tester": "^3.1.0",
65
65
  "husky": "^9.1.7",
66
66
  "nano-staged": "^0.9.0",
67
67
  "npm-run-all2": "^8.0.4",
68
68
  "oxfmt": "^0.28.0",
69
69
  "show-invisibles": "^0.0.2",
70
70
  "tinyglobby": "^0.2.15",
71
- "tsdown": "^0.20.1",
71
+ "tsdown": "^0.20.3",
72
72
  "tsx": "^4.21.0",
73
73
  "typescript": "^5.9.3",
74
74
  "vitest": "^4.0.18",
75
- "eslint-plugin-oxfmt": "0.0.12"
75
+ "eslint-plugin-oxfmt": "0.0.13"
76
76
  },
77
77
  "engines": {
78
78
  "node": "^20.19.0 || >=22.12.0"
package/workers/oxfmt.mjs CHANGED
@@ -12,16 +12,11 @@ import { runAsWorker } from 'synckit'
12
12
  * @property {string} cwd - Current working directory for resolving configuration
13
13
  * @property {string} [configPath] - Custom path to oxfmt configuration file
14
14
  */
15
-
16
15
  /**
17
- * @typedef {object} Override
18
- * @property {string[]} files - Glob patterns to match files
19
- * @property {string[]} [excludeFiles] - Glob patterns to exclude files
20
- * @property {import('oxfmt').FormatOptions} [options] - Format options to apply
16
+ * @typedef {import('load-oxfmt-config').FormatOptionOverride} Override
21
17
  */
22
-
23
18
  /**
24
- * @typedef {import('oxfmt').FormatOptions & PluginOptions & {overrides?: Override[]}} Options
19
+ * @typedef {import('load-oxfmt-config').OxfmtOptions & PluginOptions} Options
25
20
  */
26
21
 
27
22
  /**
@@ -109,7 +104,12 @@ runAsWorker(
109
104
  }
110
105
 
111
106
  // Apply overrides based on filename
112
- const mergedOptions = applyOverrides(filename, cwd, baseOptions, overrides)
107
+ const mergedOptions = applyOverrides(
108
+ filename,
109
+ cwd,
110
+ baseOptions,
111
+ useConfig ? baseOptions.overrides : overrides,
112
+ )
113
113
 
114
114
  const formatResult = await format(filename, sourceText, mergedOptions)
115
115
  return formatResult