Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@salesforce/eslint-config-lwc": "^3.2.1",
"@salesforce/eslint-plugin-lightning": "^1.0.0",
"@salesforce/sf-plugins-core": "^5.0.4",
"@types/wordwrap": "^1.0.3",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"cross-spawn": "^7.0.3",
Expand All @@ -40,7 +41,6 @@
"typescript": "~5.1.0",
"untildify": "^4.0.0",
"uuid": "^9.0.0",
"word-wrap": "^1.2.3",
"xml-js": "^1.6.11"
},
"resolutions": {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/DefaultRuleManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export class DefaultRuleManager implements RuleManager {
const ruleTargets: RuleTarget[] = [];
// Ask engines for their desired target patterns.
const engineTargets = await engine.getTargetPatterns();
assert(engineTargets);
assert.ok(engineTargets);
// We also need to do a bit of processing on the patterns we were given.
const positivePatterns: string[] = [];
const negativePatterns: string[] = [];
Expand Down
6 changes: 4 additions & 2 deletions src/lib/output/TableOutputFormatter.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import {OutputFormatter, Results} from "./Results";
import {FormattedOutput, ResultTableRow, RuleResult} from "../../types";
import * as path from "path";
import * as wrap from "word-wrap";
import * as wordwrap from "wordwrap";
import {isPathlessViolation} from "../util/Utils";
import {Ux} from "@salesforce/sf-plugins-core";

const WORDWRAP_LIMIT = 50;

const BASE_COLUMNS: Ux.Table.Columns<ResultTableRow> = {
description: {},
category: {},
Expand Down Expand Up @@ -47,7 +49,7 @@ export class TableOutputFormatter implements OutputFormatter {
const relativeFile = path.relative(process.cwd(), fileName);
// Instantiate our Row object.
const baseRow: ResultTableRow = {
description: wrap(message),
description: wordwrap.hard(WORDWRAP_LIMIT)(message),
category: violation.category,
url: violation.url
};
Expand Down
7 changes: 6 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1311,6 +1311,11 @@
"@types/expect" "^1.20.4"
"@types/node" "*"

"@types/wordwrap@^1.0.3":
version "1.0.3"
resolved "https://registry.yarnpkg.com/@types/wordwrap/-/wordwrap-1.0.3.tgz#1faf6e6002e8d63534bd9ad329a32bc772d4983e"
integrity sha512-jx39cOYWJxZxVOZeNHvLVoDLRUFcYtIJaurC6C0qzCovIB3GPDbMDbYvoWi9D1B2PtIE16rElQOFR4Y+8QbUgw==

"@typescript-eslint/eslint-plugin@^5.62.0":
version "5.62.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db"
Expand Down Expand Up @@ -7492,7 +7497,7 @@ winreg@~1.2.2:
resolved "https://registry.yarnpkg.com/winreg/-/winreg-1.2.5.tgz#b650383e89278952494b5d113ba049a5a4fa96d8"
integrity sha512-uf7tHf+tw0B1y+x+mKTLHkykBgK2KMs3g+KlzmyMbLvICSHQyB/xOFjTT8qZ3oeTFyU7Bbj4FzXitGG6jvKhYw==

word-wrap@^1.2.3, word-wrap@~1.2.3:
word-wrap@~1.2.3:
version "1.2.5"
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34"
integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==
Expand Down