@apdesign/code-style-react 1.2.0 → 1.2.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/package.json +1 -1
- package/scripts/runEslint.js +5 -2
package/package.json
CHANGED
package/scripts/runEslint.js
CHANGED
@@ -76,8 +76,11 @@ async function runEslint(targetPathArg) {
|
|
76
76
|
|
77
77
|
let targetBranch = 'master';
|
78
78
|
if (targetPath !== process.cwd()) {
|
79
|
-
const
|
80
|
-
|
79
|
+
const pkgName = path.basename(targetPath); // 直接取传入的目录名
|
80
|
+
if (pkgName && pkgName.includes('-')) {
|
81
|
+
const suffix = pkgName.split('-').pop();
|
82
|
+
targetBranch = `master-${suffix}`;
|
83
|
+
}
|
81
84
|
}
|
82
85
|
|
83
86
|
// 获取当前分支
|