@naturalcycles/dev-lib 19.31.0 → 19.31.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.
@@ -128,13 +128,16 @@ export function runBiomeEslintPrettier(match, dir) {
128
128
  configDir = '.'
129
129
  }
130
130
 
131
+ const cwd = process.cwd()
131
132
  const eslintConfigPath = `${configDir}/eslint.config.js`
132
- const tsconfigPath = `${configDir}/tsconfig.json`
133
+ const tsconfigPath = [cwd, configDir !== '.' && configDir, 'tsconfig.json']
134
+ .filter(Boolean)
135
+ .join('/')
133
136
 
134
137
  return [
135
138
  biomeCmd,
136
139
  eslintConfigPath &&
137
- `${eslintCmd} --config ${eslintConfigPath} --parser-options=tsconfigRootDir:. --parser-options=project:${tsconfigPath} --cache-location node_modules/.cache/eslint_${dir}`,
140
+ `${eslintCmd} --config ${eslintConfigPath} --parser-options=project:${tsconfigPath} --cache-location node_modules/.cache/eslint_${dir}`,
138
141
  prettierCmd,
139
142
  ]
140
143
  .filter(Boolean)
package/dist/lint.util.js CHANGED
@@ -117,12 +117,16 @@ async function runESLint(dir, extensions = eslintExtensions.split(','), fix = tr
117
117
  if (dir === 'src') {
118
118
  configDir = '.';
119
119
  }
120
+ const cwd = process.cwd();
120
121
  const eslintConfigPath = `${configDir}/eslint.config.js`;
121
- const tsconfigPath = `${configDir}/tsconfig.json`;
122
+ const tsconfigPath = [cwd, configDir !== '.' && configDir, 'tsconfig.json']
123
+ .filter(Boolean)
124
+ .join('/');
122
125
  if (!existsSync(dir) || !existsSync(eslintConfigPath) || !existsSync(tsconfigPath)) {
123
126
  // faster to bail-out like this
124
127
  return;
125
128
  }
129
+ // const tsconfigRootDir = [cwd, configDir !== '.' && configDir].filter(Boolean).join('/')
126
130
  const eslintPath = findPackageBinPath('eslint', 'eslint');
127
131
  const cacheLocation = `node_modules/.cache/eslint_${dir}`;
128
132
  const cacheFound = existsSync(cacheLocation);
@@ -135,7 +139,7 @@ async function runESLint(dir, extensions = eslintExtensions.split(','), fix = tr
135
139
  `${dir}/**/*.{${extensions.join(',')}}`,
136
140
  `--parser-options=project:${tsconfigPath}`,
137
141
  // The next line fixes the `typescript-eslint` 8.37 bug of resolving tsconfig.json
138
- `--parser-options=tsconfigRootDir:.`,
142
+ // `--parser-options=tsconfigRootDir:${tsconfigRootDir}`,
139
143
  ESLINT_CONCURRENCY && `--concurrency=${ESLINT_CONCURRENCY}`,
140
144
  '--cache',
141
145
  '--cache-location',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
3
  "type": "module",
4
- "version": "19.31.0",
4
+ "version": "19.31.1",
5
5
  "dependencies": {
6
6
  "@biomejs/biome": "^2",
7
7
  "@commitlint/cli": "^19",