@textlint/fixer-formatter 15.0.0 → 15.0.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/package.json +6 -7
- package/module/src/formatters/compats.d.ts +0 -3
- package/module/src/formatters/compats.d.ts.map +0 -1
- package/module/src/formatters/compats.js +0 -33
- package/module/src/formatters/compats.js.map +0 -1
- package/module/src/formatters/diff.d.ts +0 -3
- package/module/src/formatters/diff.d.ts.map +0 -1
- package/module/src/formatters/diff.js +0 -136
- package/module/src/formatters/diff.js.map +0 -1
- package/module/src/formatters/fixed-result.d.ts +0 -3
- package/module/src/formatters/fixed-result.d.ts.map +0 -1
- package/module/src/formatters/fixed-result.js +0 -8
- package/module/src/formatters/fixed-result.js.map +0 -1
- package/module/src/formatters/json.d.ts +0 -3
- package/module/src/formatters/json.d.ts.map +0 -1
- package/module/src/formatters/json.js +0 -6
- package/module/src/formatters/json.js.map +0 -1
- package/module/src/formatters/stylish.d.ts +0 -3
- package/module/src/formatters/stylish.d.ts.map +0 -1
- package/module/src/formatters/stylish.js +0 -89
- package/module/src/formatters/stylish.js.map +0 -1
- package/module/src/index.d.ts +0 -13
- package/module/src/index.d.ts.map +0 -1
- package/module/src/index.js +0 -87
- package/module/src/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@textlint/fixer-formatter",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.1",
|
|
4
4
|
"description": "textlint output formatter for fixer",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"AST",
|
|
@@ -27,21 +27,20 @@
|
|
|
27
27
|
"files": [
|
|
28
28
|
"bin/",
|
|
29
29
|
"lib/",
|
|
30
|
-
"module/",
|
|
31
30
|
"src/",
|
|
32
31
|
"!*.tsbuildinfo"
|
|
33
32
|
],
|
|
34
33
|
"scripts": {
|
|
35
|
-
"build": "tsc -b
|
|
36
|
-
"clean": "rimraf lib/
|
|
34
|
+
"build": "tsc -b",
|
|
35
|
+
"clean": "rimraf lib/",
|
|
37
36
|
"prepack": "npm run build",
|
|
38
37
|
"test": "vitest run",
|
|
39
38
|
"test:watch": "vitest watch"
|
|
40
39
|
},
|
|
41
40
|
"dependencies": {
|
|
42
|
-
"@textlint/module-interop": "15.0.
|
|
41
|
+
"@textlint/module-interop": "15.0.1",
|
|
43
42
|
"@textlint/resolver": "15.0.0",
|
|
44
|
-
"@textlint/types": "15.0.
|
|
43
|
+
"@textlint/types": "15.0.1",
|
|
45
44
|
"chalk": "^4.1.2",
|
|
46
45
|
"debug": "^4.4.1",
|
|
47
46
|
"diff": "^5.2.0",
|
|
@@ -60,5 +59,5 @@
|
|
|
60
59
|
"publishConfig": {
|
|
61
60
|
"access": "public"
|
|
62
61
|
},
|
|
63
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "ee6d1134b3439fc2c0c253897b8d1d52179e893c"
|
|
64
63
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compats.d.ts","sourceRoot":"","sources":["../../../src/formatters/compats.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AASzD,MAAM,CAAC,OAAO,WAAW,OAAO,EAAE,iBAAiB,EAAE,UAyBpD"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// LICENSE : MIT
|
|
2
|
-
"use strict";
|
|
3
|
-
function getMessageType(message) {
|
|
4
|
-
if (message.fatal || message.severity === 2) {
|
|
5
|
-
return "Error";
|
|
6
|
-
}
|
|
7
|
-
else {
|
|
8
|
-
return "Warning";
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export default function (results) {
|
|
12
|
-
let output = "";
|
|
13
|
-
let total = 0;
|
|
14
|
-
results.forEach((result) => {
|
|
15
|
-
const messages = result.applyingMessages;
|
|
16
|
-
total += messages.length;
|
|
17
|
-
messages.forEach((message) => {
|
|
18
|
-
output += "Fixed✔ ";
|
|
19
|
-
output += `${result.filePath}: `;
|
|
20
|
-
output += `line ${message.line || 0}`;
|
|
21
|
-
output += `, col ${message.column || 0}`;
|
|
22
|
-
output += `, ${getMessageType(message)}`;
|
|
23
|
-
output += ` - ${message.message}`;
|
|
24
|
-
output += message.ruleId ? ` (${message.ruleId})` : "";
|
|
25
|
-
output += "\n";
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
if (total > 0) {
|
|
29
|
-
output += `\n\nFixed ${total} problem${total !== 1 ? "s" : ""}`;
|
|
30
|
-
}
|
|
31
|
-
return output;
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=compats.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compats.js","sourceRoot":"","sources":["../../../src/formatters/compats.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,YAAY,CAAC;AAEb,SAAS,cAAc,CAAC,OAAY;IAChC,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;QAC1C,OAAO,OAAO,CAAC;IACnB,CAAC;SAAM,CAAC;QACJ,OAAO,SAAS,CAAC;IACrB,CAAC;AACL,CAAC;AAED,MAAM,CAAC,OAAO,WAAW,OAA4B;IACjD,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,MAAM,CAAC,gBAAgB,CAAC;QACzC,KAAK,IAAI,QAAQ,CAAC,MAAM,CAAC;QAEzB,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACzB,MAAM,IAAI,SAAS,CAAC;YACpB,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,IAAI,CAAC;YACjC,MAAM,IAAI,QAAQ,OAAO,CAAC,IAAI,IAAI,CAAC,EAAE,CAAC;YACtC,MAAM,IAAI,SAAS,OAAO,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;YAClC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YACvD,MAAM,IAAI,IAAI,CAAC;QACnB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QACZ,MAAM,IAAI,aAAa,KAAK,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACpE,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../src/formatters/diff.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AA2CzD,MAAM,CAAC,OAAO,WAAW,OAAO,EAAE,iBAAiB,EAAE,EAAE,OAAO,EAAE,GAAG,UAqGlE"}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
import fs from "node:fs";
|
|
3
|
-
import { diffLines } from "diff";
|
|
4
|
-
import chalk from "chalk";
|
|
5
|
-
import stripAnsi from "strip-ansi";
|
|
6
|
-
const isFile = (filePath) => {
|
|
7
|
-
try {
|
|
8
|
-
const stats = fs.statSync(filePath);
|
|
9
|
-
return stats.isFile();
|
|
10
|
-
}
|
|
11
|
-
catch (error) {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Given a word and a count, append an s if count is not one.
|
|
17
|
-
* @param {string} word A word in its singular form.
|
|
18
|
-
* @param {number} count A number controlling whether word should be pluralized.
|
|
19
|
-
* @returns {string} The original word with an s on the end if count is not one.
|
|
20
|
-
*/
|
|
21
|
-
function pluralize(word, count) {
|
|
22
|
-
return count === 1 ? word : `${word}s`;
|
|
23
|
-
}
|
|
24
|
-
function isModified(part) {
|
|
25
|
-
if (!part) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
return typeof part === "object" && (part.removed || part.added);
|
|
29
|
-
}
|
|
30
|
-
function addMarkEachLine(mark, text) {
|
|
31
|
-
if (text.length === 0) {
|
|
32
|
-
return "\n";
|
|
33
|
-
}
|
|
34
|
-
const lines = text.split("\n");
|
|
35
|
-
const markedLines = lines
|
|
36
|
-
.filter((line) => line.length > 0)
|
|
37
|
-
.map((line) => {
|
|
38
|
-
return mark + line;
|
|
39
|
-
});
|
|
40
|
-
return `${markedLines.join("\n")}\n`;
|
|
41
|
-
}
|
|
42
|
-
export default function (results, options) {
|
|
43
|
-
// default: true
|
|
44
|
-
const useColor = options.color !== undefined ? options.color : true;
|
|
45
|
-
let output = "\n";
|
|
46
|
-
let totalFixed = 0;
|
|
47
|
-
let errors = 0;
|
|
48
|
-
const summaryColor = "yellow";
|
|
49
|
-
const greenColor = "green";
|
|
50
|
-
results.forEach(function (result) {
|
|
51
|
-
const filePath = result.filePath;
|
|
52
|
-
const messages = result.applyingMessages;
|
|
53
|
-
// still error count
|
|
54
|
-
const remainingMessages = result.remainingMessages;
|
|
55
|
-
errors += remainingMessages.length;
|
|
56
|
-
totalFixed += messages.length;
|
|
57
|
-
if (messages.length === 0) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
if (!isFile(filePath)) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
output += `${chalk.underline(result.filePath)}\n`;
|
|
64
|
-
const originalContent = fs.readFileSync(filePath, "utf-8");
|
|
65
|
-
const diff = diffLines(originalContent, result.output);
|
|
66
|
-
diff.forEach(function (part, index) {
|
|
67
|
-
const prevLine = diff[index - 1];
|
|
68
|
-
const nextLine = diff[index + 1];
|
|
69
|
-
if (!isModified(part) && part.count > 1) {
|
|
70
|
-
const greyColor = "grey";
|
|
71
|
-
/*
|
|
72
|
-
<MODIFIED>
|
|
73
|
-
first line
|
|
74
|
-
....
|
|
75
|
-
*/
|
|
76
|
-
if (isModified(prevLine)) {
|
|
77
|
-
const lines = part.value.split("\n");
|
|
78
|
-
output += `${chalk[greyColor](lines[0])}\n`;
|
|
79
|
-
}
|
|
80
|
-
output += chalk[greyColor]("...");
|
|
81
|
-
if (isModified(nextLine)) {
|
|
82
|
-
const lines = part.value.split("\n");
|
|
83
|
-
output += `${chalk[greyColor](lines[lines.length - 1])}\n`;
|
|
84
|
-
}
|
|
85
|
-
/*
|
|
86
|
-
...
|
|
87
|
-
last line
|
|
88
|
-
<MODIFIED>
|
|
89
|
-
*/
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
// green for additions, red for deletions
|
|
93
|
-
// grey for common parts
|
|
94
|
-
let lineColor;
|
|
95
|
-
let diffMark = "";
|
|
96
|
-
if (part.added) {
|
|
97
|
-
lineColor = "green";
|
|
98
|
-
diffMark = "+ ";
|
|
99
|
-
}
|
|
100
|
-
else if (part.removed) {
|
|
101
|
-
lineColor = "red";
|
|
102
|
-
diffMark = "- ";
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
lineColor = "grey";
|
|
106
|
-
diffMark = "";
|
|
107
|
-
}
|
|
108
|
-
output += chalk[lineColor](addMarkEachLine(diffMark, part.value));
|
|
109
|
-
});
|
|
110
|
-
output += "\n\n";
|
|
111
|
-
});
|
|
112
|
-
if (totalFixed > 0) {
|
|
113
|
-
output += chalk[greenColor].bold([
|
|
114
|
-
// http://www.fileformat.info/info/unicode/char/2714/index.htm
|
|
115
|
-
"✔ Fixed ",
|
|
116
|
-
totalFixed,
|
|
117
|
-
pluralize(" problem", totalFixed),
|
|
118
|
-
"\n"
|
|
119
|
-
].join(""));
|
|
120
|
-
}
|
|
121
|
-
if (errors > 0) {
|
|
122
|
-
output += chalk[summaryColor].bold([
|
|
123
|
-
// http://www.fileformat.info/info/unicode/char/2716/index.htm
|
|
124
|
-
"✖ Remaining ",
|
|
125
|
-
errors,
|
|
126
|
-
pluralize(" problem", errors),
|
|
127
|
-
"\n"
|
|
128
|
-
].join(""));
|
|
129
|
-
}
|
|
130
|
-
const finalOutput = totalFixed > 0 ? output : "";
|
|
131
|
-
if (!useColor) {
|
|
132
|
-
return stripAnsi(finalOutput);
|
|
133
|
-
}
|
|
134
|
-
return finalOutput;
|
|
135
|
-
}
|
|
136
|
-
//# sourceMappingURL=diff.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"diff.js","sourceRoot":"","sources":["../../../src/formatters/diff.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,MAAM,MAAM,GAAG,CAAC,QAAgB,EAAE,EAAE;IAChC,IAAI,CAAC;QACD,MAAM,KAAK,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACpC,OAAO,KAAK,CAAC,MAAM,EAAE,CAAC;IAC1B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,KAAK,CAAC;IACjB,CAAC;AACL,CAAC,CAAC;AACF;;;;;GAKG;AACH,SAAS,SAAS,CAAC,IAAY,EAAE,KAAa;IAC1C,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC;AAC3C,CAAC;AAED,SAAS,UAAU,CAAC,IAAS;IACzB,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,OAAO,KAAK,CAAC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CAAC,EAAE,CAAC,CACb,CAAC;IACN,CAAC;IAED,MAAM,WAAW,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACjD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,OAAO,SAAS,CAAC,WAAW,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,WAAW,CAAC;AACvB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fixed-result.d.ts","sourceRoot":"","sources":["../../../src/formatters/fixed-result.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,MAAM,CAAC,OAAO,WAAW,OAAO,EAAE,iBAAiB,EAAE,UAKpD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fixed-result.js","sourceRoot":"","sources":["../../../src/formatters/fixed-result.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,YAAY,CAAC;AAGb,MAAM,CAAC,OAAO,WAAW,OAA4B;IACjD,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAE5D,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../src/formatters/json.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,MAAM,CAAC,OAAO,WAAW,OAAO,EAAE,iBAAiB,EAAE,UAEpD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../../src/formatters/json.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,YAAY,CAAC;AAEb,MAAM,CAAC,OAAO,WAAW,OAA4B;IACjD,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stylish.d.ts","sourceRoot":"","sources":["../../../src/formatters/stylish.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAkBzD,MAAM,CAAC,OAAO,WAAW,OAAO,EAAE,iBAAiB,EAAE,EAAE,OAAO,EAAE,GAAG,UAwFlE"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
import chalk from "chalk";
|
|
3
|
-
// @ts-expect-error no types
|
|
4
|
-
import table from "text-table";
|
|
5
|
-
import widthOfString from "string-width";
|
|
6
|
-
import stripAnsi from "strip-ansi";
|
|
7
|
-
/**
|
|
8
|
-
* Given a word and a count, append an s if count is not one.
|
|
9
|
-
* @param {string} word A word in its singular form.
|
|
10
|
-
* @param {number} count A number controlling whether word should be pluralized.
|
|
11
|
-
* @returns {string} The original word with an s on the end if count is not one.
|
|
12
|
-
*/
|
|
13
|
-
function pluralize(word, count) {
|
|
14
|
-
return count === 1 ? word : `${word}s`;
|
|
15
|
-
}
|
|
16
|
-
export default function (results, options) {
|
|
17
|
-
// default: true
|
|
18
|
-
const useColor = options.color !== undefined ? options.color : true;
|
|
19
|
-
let output = "\n";
|
|
20
|
-
let totalFixed = 0;
|
|
21
|
-
let errors = 0;
|
|
22
|
-
const summaryColor = "yellow";
|
|
23
|
-
const greenColor = "green";
|
|
24
|
-
results.forEach(function (result) {
|
|
25
|
-
if (!result.applyingMessages || !result.remainingMessages) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
const messages = result.applyingMessages;
|
|
29
|
-
// still error count
|
|
30
|
-
const remainingMessages = result.remainingMessages;
|
|
31
|
-
errors += remainingMessages.length;
|
|
32
|
-
if (messages.length === 0) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
output += `${chalk.underline(result.filePath)}\n`;
|
|
36
|
-
output += `${table(messages.map(function (message) {
|
|
37
|
-
// fixable
|
|
38
|
-
totalFixed++;
|
|
39
|
-
const messageType = chalk[greenColor].bold("\u2714 ");
|
|
40
|
-
return [
|
|
41
|
-
"",
|
|
42
|
-
message.line || 0,
|
|
43
|
-
message.column || 0,
|
|
44
|
-
messageType,
|
|
45
|
-
message.message.replace(/\.$/, ""),
|
|
46
|
-
chalk.gray(message.ruleId || "")
|
|
47
|
-
];
|
|
48
|
-
}), {
|
|
49
|
-
align: ["", "r", "l"],
|
|
50
|
-
stringLength: (str) => {
|
|
51
|
-
const lines = stripAnsi(str).split("\n");
|
|
52
|
-
return Math.max.apply(null, lines.map(function (line) {
|
|
53
|
-
return widthOfString(line);
|
|
54
|
-
}));
|
|
55
|
-
}
|
|
56
|
-
})
|
|
57
|
-
.split("\n")
|
|
58
|
-
.map(function (el) {
|
|
59
|
-
return el.replace(/(\d+)\s+(\d+)/, function (_m, p1, p2) {
|
|
60
|
-
return chalk.gray(`${p1}:${p2}`);
|
|
61
|
-
});
|
|
62
|
-
})
|
|
63
|
-
.join("\n")}\n\n`;
|
|
64
|
-
});
|
|
65
|
-
if (totalFixed > 0) {
|
|
66
|
-
output += chalk[greenColor].bold([
|
|
67
|
-
// http://www.fileformat.info/info/unicode/char/2714/index.htm
|
|
68
|
-
"\u2714 Fixed ",
|
|
69
|
-
totalFixed,
|
|
70
|
-
pluralize(" problem", totalFixed),
|
|
71
|
-
"\n"
|
|
72
|
-
].join(""));
|
|
73
|
-
}
|
|
74
|
-
if (errors > 0) {
|
|
75
|
-
output += chalk[summaryColor].bold([
|
|
76
|
-
// http://www.fileformat.info/info/unicode/char/2716/index.htm
|
|
77
|
-
"\u2716 Remaining ",
|
|
78
|
-
errors,
|
|
79
|
-
pluralize(" problem", errors),
|
|
80
|
-
"\n"
|
|
81
|
-
].join(""));
|
|
82
|
-
}
|
|
83
|
-
const finalOutput = totalFixed > 0 ? output : "";
|
|
84
|
-
if (!useColor) {
|
|
85
|
-
return stripAnsi(finalOutput);
|
|
86
|
-
}
|
|
87
|
-
return finalOutput;
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=stylish.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stylish.js","sourceRoot":"","sources":["../../../src/formatters/stylish.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAGb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,4BAA4B;AAC5B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,aAAa,MAAM,cAAc,CAAC;AACzC,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC;;;;;GAKG;AACH,SAAS,SAAS,CAAC,IAAY,EAAE,KAAa;IAC1C,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC;AAC3C,CAAC;AAED,MAAM,CAAC,OAAO,WAAW,OAA4B,EAAE,OAAY;IAC/D,gBAAgB;IAChB,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IACpE,IAAI,MAAM,GAAG,IAAI,CAAC;IAClB,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,MAAM,YAAY,GAAG,QAAQ,CAAC;IAC9B,MAAM,UAAU,GAAG,OAAO,CAAC;IAE3B,OAAO,CAAC,OAAO,CAAC,UAAU,MAAM;QAC5B,IAAI,CAAC,MAAM,CAAC,gBAAgB,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC;YACxD,OAAO;QACX,CAAC;QACD,MAAM,QAAQ,GAAG,MAAM,CAAC,gBAAgB,CAAC;QACzC,oBAAoB;QAC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AE,EAAE,EAAE,EAAE;gBACnD,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;YACrC,CAAC,CAAC,CAAC;QACP,CAAC,CAAC;aACD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,IAAI,UAAU,GAAG,CAAC,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,IAAI,CAC5B;YACI,8DAA8D;YAC9D,eAAe;YACf,UAAU;YACV,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;YACjC,IAAI;SACP,CAAC,IAAI,CAAC,EAAE,CAAC,CACb,CAAC;IACN,CAAC;IAED,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,IAAI,CAC9B;YACI,8DAA8D;YAC9D,mBAAmB;YACnB,MAAM;YACN,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC;YAC7B,IAAI;SACP,CAAC,IAAI,CAAC,EAAE,CAAC,CACb,CAAC;IACN,CAAC;IAED,MAAM,WAAW,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACjD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,OAAO,SAAS,CAAC,WAAW,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,WAAW,CAAC;AACvB,CAAC"}
|
package/module/src/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { TextlintFixResult } from "@textlint/types";
|
|
2
|
-
export type FormatterConfig = {
|
|
3
|
-
color?: boolean;
|
|
4
|
-
formatterName: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function loadFormatter(formatterConfig: FormatterConfig): Promise<{
|
|
7
|
-
format(results: TextlintFixResult[]): string;
|
|
8
|
-
}>;
|
|
9
|
-
export interface FixerFormatterDetail {
|
|
10
|
-
name: string;
|
|
11
|
-
}
|
|
12
|
-
export declare function getFixerFormatterList(): FixerFormatterDetail[];
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AA4BzD,MAAM,MAAM,eAAe,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzE,wBAAsB,aAAa,CAAC,eAAe,EAAE,eAAe;oBAKxC,iBAAiB,EAAE;GAiD9C;AAED,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,qBAAqB,IAAI,oBAAoB,EAAE,CAM9D"}
|
package/module/src/index.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
// LICENSE : MIT
|
|
2
|
-
"use strict";
|
|
3
|
-
import { moduleInterop } from "@textlint/module-interop";
|
|
4
|
-
import fs from "node:fs";
|
|
5
|
-
import path from "node:path";
|
|
6
|
-
import debug0 from "debug";
|
|
7
|
-
import { tryResolve, dynamicImport } from "@textlint/resolver";
|
|
8
|
-
// formatters
|
|
9
|
-
import compatsFormatter from "./formatters/compats.js";
|
|
10
|
-
import diffFormatter from "./formatters/diff.js";
|
|
11
|
-
import fixedResultFormatter from "./formatters/fixed-result.js";
|
|
12
|
-
import jsonFormatter from "./formatters/json.js";
|
|
13
|
-
import stylishFormatter from "./formatters/stylish.js";
|
|
14
|
-
const builtinFormatterList = {
|
|
15
|
-
compats: compatsFormatter,
|
|
16
|
-
diff: diffFormatter,
|
|
17
|
-
"fixed-result": fixedResultFormatter,
|
|
18
|
-
json: jsonFormatter,
|
|
19
|
-
stylish: stylishFormatter
|
|
20
|
-
};
|
|
21
|
-
const isFormatterFunction = (formatter) => {
|
|
22
|
-
return typeof formatter === "function";
|
|
23
|
-
};
|
|
24
|
-
const builtinFormatterNames = Object.keys(builtinFormatterList);
|
|
25
|
-
const debug = debug0("textlint:textfix-formatter");
|
|
26
|
-
export async function loadFormatter(formatterConfig) {
|
|
27
|
-
var _a;
|
|
28
|
-
const formatterName = formatterConfig.formatterName;
|
|
29
|
-
debug(`formatterName: ${formatterName}`);
|
|
30
|
-
if (builtinFormatterNames.includes(formatterName)) {
|
|
31
|
-
return {
|
|
32
|
-
format(results) {
|
|
33
|
-
return builtinFormatterList[formatterName](results, formatterConfig);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
let formatter;
|
|
38
|
-
let formatterPath;
|
|
39
|
-
if (fs.existsSync(formatterName)) {
|
|
40
|
-
formatterPath = formatterName;
|
|
41
|
-
}
|
|
42
|
-
else if (fs.existsSync(path.resolve(process.cwd(), formatterName))) {
|
|
43
|
-
formatterPath = path.resolve(process.cwd(), formatterName);
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
const pkgPath = tryResolve(`textlint-formatter-${formatterName}`, {
|
|
47
|
-
parentModule: "fixer-formatter"
|
|
48
|
-
}) ||
|
|
49
|
-
tryResolve(formatterName, {
|
|
50
|
-
parentModule: "fixer-formatter"
|
|
51
|
-
});
|
|
52
|
-
if (pkgPath) {
|
|
53
|
-
formatterPath = pkgPath;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
if (!formatterPath) {
|
|
57
|
-
throw new Error(`Could not find formatter ${formatterName}`);
|
|
58
|
-
}
|
|
59
|
-
try {
|
|
60
|
-
const mod = (_a = moduleInterop((await dynamicImport(formatterPath, {
|
|
61
|
-
parentModule: "fixer-formatter"
|
|
62
|
-
})).exports)) === null || _a === void 0 ? void 0 : _a.default;
|
|
63
|
-
if (!isFormatterFunction(mod)) {
|
|
64
|
-
throw new Error(`formatter should export function, but ${formatterPath} exports ${typeof mod}`);
|
|
65
|
-
}
|
|
66
|
-
formatter = mod;
|
|
67
|
-
}
|
|
68
|
-
catch (ex) {
|
|
69
|
-
throw new Error(`Could not find formatter ${formatterName}
|
|
70
|
-
See https://github.com/textlint/textlint/issues/148
|
|
71
|
-
${ex}`);
|
|
72
|
-
}
|
|
73
|
-
debug(`use formatter: ${formatterPath}`);
|
|
74
|
-
return {
|
|
75
|
-
format(results) {
|
|
76
|
-
return formatter(results, formatterConfig);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
export function getFixerFormatterList() {
|
|
81
|
-
return builtinFormatterNames.map((name) => {
|
|
82
|
-
return {
|
|
83
|
-
name
|
|
84
|
-
};
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
//# sourceMappingURL=index.js.map
|
package/module/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,YAAY,CAAC;AAEb,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,MAAM,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC/D,aAAa;AACb,OAAO,gBAAgB,MAAM,yBAAyB,CAAC;AACvD,OAAO,aAAa,MAAM,sBAAsB,CAAC;AACjD,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAChE,OAAO,aAAa,MAAM,sBAAsB,CAAC;AACjD,OAAO,gBAAgB,MAAM,yBAAyB,CAAC;AAEvD,MAAM,oBAAoB,GAAG;IACzB,OAAO,EAAE,gBAAgB;IACzB,IAAI,EAAE,aAAa;IACnB,cAAc,EAAE,oBAAoB;IACpC,IAAI,EAAE,aAAa;IACnB,OAAO,EAAE,gBAAgB;CACnB,CAAC;AA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