@parcel/validator-eslint 2.8.4-nightly.0 → 2.9.1
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 +0 -21
- package/package.json +5 -5
package/lib/EslintValidator.js
CHANGED
|
@@ -4,51 +4,36 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
function _plugin() {
|
|
9
8
|
const data = require("@parcel/plugin");
|
|
10
|
-
|
|
11
9
|
_plugin = function () {
|
|
12
10
|
return data;
|
|
13
11
|
};
|
|
14
|
-
|
|
15
12
|
return data;
|
|
16
13
|
}
|
|
17
|
-
|
|
18
14
|
function _diagnostic() {
|
|
19
15
|
const data = require("@parcel/diagnostic");
|
|
20
|
-
|
|
21
16
|
_diagnostic = function () {
|
|
22
17
|
return data;
|
|
23
18
|
};
|
|
24
|
-
|
|
25
19
|
return data;
|
|
26
20
|
}
|
|
27
|
-
|
|
28
21
|
function _eslint() {
|
|
29
22
|
const data = _interopRequireDefault(require("eslint"));
|
|
30
|
-
|
|
31
23
|
_eslint = function () {
|
|
32
24
|
return data;
|
|
33
25
|
};
|
|
34
|
-
|
|
35
26
|
return data;
|
|
36
27
|
}
|
|
37
|
-
|
|
38
28
|
function _assert() {
|
|
39
29
|
const data = _interopRequireDefault(require("assert"));
|
|
40
|
-
|
|
41
30
|
_assert = function () {
|
|
42
31
|
return data;
|
|
43
32
|
};
|
|
44
|
-
|
|
45
33
|
return data;
|
|
46
34
|
}
|
|
47
|
-
|
|
48
35
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
49
|
-
|
|
50
36
|
let cliEngine = null;
|
|
51
|
-
|
|
52
37
|
var _default = new (_plugin().Validator)({
|
|
53
38
|
async validate({
|
|
54
39
|
asset
|
|
@@ -56,7 +41,6 @@ var _default = new (_plugin().Validator)({
|
|
|
56
41
|
if (!cliEngine) {
|
|
57
42
|
cliEngine = new (_eslint().default.CLIEngine)({});
|
|
58
43
|
}
|
|
59
|
-
|
|
60
44
|
let code = await asset.getCode();
|
|
61
45
|
(0, _assert().default)(cliEngine != null);
|
|
62
46
|
let report = cliEngine.executeOnText(code, asset.filePath);
|
|
@@ -64,7 +48,6 @@ var _default = new (_plugin().Validator)({
|
|
|
64
48
|
warnings: [],
|
|
65
49
|
errors: []
|
|
66
50
|
};
|
|
67
|
-
|
|
68
51
|
if (report.results.length > 0) {
|
|
69
52
|
for (let result of report.results) {
|
|
70
53
|
if (!result.errorCount && !result.warningCount) continue;
|
|
@@ -92,7 +75,6 @@ var _default = new (_plugin().Validator)({
|
|
|
92
75
|
message: `ESLint found **${result.errorCount}** __errors__ and **${result.warningCount}** __warnings__.`,
|
|
93
76
|
codeFrames: [codeframe]
|
|
94
77
|
};
|
|
95
|
-
|
|
96
78
|
if (result.errorCount > 0) {
|
|
97
79
|
validatorResult.errors.push(diagnostic);
|
|
98
80
|
} else {
|
|
@@ -100,10 +82,7 @@ var _default = new (_plugin().Validator)({
|
|
|
100
82
|
}
|
|
101
83
|
}
|
|
102
84
|
}
|
|
103
|
-
|
|
104
85
|
return validatorResult;
|
|
105
86
|
}
|
|
106
|
-
|
|
107
87
|
});
|
|
108
|
-
|
|
109
88
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcel/validator-eslint",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.1",
|
|
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": "2.
|
|
20
|
+
"parcel": "^2.9.1"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@parcel/plugin": "2.
|
|
24
|
-
"@parcel/utils": "2.
|
|
23
|
+
"@parcel/plugin": "2.9.1",
|
|
24
|
+
"@parcel/utils": "2.9.1",
|
|
25
25
|
"chalk": "^4.1.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"eslint": "^6.0.0 || ^7.0.0"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "5c5dc302b559f0b0d8c57b4d638aac521c879b70"
|
|
34
34
|
}
|