@xylabs/ts-scripts-yarn3 5.1.8 → 5.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/dist/actions/index.mjs +10 -2
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/package/index.mjs +10 -2
- package/dist/actions/package/index.mjs.map +1 -1
- package/dist/actions/package/lint.mjs +10 -2
- package/dist/actions/package/lint.mjs.map +1 -1
- package/dist/bin/package/fix.mjs +10 -2
- package/dist/bin/package/fix.mjs.map +1 -1
- package/dist/bin/package/lint.mjs +10 -2
- package/dist/bin/package/lint.mjs.map +1 -1
- package/dist/index.mjs +10 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/actions/package/lint.ts +8 -2
package/dist/actions/index.mjs
CHANGED
|
@@ -2039,11 +2039,13 @@ async function getRootESLintConfig() {
|
|
|
2039
2039
|
__name(getRootESLintConfig, "getRootESLintConfig");
|
|
2040
2040
|
function getFiles(dir, ignoreFolders) {
|
|
2041
2041
|
const currentDirectory = cwd4();
|
|
2042
|
+
const subDirectory = dir.split(currentDirectory)[1];
|
|
2043
|
+
if (ignoreFolders.includes(subDirectory)) return [];
|
|
2044
|
+
console.log("subDirectory:", subDirectory);
|
|
2042
2045
|
return readdirSync(dir, {
|
|
2043
2046
|
withFileTypes: true
|
|
2044
2047
|
}).flatMap((dirent) => {
|
|
2045
2048
|
const res = path7.resolve(dir, dirent.name);
|
|
2046
|
-
const subDirectory = dir.split(currentDirectory)[1];
|
|
2047
2049
|
const relativePath = subDirectory ? `${subDirectory}/${dirent.name}` : dirent.name;
|
|
2048
2050
|
const ignoreMatchers = ignoreFolders.map((pattern) => picomatch(pattern));
|
|
2049
2051
|
if (ignoreMatchers.some((isMatch) => isMatch(relativePath))) return [];
|
|
@@ -2061,7 +2063,10 @@ var packageLint = /* @__PURE__ */ __name(async (fix2 = false) => {
|
|
|
2061
2063
|
"dist",
|
|
2062
2064
|
"packages",
|
|
2063
2065
|
".git",
|
|
2064
|
-
"build"
|
|
2066
|
+
"build",
|
|
2067
|
+
".yarn",
|
|
2068
|
+
".vscode",
|
|
2069
|
+
".github"
|
|
2065
2070
|
];
|
|
2066
2071
|
const engine = new ESLint3({
|
|
2067
2072
|
baseConfig: [
|
|
@@ -2073,6 +2078,9 @@ var packageLint = /* @__PURE__ */ __name(async (fix2 = false) => {
|
|
|
2073
2078
|
const files = getFiles(cwd4(), ignoreFolders);
|
|
2074
2079
|
const lintResults = await engine.lintFiles(files);
|
|
2075
2080
|
dumpMessages2(lintResults);
|
|
2081
|
+
if (fix2) {
|
|
2082
|
+
await ESLint3.outputFixes(lintResults);
|
|
2083
|
+
}
|
|
2076
2084
|
return lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0);
|
|
2077
2085
|
}, "packageLint");
|
|
2078
2086
|
|