@pi-r/eslint 0.6.7 → 0.7.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/README.md +3 -6
- package/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
### @pi-r/eslint
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
https://e-mc.readthedocs.io/en/latest/document/plugins/built-in.html
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- [squared](https://squared.readthedocs.io)
|
|
7
|
-
|
|
8
|
-
## LICENSE
|
|
5
|
+
### LICENSE
|
|
9
6
|
|
|
10
7
|
MIT
|
package/index.js
CHANGED
|
@@ -5,7 +5,7 @@ module.exports = async function transform(context, value, options) {
|
|
|
5
5
|
const { pathname, filename } = options;
|
|
6
6
|
const timeStamp = Date.now();
|
|
7
7
|
const report = (await new context.ESLint(options.toBaseConfig()).lintText(value))[0];
|
|
8
|
-
if (report
|
|
8
|
+
if (report?.messages.length) {
|
|
9
9
|
const fatal = report.messages.filter(item => item.fatal).map(item => item.message);
|
|
10
10
|
if (fatal.length) {
|
|
11
11
|
throw new Error(fatal.join('\n\n'));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-r/eslint",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "eslint transform function for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/document": "^0.
|
|
23
|
+
"@e-mc/document": "^0.9.2",
|
|
24
24
|
"eslint": "^8.57.0"
|
|
25
25
|
}
|
|
26
26
|
}
|