@powerlines/plugin-eslint 0.8.402 → 0.8.404
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.
|
@@ -16,7 +16,7 @@ function formatMessage(dir, messages, filePath) {
|
|
|
16
16
|
const { message, severity, line, column, ruleId } = messages[i];
|
|
17
17
|
output += "\n";
|
|
18
18
|
if (line && column) output = `${output + line.toString()}:${column.toString()} `;
|
|
19
|
-
if (severity ===
|
|
19
|
+
if (severity === 1) output += `Warning: `;
|
|
20
20
|
else output += `Error: `;
|
|
21
21
|
output += message;
|
|
22
22
|
if (ruleId) output += ` ${ruleId}`;
|
|
@@ -15,7 +15,7 @@ function formatMessage(dir, messages, filePath) {
|
|
|
15
15
|
const { message, severity, line, column, ruleId } = messages[i];
|
|
16
16
|
output += "\n";
|
|
17
17
|
if (line && column) output = `${output + line.toString()}:${column.toString()} `;
|
|
18
|
-
if (severity ===
|
|
18
|
+
if (severity === 1) output += `Warning: `;
|
|
19
19
|
else output += `Error: `;
|
|
20
20
|
output += message;
|
|
21
21
|
if (ruleId) output += ` ${ruleId}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-message.mjs","names":[],"sources":["../../src/helpers/format-message.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { relative } from \"@stryke/path/find\";\nimport { correctPath } from \"@stryke/path/normalize\";\n\nexport enum MessageSeverity {\n WARNING = 1,\n ERROR = 2\n}\n\nexport interface LintMessage {\n ruleId: string | null;\n severity: MessageSeverity;\n message: string;\n line: number;\n column: number;\n}\n\nexport function formatMessage(\n dir: string,\n messages: LintMessage[],\n filePath: string\n): string {\n let fileName = correctPath(relative(dir, filePath));\n if (!fileName.startsWith(\".\")) {\n fileName = `./${fileName}`;\n }\n\n let output = `\\n${fileName}`;\n\n for (let i = 0; i < messages.length; i++) {\n const { message, severity, line, column, ruleId } = messages[i]!;\n\n output += \"\\n\";\n\n if (line && column) {\n output = `${output + line.toString()}:${column.toString()} `;\n }\n\n if (severity === MessageSeverity.WARNING) {\n output += `Warning: `;\n } else {\n output += `Error: `;\n }\n\n output += message;\n\n if (ruleId) {\n output += ` ${ruleId}`;\n }\n }\n\n return output;\n}\n"],"mappings":";;;;AAqBA,IAAY,kBAAL;AACL;AACA;;KACD;AAUD,SAAgB,cACd,KACA,UACA,UACQ;CACR,IAAI,WAAW,YAAY,SAAS,KAAK,SAAS,CAAC;AACnD,KAAI,CAAC,SAAS,WAAW,IAAI,CAC3B,YAAW,KAAK;CAGlB,IAAI,SAAS,KAAK;AAElB,MAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;EACxC,MAAM,EAAE,SAAS,UAAU,MAAM,QAAQ,WAAW,SAAS;AAE7D,YAAU;AAEV,MAAI,QAAQ,OACV,UAAS,GAAG,SAAS,KAAK,UAAU,CAAC,GAAG,OAAO,UAAU,CAAC;AAG5D,MAAI,
|
|
1
|
+
{"version":3,"file":"format-message.mjs","names":[],"sources":["../../src/helpers/format-message.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { relative } from \"@stryke/path/find\";\nimport { correctPath } from \"@stryke/path/normalize\";\n\nexport enum MessageSeverity {\n WARNING = 1,\n ERROR = 2\n}\n\nexport interface LintMessage {\n ruleId: string | null;\n severity: MessageSeverity;\n message: string;\n line: number;\n column: number;\n}\n\nexport function formatMessage(\n dir: string,\n messages: LintMessage[],\n filePath: string\n): string {\n let fileName = correctPath(relative(dir, filePath));\n if (!fileName.startsWith(\".\")) {\n fileName = `./${fileName}`;\n }\n\n let output = `\\n${fileName}`;\n\n for (let i = 0; i < messages.length; i++) {\n const { message, severity, line, column, ruleId } = messages[i]!;\n\n output += \"\\n\";\n\n if (line && column) {\n output = `${output + line.toString()}:${column.toString()} `;\n }\n\n if (severity === MessageSeverity.WARNING) {\n output += `Warning: `;\n } else {\n output += `Error: `;\n }\n\n output += message;\n\n if (ruleId) {\n output += ` ${ruleId}`;\n }\n }\n\n return output;\n}\n"],"mappings":";;;;AAqBA,IAAY,kBAAL;AACL;AACA;;KACD;AAUD,SAAgB,cACd,KACA,UACA,UACQ;CACR,IAAI,WAAW,YAAY,SAAS,KAAK,SAAS,CAAC;AACnD,KAAI,CAAC,SAAS,WAAW,IAAI,CAC3B,YAAW,KAAK;CAGlB,IAAI,SAAS,KAAK;AAElB,MAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;EACxC,MAAM,EAAE,SAAS,UAAU,MAAM,QAAQ,WAAW,SAAS;AAE7D,YAAU;AAEV,MAAI,QAAQ,OACV,UAAS,GAAG,SAAS,KAAK,UAAU,CAAC,GAAG,OAAO,UAAU,CAAC;AAG5D,MAAI,eACF,WAAU;MAEV,WAAU;AAGZ,YAAU;AAEV,MAAI,OACF,WAAU,KAAK;;AAInB,QAAO"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-eslint",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.404",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing a Powerlines plugin for running ESLint on the codebase.",
|
|
6
6
|
"keywords": ["eslint", "powerlines", "storm-software", "powerlines-plugin"],
|
|
@@ -117,15 +117,15 @@
|
|
|
117
117
|
"types": "./dist/index.d.cts",
|
|
118
118
|
"files": ["dist/**/*"],
|
|
119
119
|
"dependencies": {
|
|
120
|
-
"@storm-software/config-tools": "^1.189.
|
|
120
|
+
"@storm-software/config-tools": "^1.189.77",
|
|
121
121
|
"@stryke/fs": "^0.33.66",
|
|
122
122
|
"@stryke/path": "^0.27.4",
|
|
123
123
|
"@stryke/type-checks": "^0.6.1",
|
|
124
124
|
"defu": "^6.1.7",
|
|
125
125
|
"eslint": "^9.39.4",
|
|
126
|
-
"powerlines": "^0.42.
|
|
126
|
+
"powerlines": "^0.42.41"
|
|
127
127
|
},
|
|
128
128
|
"devDependencies": { "@types/node": "^25.6.0" },
|
|
129
129
|
"publishConfig": { "access": "public" },
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "10e11a88d7fa6920f7139649cd74470cab2fd514"
|
|
131
131
|
}
|