@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/ts-scripts-yarn3",
3
- "version": "5.1.8",
3
+ "version": "5.1.10",
4
4
  "description": "TypeScript project scripts",
5
5
  "keywords": [
6
6
  "xylabs",
@@ -93,8 +93,8 @@
93
93
  "@swc/core": "^1.11.5",
94
94
  "@types/node": "^22.13.5",
95
95
  "@types/yargs": "^17.0.33",
96
- "@xylabs/tsconfig": "^5.1.8",
97
- "@xylabs/tsconfig-dom": "^5.1.8",
96
+ "@xylabs/tsconfig": "^5.1.10",
97
+ "@xylabs/tsconfig-dom": "^5.1.10",
98
98
  "async-mutex": "^0.5.0",
99
99
  "chalk": "^5.4.1",
100
100
  "cosmiconfig": "^9.0.0",
@@ -136,7 +136,7 @@
136
136
  "@types/license-checker": "^25.0.6",
137
137
  "@types/parse-git-config": "^3.0.4",
138
138
  "@types/picomatch": "^3.0.2",
139
- "@xylabs/tsconfig": "^5.1.8",
139
+ "@xylabs/tsconfig": "^5.1.10",
140
140
  "publint": "^0.3.7",
141
141
  "rimraf": "^6.0.1",
142
142
  "typescript": "^5.7.3"
@@ -40,10 +40,12 @@ async function getRootESLintConfig() {
40
40
 
41
41
  function getFiles(dir: string, ignoreFolders: string[]): string[] {
42
42
  const currentDirectory = cwd()
43
+ const subDirectory = dir.split(currentDirectory)[1]
44
+ if (ignoreFolders.includes(subDirectory)) return []
45
+ console.log(subDirectory)
43
46
  return readdirSync(dir, { withFileTypes: true })
44
47
  .flatMap((dirent) => {
45
48
  const res = path.resolve(dir, dirent.name)
46
- const subDirectory = dir.split(currentDirectory)[1]
47
49
  const relativePath = subDirectory ? `${subDirectory}/${dirent.name}` : dirent.name
48
50
 
49
51
  const ignoreMatchers = ignoreFolders.map(pattern => picomatch(pattern))
@@ -62,7 +64,7 @@ export const packageLint = async (fix = false) => {
62
64
  const { default: eslintConfig } = await import(configPath.href)
63
65
 
64
66
  // List of folders to ignore
65
- const ignoreFolders = ['node_modules', 'dist', 'packages', '.git', 'build']
67
+ const ignoreFolders = ['node_modules', 'dist', 'packages', '.git', 'build', '.yarn', '.vscode', '.github']
66
68
 
67
69
  const engine = new ESLint({
68
70
  baseConfig: [...eslintConfig], fix, warnIgnored: false,
@@ -73,5 +75,9 @@ export const packageLint = async (fix = false) => {
73
75
 
74
76
  dumpMessages(lintResults)
75
77
 
78
+ if (fix) {
79
+ await ESLint.outputFixes(lintResults)
80
+ }
81
+
76
82
  return lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0)
77
83
  }