@xylabs/ts-scripts-yarn3 5.1.8 → 5.1.10

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/index.mjs CHANGED
@@ -2133,11 +2133,13 @@ async function getRootESLintConfig() {
2133
2133
  __name(getRootESLintConfig, "getRootESLintConfig");
2134
2134
  function getFiles(dir, ignoreFolders) {
2135
2135
  const currentDirectory = cwd4();
2136
+ const subDirectory = dir.split(currentDirectory)[1];
2137
+ if (ignoreFolders.includes(subDirectory)) return [];
2138
+ console.log(subDirectory);
2136
2139
  return readdirSync(dir, {
2137
2140
  withFileTypes: true
2138
2141
  }).flatMap((dirent) => {
2139
2142
  const res = path7.resolve(dir, dirent.name);
2140
- const subDirectory = dir.split(currentDirectory)[1];
2141
2143
  const relativePath = subDirectory ? `${subDirectory}/${dirent.name}` : dirent.name;
2142
2144
  const ignoreMatchers = ignoreFolders.map((pattern) => picomatch(pattern));
2143
2145
  if (ignoreMatchers.some((isMatch) => isMatch(relativePath))) return [];
@@ -2155,7 +2157,10 @@ var packageLint = /* @__PURE__ */ __name(async (fix2 = false) => {
2155
2157
  "dist",
2156
2158
  "packages",
2157
2159
  ".git",
2158
- "build"
2160
+ "build",
2161
+ ".yarn",
2162
+ ".vscode",
2163
+ ".github"
2159
2164
  ];
2160
2165
  const engine = new ESLint3({
2161
2166
  baseConfig: [
@@ -2167,6 +2172,9 @@ var packageLint = /* @__PURE__ */ __name(async (fix2 = false) => {
2167
2172
  const files = getFiles(cwd4(), ignoreFolders);
2168
2173
  const lintResults = await engine.lintFiles(files);
2169
2174
  dumpMessages2(lintResults);
2175
+ if (fix2) {
2176
+ await ESLint3.outputFixes(lintResults);
2177
+ }
2170
2178
  return lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0);
2171
2179
  }, "packageLint");
2172
2180