@parcel/validator-eslint 2.0.0-beta.2 → 2.0.0-nightly.1004
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/lib/EslintValidator.js +2 -2
- package/package.json +5 -5
- package/src/EslintValidator.js +2 -2
- package/.babelrc +0 -3
package/lib/EslintValidator.js
CHANGED
|
@@ -69,6 +69,7 @@ var _default = new (_plugin().Validator)({
|
|
|
69
69
|
for (let result of report.results) {
|
|
70
70
|
if (!result.errorCount && !result.warningCount) continue;
|
|
71
71
|
let codeframe = {
|
|
72
|
+
filePath: asset.filePath,
|
|
72
73
|
code: result.source,
|
|
73
74
|
codeHighlights: result.messages.map(message => {
|
|
74
75
|
let start = {
|
|
@@ -89,8 +90,7 @@ var _default = new (_plugin().Validator)({
|
|
|
89
90
|
let diagnostic = {
|
|
90
91
|
origin: '@parcel/validator-eslint',
|
|
91
92
|
message: `ESLint found **${result.errorCount}** __errors__ and **${result.warningCount}** __warnings__.`,
|
|
92
|
-
|
|
93
|
-
codeFrame: codeframe
|
|
93
|
+
codeFrames: [codeframe]
|
|
94
94
|
};
|
|
95
95
|
|
|
96
96
|
if (result.errorCount > 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcel/validator-eslint",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-nightly.1004+47379bf8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"source": "src/EslintValidator.js",
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">= 12.0.0",
|
|
20
|
-
"parcel": "
|
|
20
|
+
"parcel": "2.0.0-nightly.1002+47379bf8"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@parcel/plugin": "2.0.0-
|
|
24
|
-
"@parcel/utils": "2.0.0-
|
|
23
|
+
"@parcel/plugin": "2.0.0-nightly.1004+47379bf8",
|
|
24
|
+
"@parcel/utils": "2.0.0-nightly.1004+47379bf8",
|
|
25
25
|
"chalk": "^4.1.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"eslint": "^6.0.0"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "47379bf8fabeb2cfe03ade8802d942388b153e5b"
|
|
34
34
|
}
|
package/src/EslintValidator.js
CHANGED
|
@@ -26,6 +26,7 @@ export default (new Validator({
|
|
|
26
26
|
if (!result.errorCount && !result.warningCount) continue;
|
|
27
27
|
|
|
28
28
|
let codeframe: DiagnosticCodeFrame = {
|
|
29
|
+
filePath: asset.filePath,
|
|
29
30
|
code: result.source,
|
|
30
31
|
codeHighlights: result.messages.map(message => {
|
|
31
32
|
let start = {
|
|
@@ -50,8 +51,7 @@ export default (new Validator({
|
|
|
50
51
|
let diagnostic = {
|
|
51
52
|
origin: '@parcel/validator-eslint',
|
|
52
53
|
message: `ESLint found **${result.errorCount}** __errors__ and **${result.warningCount}** __warnings__.`,
|
|
53
|
-
|
|
54
|
-
codeFrame: codeframe,
|
|
54
|
+
codeFrames: [codeframe],
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
if (result.errorCount > 0) {
|
package/.babelrc
DELETED