@powerlines/plugin-eslint 0.8.125 → 0.8.126
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/format-message-B0zrT_tN.d.cts +17 -0
- package/dist/format-message-Bt4W9wqe.cjs +38 -0
- package/dist/format-message-CKuUKX7C.mjs +27 -0
- package/dist/format-message-Ck01aLfz.d.mts +17 -0
- package/dist/helpers/format-message.cjs +3 -27
- package/dist/helpers/format-message.d.cts +1 -16
- package/dist/helpers/format-message.d.mts +1 -16
- package/dist/helpers/format-message.mjs +1 -25
- package/dist/helpers/index.cjs +4 -3
- package/dist/helpers/index.d.cts +2 -1
- package/dist/helpers/index.d.mts +2 -1
- package/dist/helpers/index.mjs +2 -1
- package/dist/helpers-B15z10jN.mjs +1 -0
- package/dist/helpers-LF26RHol.cjs +0 -0
- package/dist/index-9iG2qHLe.d.mts +1 -0
- package/dist/index-D-CYNcT9.d.mts +1 -0
- package/dist/index-D4ELpJXS.d.cts +1 -0
- package/dist/index-DLoAMD9J.d.cts +1 -0
- package/dist/index.cjs +7 -5
- package/dist/index.d.cts +4 -3
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +4 -2
- package/dist/plugin-BXuHeXYj.d.mts +1814 -0
- package/dist/plugin-DfZDyyvB.d.cts +1814 -0
- package/dist/plugin-ifZVa20V.mjs +1 -0
- package/dist/plugin-pBKbb5K9.cjs +0 -0
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.d.cts +2 -1
- package/dist/types/index.d.mts +2 -1
- package/dist/types/index.mjs +3 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +1 -69
- package/dist/types/plugin.d.mts +1 -69
- package/dist/types/plugin.mjs +2 -0
- package/dist/types-U3zd8PTP.mjs +1 -0
- package/dist/types-o3zWarRp.cjs +0 -0
- package/package.json +2 -2
- package/dist/powerlines/src/types/babel.d.mts +0 -2
- package/dist/powerlines/src/types/build.d.cts +0 -145
- package/dist/powerlines/src/types/build.d.mts +0 -145
- package/dist/powerlines/src/types/commands.d.cts +0 -8
- package/dist/powerlines/src/types/commands.d.mts +0 -9
- package/dist/powerlines/src/types/config.d.cts +0 -369
- package/dist/powerlines/src/types/config.d.mts +0 -369
- package/dist/powerlines/src/types/context.d.cts +0 -403
- package/dist/powerlines/src/types/context.d.mts +0 -405
- package/dist/powerlines/src/types/fs.d.cts +0 -486
- package/dist/powerlines/src/types/fs.d.mts +0 -486
- package/dist/powerlines/src/types/hooks.d.mts +0 -2
- package/dist/powerlines/src/types/plugin.d.cts +0 -231
- package/dist/powerlines/src/types/plugin.d.mts +0 -231
- package/dist/powerlines/src/types/resolved.d.cts +0 -81
- package/dist/powerlines/src/types/resolved.d.mts +0 -81
- package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
- package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/helpers/format-message.d.ts
|
|
2
|
+
declare enum MessageSeverity {
|
|
3
|
+
Warning = 1,
|
|
4
|
+
Error = 2,
|
|
5
|
+
}
|
|
6
|
+
interface LintMessage {
|
|
7
|
+
ruleId: string | null;
|
|
8
|
+
severity: MessageSeverity;
|
|
9
|
+
message: string;
|
|
10
|
+
line: number;
|
|
11
|
+
column: number;
|
|
12
|
+
}
|
|
13
|
+
declare function formatMessage(dir: string, messages: LintMessage[], filePath: string): string;
|
|
14
|
+
declare type __ΩMessageSeverity = any[];
|
|
15
|
+
declare type __ΩLintMessage = any[];
|
|
16
|
+
//#endregion
|
|
17
|
+
export { formatMessage as a, __ΩMessageSeverity as i, MessageSeverity as n, __ΩLintMessage as r, LintMessage as t };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
let __stryke_path_find = require("@stryke/path/find");
|
|
2
|
+
let __stryke_path_normalize = require("@stryke/path/normalize");
|
|
3
|
+
|
|
4
|
+
//#region src/helpers/format-message.ts
|
|
5
|
+
let MessageSeverity = /* @__PURE__ */ function(MessageSeverity$1) {
|
|
6
|
+
MessageSeverity$1[MessageSeverity$1["Warning"] = 1] = "Warning";
|
|
7
|
+
MessageSeverity$1[MessageSeverity$1["Error"] = 2] = "Error";
|
|
8
|
+
return MessageSeverity$1;
|
|
9
|
+
}({});
|
|
10
|
+
function formatMessage(dir, messages, filePath) {
|
|
11
|
+
let fileName = (0, __stryke_path_normalize.correctPath)((0, __stryke_path_find.relative)(dir, filePath));
|
|
12
|
+
if (!fileName.startsWith(".")) fileName = `./${fileName}`;
|
|
13
|
+
let output = `\n${fileName}`;
|
|
14
|
+
for (let i = 0; i < messages.length; i++) {
|
|
15
|
+
const { message, severity, line, column, ruleId } = messages[i];
|
|
16
|
+
output += "\n";
|
|
17
|
+
if (line && column) output = `${output + line.toString()}:${column.toString()} `;
|
|
18
|
+
if (severity === MessageSeverity.Warning) output += `Warning: `;
|
|
19
|
+
else output += `Error: `;
|
|
20
|
+
output += message;
|
|
21
|
+
if (ruleId) output += ` ${ruleId}`;
|
|
22
|
+
}
|
|
23
|
+
return output;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
Object.defineProperty(exports, 'MessageSeverity', {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () {
|
|
30
|
+
return MessageSeverity;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, 'formatMessage', {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () {
|
|
36
|
+
return formatMessage;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { relative } from "@stryke/path/find";
|
|
2
|
+
import { correctPath } from "@stryke/path/normalize";
|
|
3
|
+
|
|
4
|
+
//#region src/helpers/format-message.ts
|
|
5
|
+
let MessageSeverity = /* @__PURE__ */ function(MessageSeverity$1) {
|
|
6
|
+
MessageSeverity$1[MessageSeverity$1["Warning"] = 1] = "Warning";
|
|
7
|
+
MessageSeverity$1[MessageSeverity$1["Error"] = 2] = "Error";
|
|
8
|
+
return MessageSeverity$1;
|
|
9
|
+
}({});
|
|
10
|
+
function formatMessage(dir, messages, filePath) {
|
|
11
|
+
let fileName = correctPath(relative(dir, filePath));
|
|
12
|
+
if (!fileName.startsWith(".")) fileName = `./${fileName}`;
|
|
13
|
+
let output = `\n${fileName}`;
|
|
14
|
+
for (let i = 0; i < messages.length; i++) {
|
|
15
|
+
const { message, severity, line, column, ruleId } = messages[i];
|
|
16
|
+
output += "\n";
|
|
17
|
+
if (line && column) output = `${output + line.toString()}:${column.toString()} `;
|
|
18
|
+
if (severity === MessageSeverity.Warning) output += `Warning: `;
|
|
19
|
+
else output += `Error: `;
|
|
20
|
+
output += message;
|
|
21
|
+
if (ruleId) output += ` ${ruleId}`;
|
|
22
|
+
}
|
|
23
|
+
return output;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { formatMessage as n, MessageSeverity as t };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/helpers/format-message.d.ts
|
|
2
|
+
declare enum MessageSeverity {
|
|
3
|
+
Warning = 1,
|
|
4
|
+
Error = 2,
|
|
5
|
+
}
|
|
6
|
+
interface LintMessage {
|
|
7
|
+
ruleId: string | null;
|
|
8
|
+
severity: MessageSeverity;
|
|
9
|
+
message: string;
|
|
10
|
+
line: number;
|
|
11
|
+
column: number;
|
|
12
|
+
}
|
|
13
|
+
declare function formatMessage(dir: string, messages: LintMessage[], filePath: string): string;
|
|
14
|
+
declare type __ΩMessageSeverity = any[];
|
|
15
|
+
declare type __ΩLintMessage = any[];
|
|
16
|
+
//#endregion
|
|
17
|
+
export { formatMessage as a, __ΩMessageSeverity as i, MessageSeverity as n, __ΩLintMessage as r, LintMessage as t };
|
|
@@ -1,28 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
let __stryke_path_normalize = require("@stryke/path/normalize");
|
|
1
|
+
const require_format_message = require('../format-message-Bt4W9wqe.cjs');
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
MessageSeverity$1[MessageSeverity$1["Warning"] = 1] = "Warning";
|
|
7
|
-
MessageSeverity$1[MessageSeverity$1["Error"] = 2] = "Error";
|
|
8
|
-
return MessageSeverity$1;
|
|
9
|
-
}({});
|
|
10
|
-
function formatMessage(dir, messages, filePath) {
|
|
11
|
-
let fileName = (0, __stryke_path_normalize.correctPath)((0, __stryke_path_find.relative)(dir, filePath));
|
|
12
|
-
if (!fileName.startsWith(".")) fileName = `./${fileName}`;
|
|
13
|
-
let output = `\n${fileName}`;
|
|
14
|
-
for (let i = 0; i < messages.length; i++) {
|
|
15
|
-
const { message, severity, line, column, ruleId } = messages[i];
|
|
16
|
-
output += "\n";
|
|
17
|
-
if (line && column) output = `${output + line.toString()}:${column.toString()} `;
|
|
18
|
-
if (severity === MessageSeverity.Warning) output += `Warning: `;
|
|
19
|
-
else output += `Error: `;
|
|
20
|
-
output += message;
|
|
21
|
-
if (ruleId) output += ` ${ruleId}`;
|
|
22
|
-
}
|
|
23
|
-
return output;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
exports.MessageSeverity = MessageSeverity;
|
|
28
|
-
exports.formatMessage = formatMessage;
|
|
3
|
+
exports.MessageSeverity = require_format_message.MessageSeverity;
|
|
4
|
+
exports.formatMessage = require_format_message.formatMessage;
|
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
declare enum MessageSeverity {
|
|
3
|
-
Warning = 1,
|
|
4
|
-
Error = 2,
|
|
5
|
-
}
|
|
6
|
-
interface LintMessage {
|
|
7
|
-
ruleId: string | null;
|
|
8
|
-
severity: MessageSeverity;
|
|
9
|
-
message: string;
|
|
10
|
-
line: number;
|
|
11
|
-
column: number;
|
|
12
|
-
}
|
|
13
|
-
declare function formatMessage(dir: string, messages: LintMessage[], filePath: string): string;
|
|
14
|
-
declare type __ΩMessageSeverity = any[];
|
|
15
|
-
declare type __ΩLintMessage = any[];
|
|
16
|
-
//#endregion
|
|
1
|
+
import { a as formatMessage, i as __ΩMessageSeverity, n as MessageSeverity, r as __ΩLintMessage, t as LintMessage } from "../format-message-B0zrT_tN.cjs";
|
|
17
2
|
export { LintMessage, MessageSeverity, __ΩLintMessage, __ΩMessageSeverity, formatMessage };
|
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
declare enum MessageSeverity {
|
|
3
|
-
Warning = 1,
|
|
4
|
-
Error = 2,
|
|
5
|
-
}
|
|
6
|
-
interface LintMessage {
|
|
7
|
-
ruleId: string | null;
|
|
8
|
-
severity: MessageSeverity;
|
|
9
|
-
message: string;
|
|
10
|
-
line: number;
|
|
11
|
-
column: number;
|
|
12
|
-
}
|
|
13
|
-
declare function formatMessage(dir: string, messages: LintMessage[], filePath: string): string;
|
|
14
|
-
declare type __ΩMessageSeverity = any[];
|
|
15
|
-
declare type __ΩLintMessage = any[];
|
|
16
|
-
//#endregion
|
|
1
|
+
import { a as formatMessage, i as __ΩMessageSeverity, n as MessageSeverity, r as __ΩLintMessage, t as LintMessage } from "../format-message-Ck01aLfz.mjs";
|
|
17
2
|
export { LintMessage, MessageSeverity, __ΩLintMessage, __ΩMessageSeverity, formatMessage };
|
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { correctPath } from "@stryke/path/normalize";
|
|
1
|
+
import { n as formatMessage, t as MessageSeverity } from "../format-message-CKuUKX7C.mjs";
|
|
3
2
|
|
|
4
|
-
//#region src/helpers/format-message.ts
|
|
5
|
-
let MessageSeverity = /* @__PURE__ */ function(MessageSeverity$1) {
|
|
6
|
-
MessageSeverity$1[MessageSeverity$1["Warning"] = 1] = "Warning";
|
|
7
|
-
MessageSeverity$1[MessageSeverity$1["Error"] = 2] = "Error";
|
|
8
|
-
return MessageSeverity$1;
|
|
9
|
-
}({});
|
|
10
|
-
function formatMessage(dir, messages, filePath) {
|
|
11
|
-
let fileName = correctPath(relative(dir, filePath));
|
|
12
|
-
if (!fileName.startsWith(".")) fileName = `./${fileName}`;
|
|
13
|
-
let output = `\n${fileName}`;
|
|
14
|
-
for (let i = 0; i < messages.length; i++) {
|
|
15
|
-
const { message, severity, line, column, ruleId } = messages[i];
|
|
16
|
-
output += "\n";
|
|
17
|
-
if (line && column) output = `${output + line.toString()}:${column.toString()} `;
|
|
18
|
-
if (severity === MessageSeverity.Warning) output += `Warning: `;
|
|
19
|
-
else output += `Error: `;
|
|
20
|
-
output += message;
|
|
21
|
-
if (ruleId) output += ` ${ruleId}`;
|
|
22
|
-
}
|
|
23
|
-
return output;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
3
|
export { MessageSeverity, formatMessage };
|
package/dist/helpers/index.cjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_format_message = require('../format-message-Bt4W9wqe.cjs');
|
|
2
|
+
require('../helpers-LF26RHol.cjs');
|
|
2
3
|
|
|
3
|
-
exports.MessageSeverity =
|
|
4
|
-
exports.formatMessage =
|
|
4
|
+
exports.MessageSeverity = require_format_message.MessageSeverity;
|
|
5
|
+
exports.formatMessage = require_format_message.formatMessage;
|
package/dist/helpers/index.d.cts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as formatMessage, i as __ΩMessageSeverity, n as MessageSeverity, r as __ΩLintMessage, t as LintMessage } from "../format-message-B0zrT_tN.cjs";
|
|
2
|
+
import "../index-DLoAMD9J.cjs";
|
|
2
3
|
export { LintMessage, MessageSeverity, __ΩLintMessage, __ΩMessageSeverity, formatMessage };
|
package/dist/helpers/index.d.mts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as formatMessage, i as __ΩMessageSeverity, n as MessageSeverity, r as __ΩLintMessage, t as LintMessage } from "../format-message-Ck01aLfz.mjs";
|
|
2
|
+
import "../index-D-CYNcT9.mjs";
|
|
2
3
|
export { LintMessage, MessageSeverity, __ΩLintMessage, __ΩMessageSeverity, formatMessage };
|
package/dist/helpers/index.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
const
|
|
3
|
-
require('./helpers
|
|
2
|
+
const require_format_message = require('./format-message-Bt4W9wqe.cjs');
|
|
3
|
+
require('./helpers-LF26RHol.cjs');
|
|
4
|
+
require('./plugin-pBKbb5K9.cjs');
|
|
5
|
+
require('./types-o3zWarRp.cjs');
|
|
4
6
|
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
5
7
|
let __stryke_fs_exists = require("@stryke/fs/exists");
|
|
6
8
|
let __stryke_fs_get_parent_path = require("@stryke/fs/get-parent-path");
|
|
@@ -93,7 +95,7 @@ function plugin(options = {}) {
|
|
|
93
95
|
if ("loadESLint" in module$1) ESLint = await module$1.loadESLint({ useFlatConfig: this.config.lint.eslint.configFile ? (0, __stryke_path_find.findFileName)(this.config.lint.eslint.configFile).startsWith("eslint.config.") : true });
|
|
94
96
|
if (this.config.lint.eslint.fix) await ESLint.outputFixes(results);
|
|
95
97
|
if (this.config.lint.eslint.reportErrorsOnly) results = ESLint.getErrorResults(results);
|
|
96
|
-
const output = results.filter(({ messages }) => messages?.length).map(({ messages, filePath }) =>
|
|
98
|
+
const output = results.filter(({ messages }) => messages?.length).map(({ messages, filePath }) => require_format_message.formatMessage(this.config.projectRoot, messages, filePath)).join("\n");
|
|
97
99
|
if (this.config.lint.eslint.outputFile) await this.fs.write(this.config.lint.eslint.outputFile, output);
|
|
98
100
|
else this.log(__storm_software_config_tools_types.LogLevelLabel.INFO, output);
|
|
99
101
|
}
|
|
@@ -102,7 +104,7 @@ function plugin(options = {}) {
|
|
|
102
104
|
var src_default = plugin;
|
|
103
105
|
|
|
104
106
|
//#endregion
|
|
105
|
-
exports.MessageSeverity =
|
|
107
|
+
exports.MessageSeverity = require_format_message.MessageSeverity;
|
|
106
108
|
exports.default = src_default;
|
|
107
|
-
exports.formatMessage =
|
|
109
|
+
exports.formatMessage = require_format_message.formatMessage;
|
|
108
110
|
exports.plugin = plugin;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { ESLintPluginContext,
|
|
1
|
+
import { a as formatMessage, i as __ΩMessageSeverity, n as MessageSeverity, r as __ΩLintMessage, t as LintMessage } from "./format-message-B0zrT_tN.cjs";
|
|
2
|
+
import "./index-DLoAMD9J.cjs";
|
|
3
|
+
import { a as __ΩESLintPluginContext, c as __ΩESLintPluginUserConfig, i as ESLintPluginUserConfig, l as Plugin, n as ESLintPluginOptions, o as __ΩESLintPluginOptions, r as ESLintPluginResolvedConfig, s as __ΩESLintPluginResolvedConfig, t as ESLintPluginContext } from "./plugin-DfZDyyvB.cjs";
|
|
4
|
+
import "./index-D4ELpJXS.cjs";
|
|
4
5
|
|
|
5
6
|
//#region src/index.d.ts
|
|
6
7
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { ESLintPluginContext,
|
|
4
|
-
import "./
|
|
1
|
+
import { a as formatMessage, i as __ΩMessageSeverity, n as MessageSeverity, r as __ΩLintMessage, t as LintMessage } from "./format-message-Ck01aLfz.mjs";
|
|
2
|
+
import "./index-D-CYNcT9.mjs";
|
|
3
|
+
import { a as __ΩESLintPluginContext, c as __ΩESLintPluginUserConfig, i as ESLintPluginUserConfig, l as Plugin, n as ESLintPluginOptions, o as __ΩESLintPluginOptions, r as ESLintPluginResolvedConfig, s as __ΩESLintPluginResolvedConfig, t as ESLintPluginContext } from "./plugin-BXuHeXYj.mjs";
|
|
4
|
+
import "./index-9iG2qHLe.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/index.d.ts
|
|
7
7
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./helpers
|
|
1
|
+
import { n as formatMessage, t as MessageSeverity } from "./format-message-CKuUKX7C.mjs";
|
|
2
|
+
import "./helpers-B15z10jN.mjs";
|
|
3
|
+
import "./plugin-ifZVa20V.mjs";
|
|
4
|
+
import "./types-U3zd8PTP.mjs";
|
|
3
5
|
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
4
6
|
import { existsSync } from "@stryke/fs/exists";
|
|
5
7
|
import { getParentPath } from "@stryke/fs/get-parent-path";
|