eslint-plugin-oxfmt 0.14.0 → 0.15.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
@@ -22,7 +22,7 @@
22
22
 
23
23
  - **ESLint**: `>= 9.0.0` (Only supports ESLint flat config)
24
24
  - **Node.js**: `^20.19.0 || >=22.12.0`
25
- - **oxfmt**: `>= 0.59.0`
25
+ - **oxfmt**: `>= 0.60.0`
26
26
 
27
27
  ## Installation
28
28
 
@@ -201,6 +201,7 @@ When `useConfig` is `true`, the plugin loads config using `load-oxfmt-config`.
201
201
  - ESLint rule options generally take highest priority because inline rule options are merged after loaded config.
202
202
  - Rule-level `ignorePatterns` are resolved relative to ESLint `cwd`; config-level `ignorePatterns` are resolved relative to the resolved config file directory and reject parent-directory (`..`) path segments.
203
203
  - When `useConfig` is `true`, config `overrides` are applied first and rule-level `overrides` are appended after them (later entries win on conflicts).
204
+ - Invalid `files` or `excludeFiles` override glob patterns are reported as formatting errors.
204
205
  - When `useConfig` is `false`, config discovery and config `ignorePatterns` are skipped, while global ignores still apply when `respectOxfmtDefaultIgnores` is enabled.
205
206
 
206
207
  For detailed behavior, see:
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.14.0"
82
+ version: "0.15.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.14.0",
4
+ "version": "0.15.0",
5
5
  "description": "An ESLint plugin for formatting code with oxfmt.",
6
6
  "keywords": [
7
7
  "eslint",
@@ -47,7 +47,7 @@
47
47
  "sideEffects": false,
48
48
  "peerDependencies": {
49
49
  "eslint": "^9.5.0 || ^10.0.0",
50
- "oxfmt": ">=0.59.0",
50
+ "oxfmt": ">=0.60.0",
51
51
  "svelte": "*"
52
52
  },
53
53
  "peerDependenciesMeta": {
@@ -58,16 +58,16 @@
58
58
  "dependencies": {
59
59
  "generate-differences": "^0.1.1",
60
60
  "ignore": "^7.0.6",
61
- "load-oxfmt-config": "^0.15.0",
61
+ "load-oxfmt-config": "^0.16.0",
62
62
  "picomatch": "^4.0.5",
63
63
  "synckit": "^0.11.13"
64
64
  },
65
65
  "devDependencies": {
66
- "@ntnyq/eslint-config": "^7.0.0-beta.11",
66
+ "@ntnyq/eslint-config": "^7.0.0-beta.13",
67
67
  "@types/json-schema": "^7.0.15",
68
68
  "@types/node": "^26.1.1",
69
69
  "@typescript/native-preview": "^7.0.0-dev.20260707.2",
70
- "bumpp": "^11.1.0",
70
+ "bumpp": "^12.0.0",
71
71
  "eslint": "^10.7.0",
72
72
  "eslint-parser-plain": "^0.1.1",
73
73
  "eslint-typegen": "^2.3.1",
@@ -76,15 +76,15 @@
76
76
  "jsonc-eslint-parser": "^3.1.0",
77
77
  "nano-staged": "^1.0.2",
78
78
  "npm-run-all2": "^9.0.2",
79
- "oxfmt": "^0.59.0",
79
+ "oxfmt": "^0.60.0",
80
80
  "show-invisibles": "^0.0.2",
81
- "svelte": "^5.56.5",
81
+ "svelte": "^5.56.7",
82
82
  "tinyglobby": "^0.2.17",
83
- "tsdown": "^0.22.8",
83
+ "tsdown": "^0.22.13",
84
84
  "tsx": "^4.23.1",
85
85
  "typescript": "^6.0.3",
86
86
  "vitest": "^4.1.10",
87
- "eslint-plugin-oxfmt": "0.14.0"
87
+ "eslint-plugin-oxfmt": "0.15.0"
88
88
  },
89
89
  "engines": {
90
90
  "node": "^20.19.0 || >=22.12.0"
package/workers/oxfmt.mjs CHANGED
@@ -247,10 +247,24 @@ function getCachedOverrideMatcher(patterns) {
247
247
  return cached
248
248
  }
249
249
 
250
- const matcher = picomatch(patterns, {
250
+ const matcherOptions = {
251
251
  dot: true,
252
252
  noextglob: true,
253
- })
253
+ strictBrackets: true,
254
+ }
255
+
256
+ for (const pattern of patterns) {
257
+ try {
258
+ picomatch(pattern, matcherOptions)
259
+ } catch (error) {
260
+ const details = error instanceof Error ? `: ${error.message}` : ''
261
+ throw new Error(`Invalid glob pattern \`${pattern}\`${details}`, {
262
+ cause: error,
263
+ })
264
+ }
265
+ }
266
+
267
+ const matcher = picomatch(patterns, matcherOptions)
254
268
  setCacheEntry(overrideMatcherCache, key, matcher)
255
269
  return matcher
256
270
  }