@apdesign/code-style-react 1.1.8 → 1.1.9
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/cli.js +1 -1
- package/package.json +1 -1
- package/scripts/runEslint.js +3 -3
package/cli.js
CHANGED
package/package.json
CHANGED
package/scripts/runEslint.js
CHANGED
@@ -6,7 +6,7 @@ let fs;
|
|
6
6
|
let glob;
|
7
7
|
let ESLint;
|
8
8
|
|
9
|
-
async function runEslint() {
|
9
|
+
async function runEslint(targetPathArg) {
|
10
10
|
try {
|
11
11
|
if (typeof require !== 'undefined') {
|
12
12
|
// CommonJS
|
@@ -14,7 +14,7 @@ async function runEslint() {
|
|
14
14
|
path = require('path');
|
15
15
|
fs = require('fs');
|
16
16
|
glob = require('glob');
|
17
|
-
ESLint = require('eslint').ESLint;
|
17
|
+
ESLint = require('eslint').ESLint;
|
18
18
|
} else {
|
19
19
|
// ESM
|
20
20
|
spawnSync = await import('node:child_process').spawnSync;
|
@@ -25,7 +25,7 @@ async function runEslint() {
|
|
25
25
|
}
|
26
26
|
|
27
27
|
// 参数解析
|
28
|
-
const args = process.argv.slice(2);
|
28
|
+
const args = targetPathArg || process.argv.slice(2);
|
29
29
|
|
30
30
|
// 检查是否有分支参数 (--branch <branchName>)
|
31
31
|
let branchArg = null;
|