testeranto 0.207.0 → 0.208.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/bundle.js
CHANGED
|
@@ -5,7 +5,7 @@ await esbuild.build({
|
|
|
5
5
|
outExtension: { '.js': '.mjs' },
|
|
6
6
|
entryPoints: [
|
|
7
7
|
// 'src/init-docs.ts',
|
|
8
|
-
|
|
8
|
+
'src/esbuildConfigs/eslint-formatter-testeranto.ts',
|
|
9
9
|
// 'src/testeranto.ts',
|
|
10
10
|
'src/mothership/mothership.ts',
|
|
11
11
|
],
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createRequire } from 'module';const require = createRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// src/esbuildConfigs/eslint-formatter-testeranto.ts
|
|
4
|
+
function eslint_formatter_testeranto_default(results) {
|
|
5
|
+
return results.filter((r) => r.messages.length).map((r) => {
|
|
6
|
+
const path = r.filePath.replace(process.cwd() + "/", "");
|
|
7
|
+
return [
|
|
8
|
+
path,
|
|
9
|
+
...r.messages.map(
|
|
10
|
+
(m) => [
|
|
11
|
+
`${m.line}:${m.column} ${m.message} (${m.ruleId || ""})`,
|
|
12
|
+
...m.suggestions?.map(
|
|
13
|
+
(s) => `- ${s.message}${s.fix ? " (fix)" : ""}`
|
|
14
|
+
) || []
|
|
15
|
+
].join("\n")
|
|
16
|
+
)
|
|
17
|
+
].join("\n");
|
|
18
|
+
}).join("\n\n");
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
eslint_formatter_testeranto_default as default
|
|
22
|
+
};
|