Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Add a markdown eslint formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
nbanmp committed May 24, 2019
1 parent 13490a1 commit e16ce60
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -129,9 +129,10 @@ Options:
--all Compile all contracts instead of only the contracts changed since last compile.
--mode { quick | full }
Perform quick or in-depth (full) analysis.
--style { stylish | json | table | tap | unix | ... },
--style { stylish | json | table | tap | unix | markdown | ... },
Output report in the given es-lint style style.
See https://eslint.org/docs/user-guide/formatters/ for a full list.
The markdown format is also included.
--json | --yaml
Dump results in unprocessed JSON or YAML format as it comes back from MythX.
Note: this disables providing any es-lint style reports, and that
Expand Down
6 changes: 5 additions & 1 deletion helpers.js
Expand Up @@ -44,6 +44,9 @@ const contractsCompile = config => {
function getFormatter(style) {
const formatterName = style || 'stylish';
try {
if(formatterName == "markdown") {
return require('eslint-formatter-markdown/markdown')
}
return require(`eslint/lib/formatters/${formatterName}`);
} catch (ex) {
ex.message = `\nThere was a problem loading formatter option: ${style} \nError: ${
Expand Down Expand Up @@ -83,9 +86,10 @@ Options:
--all Compile all contracts instead of only the contracts changed since last compile.
--mode { quick | full }
Perform quick or in-depth (full) analysis.
--style { stylish | json | table | tap | unix | ... },
--style { stylish | json | table | tap | unix | markdown | ... },
Output report in the given es-lint style style.
See https://eslint.org/docs/user-guide/formatters/ for a full list.
The markdown format is also included.
--json | --yaml
Dump results in unprocessed JSON or YAML format as it comes back from MythX.
Note: this disables providing any es-lint style reports, and that
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -7,6 +7,7 @@
"armlet": "^2.6.0",
"configstore": "^4.0.0",
"debug": "^4.1.1",
"eslint-formatter-markdown": "^1.0.4",
"find-cache-dir": "^2.1.0",
"inquirer": "^6.2.2",
"js-yaml": "^3.13.1",
Expand Down

0 comments on commit e16ce60

Please sign in to comment.