frontend-guardian 0.1.5 → 0.1.7
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/cli.js +4 -3
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -193,7 +193,7 @@ function printResult(projectName, result) {
|
|
|
193
193
|
if (num && !byFile.get(file).includes(num))
|
|
194
194
|
byFile.get(file).push(num);
|
|
195
195
|
}
|
|
196
|
-
return [...byFile.entries()].sort((a, b) => a[0].localeCompare(b[0])).map(([file, lines]) => lines.length > 0 ? `${file}: ${
|
|
196
|
+
return [...byFile.entries()].sort((a, b) => a[0].localeCompare(b[0])).map(([file, lines]) => lines.length > 0 ? `${file}: line ${[...lines].sort((a, b) => a - b).join(", line ")}` : file);
|
|
197
197
|
}
|
|
198
198
|
if (allIssues.length > 0) {
|
|
199
199
|
console.log(chalk.yellow(" ⚠ ") + chalk.bold("Issues Found") + "\n");
|
|
@@ -208,7 +208,7 @@ function printResult(projectName, result) {
|
|
|
208
208
|
}
|
|
209
209
|
if (issue.fileLines.length > 0) {
|
|
210
210
|
console.log(INDENT + chalk.bold("Files:"));
|
|
211
|
-
const raw = STYLE_TITLES.has(issue.title) ? groupFileLines(issue.fileLines) : issue.fileLines.map((f) => (f.includes(":") ? f.replace(/:(\s*\d+)$/, ":
|
|
211
|
+
const raw = STYLE_TITLES.has(issue.title) ? groupFileLines(issue.fileLines) : issue.fileLines.map((f) => (f.includes(":") ? f.replace(/:(\s*\d+)$/, ": line $1") : f));
|
|
212
212
|
raw.forEach((f) => wrapLine(FILES_INDENT, f, FILES_INDENT));
|
|
213
213
|
}
|
|
214
214
|
if (i < allIssues.length - 1)
|
|
@@ -217,7 +217,8 @@ function printResult(projectName, result) {
|
|
|
217
217
|
console.log("");
|
|
218
218
|
}
|
|
219
219
|
console.log(line);
|
|
220
|
-
console.log(chalk.bold(" Scan Complete")
|
|
220
|
+
console.log(chalk.bold(" Scan Complete"));
|
|
221
|
+
console.log(chalk.gray(" © Justinmoto · Frontend Guardian") + "\n");
|
|
221
222
|
}
|
|
222
223
|
async function main() {
|
|
223
224
|
const arg = process.argv[2];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "frontend-guardian",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Scan frontend projects for Tailwind & component consistency (Phase 1 CLI)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"chalk": "^5.3.0",
|
|
15
15
|
"ora": "^8.0.1",
|
|
16
|
-
"@justinmoto/frontend-guardian-core": "0.1.
|
|
16
|
+
"@justinmoto/frontend-guardian-core": "0.1.8"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"typescript": "^5"
|