Skip to content

Commit

Permalink
feat(packages/sui-lint): Add send method to the reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosvillu committed Feb 13, 2024
1 parent e2cef86 commit 1ce2585
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/sui-lint/bin/sui-lint-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const baseConfig = {
if (report) {
debugger
console.log('[sui-lint] Generating report and send it to DD')
Reporter.create().map(results)
await Reporter.create().map(results).send()
}

if (fix) {
Expand Down
2 changes: 1 addition & 1 deletion packages/sui-lint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
"author": "",
"license": "MIT",
"dependencies": {
"@adv-ui/logger": "^2.14.0",
"@babel/core": "7.18.10",
"@babel/eslint-parser": "7.18.9",
"@babel/eslint-plugin": "7.18.10",
"@s-ui/helpers": "1",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@adv-ui/logger": "2",
"commander": "8.3.0",
"eslint": "8.56.0",
"eslint-config-prettier": "8.5.0",
Expand Down
8 changes: 7 additions & 1 deletion packages/sui-lint/src/reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ class Reporter {
totalFiles: results.length,
...stats
}
debugger
}

send() {
if(this.#data === undefined){
throw new Error('[sui-lint] No data to send. Maybe you must call to map before')
}

}

toJSON() {
Expand Down

0 comments on commit 1ce2585

Please sign in to comment.