This repository has been archived by the owner on Sep 28, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: try load official formatter (#285)
- Loading branch information
1 parent
8cb02a6
commit 997cce5
Showing
3 changed files
with
66 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* eslint-disable no-console */ | ||
var test = require("ava"); | ||
var webpack = require("webpack"); | ||
|
||
var conf = require("./utils/conf"); | ||
|
||
test.cb("eslint-loader can use official formatter", function(t) { | ||
t.plan(1); | ||
webpack( | ||
conf( | ||
{ | ||
entry: "./test/fixtures/error.js" | ||
}, | ||
{ | ||
formatter: "table" | ||
} | ||
), | ||
function(err, stats) { | ||
if (err) { | ||
throw err; | ||
} | ||
|
||
// console.log("### Here is a example of official formatter") | ||
// console.log( | ||
// "# " + | ||
// stats.compilation.errors[0].message | ||
// .split("\n") | ||
// .join("\n# ") | ||
// ) | ||
t.truthy( | ||
stats.compilation.errors[0].message, | ||
"webpack have some output with official formatter" | ||
); | ||
t.end(); | ||
} | ||
); | ||
}); |