eslint-plugin-oxfmt 0.1.0 → 0.1.1
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.mjs +6 -6
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -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.1.
|
|
70
|
+
var version = "0.1.1";
|
|
71
71
|
|
|
72
72
|
//#endregion
|
|
73
73
|
//#region src/meta.ts
|
|
@@ -456,7 +456,7 @@ let formatViaOxfmt;
|
|
|
456
456
|
const oxfmt = {
|
|
457
457
|
meta: {
|
|
458
458
|
defaultOptions: [],
|
|
459
|
-
fixable: "
|
|
459
|
+
fixable: "whitespace",
|
|
460
460
|
messages,
|
|
461
461
|
schema: [oxfmtRuleSchema],
|
|
462
462
|
type: "layout",
|
|
@@ -469,7 +469,7 @@ const oxfmt = {
|
|
|
469
469
|
create(context) {
|
|
470
470
|
if (!formatViaOxfmt) formatViaOxfmt = createSyncFn(join(dirWorkers, "oxfmt.mjs"));
|
|
471
471
|
const sourceText = context.sourceCode.text;
|
|
472
|
-
return { Program() {
|
|
472
|
+
return { [context.sourceCode.ast.type || "Program"]() {
|
|
473
473
|
try {
|
|
474
474
|
const formatResult = formatViaOxfmt(context.filename, sourceText, {
|
|
475
475
|
...context.options?.[0],
|
|
@@ -485,10 +485,10 @@ const oxfmt = {
|
|
|
485
485
|
end,
|
|
486
486
|
start
|
|
487
487
|
},
|
|
488
|
-
message: error.message
|
|
488
|
+
message: `Failed to format code: ${error.message}`
|
|
489
489
|
});
|
|
490
490
|
} else context.report({
|
|
491
|
-
message: error.message
|
|
491
|
+
message: `Failed to format code: ${error.message}`,
|
|
492
492
|
loc: {
|
|
493
493
|
end: {
|
|
494
494
|
column: 0,
|
|
@@ -504,7 +504,7 @@ const oxfmt = {
|
|
|
504
504
|
else reportDifferences(context, sourceText, formatResult.code);
|
|
505
505
|
} catch {
|
|
506
506
|
context.report({
|
|
507
|
-
message: `Failed to format file ${context.filename}`,
|
|
507
|
+
message: `Failed to format file: ${context.filename}`,
|
|
508
508
|
loc: {
|
|
509
509
|
end: {
|
|
510
510
|
column: 0,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-oxfmt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.1",
|
|
5
5
|
"description": "An ESLint plugin for formatting code with oxfmt.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"eslint",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"@ntnyq/eslint-config": "^6.0.0-beta.9",
|
|
57
57
|
"@types/json-schema": "^7.0.15",
|
|
58
58
|
"@types/node": "^25.3.0",
|
|
59
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
59
|
+
"@typescript/native-preview": "^7.0.0-dev.20260224.1",
|
|
60
60
|
"bumpp": "^10.4.1",
|
|
61
|
-
"eslint": "^10.0.
|
|
61
|
+
"eslint": "^10.0.2",
|
|
62
62
|
"eslint-parser-plain": "^0.1.1",
|
|
63
63
|
"eslint-typegen": "^2.3.1",
|
|
64
64
|
"eslint-vitest-rule-tester": "^3.1.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"tsx": "^4.21.0",
|
|
73
73
|
"typescript": "^5.9.3",
|
|
74
74
|
"vitest": "^4.0.18",
|
|
75
|
-
"eslint-plugin-oxfmt": "0.1.
|
|
75
|
+
"eslint-plugin-oxfmt": "0.1.1"
|
|
76
76
|
},
|
|
77
77
|
"engines": {
|
|
78
78
|
"node": "^20.19.0 || >=22.12.0"
|