@pi-r/eslint 0.10.0 → 0.10.2
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/index.js +2 -3
- package/package.json +4 -5
package/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const path = require("node:path");
|
|
3
|
-
const Types = require("@e-mc/types");
|
|
4
3
|
const Document = require("@e-mc/document");
|
|
5
4
|
const eslint_1 = require("eslint");
|
|
6
5
|
module.exports = async function transform(context, value, options) {
|
|
@@ -21,12 +20,12 @@ module.exports = async function transform(context, value, options) {
|
|
|
21
20
|
if (fatal.length > 0) {
|
|
22
21
|
throw new Error(fatal.join('\n\n'));
|
|
23
22
|
}
|
|
24
|
-
const attr = Document.hasLogType(
|
|
23
|
+
const attr = Document.hasLogType(32768) ? 'logQueued' : 'logAppend';
|
|
25
24
|
if (process.env.ESLINT_FORMATTER_NAME) {
|
|
26
25
|
const formatter = await instance.loadFormatter(process.env.ESLINT_FORMATTER_NAME);
|
|
27
26
|
const output = await formatter.format(result);
|
|
28
27
|
options.out[attr] = [{
|
|
29
|
-
type:
|
|
28
|
+
type: 4,
|
|
30
29
|
value: output.replace('<text>', 'File location: Unknown'),
|
|
31
30
|
timeStamp, duration: Date.now() - timeStamp,
|
|
32
31
|
from: 'eslint', source: process.env.ESLINT_FORMATTER_NAME
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-r/eslint",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"description": "ESLint transform function for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -19,9 +19,8 @@
|
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@e-mc/document": "^0.12.
|
|
23
|
-
"@
|
|
24
|
-
"
|
|
25
|
-
"eslint": "^9.25.1"
|
|
22
|
+
"@e-mc/document": "^0.12.5",
|
|
23
|
+
"@eslint/js": "^9.33.0",
|
|
24
|
+
"eslint": "^9.33.0"
|
|
26
25
|
}
|
|
27
26
|
}
|