@odg/eslint-config 3.2.7 → 3.2.8
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/lint.mjs +22 -0
- package/package.json +7 -2
package/lint.mjs
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawn } from "node:child_process";
|
|
4
|
+
import { resolve } from "node:path";
|
|
5
|
+
import process from "node:process";
|
|
6
|
+
|
|
7
|
+
const USER_ARGUMENTS_START_INDEX = 2;
|
|
8
|
+
const eslintCliPath = resolve(process.cwd(), "node_modules/eslint/bin/eslint.js");
|
|
9
|
+
const eslintArguments = process.argv.slice(USER_ARGUMENTS_START_INDEX);
|
|
10
|
+
|
|
11
|
+
const eslintProcess = spawn(process.execPath, [ eslintCliPath, ...eslintArguments ], {
|
|
12
|
+
stdio: "inherit",
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
eslintProcess.on("error", (error) => {
|
|
16
|
+
process.stderr.write(`${error.message}\n`);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
eslintProcess.on("close", (code) => {
|
|
21
|
+
process.exit(code ?? 0);
|
|
22
|
+
});
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odg/eslint-config",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.8",
|
|
4
4
|
"description": "Linter for JavaScript And Typescript project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.mjs",
|
|
7
7
|
"types": "index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"odg:lint": "./lint.mjs"
|
|
10
|
+
},
|
|
8
11
|
"exports": {
|
|
9
12
|
".": {
|
|
10
13
|
"types": "./index.d.ts",
|
|
@@ -14,7 +17,8 @@
|
|
|
14
17
|
"author": "Dragons Gamers <https://www.linkedin.com/in/victor-alves-odgodinho>",
|
|
15
18
|
"scripts": {
|
|
16
19
|
"lint": "eslint",
|
|
17
|
-
"lint:fix": "eslint --fix"
|
|
20
|
+
"lint:fix": "eslint --fix",
|
|
21
|
+
"odg:lint": "eslint"
|
|
18
22
|
},
|
|
19
23
|
"engines": {
|
|
20
24
|
"node": ">=24.0.0"
|
|
@@ -70,6 +74,7 @@
|
|
|
70
74
|
"files": [
|
|
71
75
|
"./index.d.ts",
|
|
72
76
|
"./index.mjs",
|
|
77
|
+
"./lint.mjs",
|
|
73
78
|
"./rules/"
|
|
74
79
|
],
|
|
75
80
|
"bugs": {
|