xo 0.52.0 → 0.52.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/lib/options-manager.js +5 -5
- package/package.json +1 -1
package/lib/options-manager.js
CHANGED
|
@@ -2,6 +2,7 @@ import {existsSync, promises as fs} from 'node:fs';
|
|
|
2
2
|
import process from 'node:process';
|
|
3
3
|
import os from 'node:os';
|
|
4
4
|
import path from 'node:path';
|
|
5
|
+
import {createRequire} from 'node:module';
|
|
5
6
|
import arrify from 'arrify';
|
|
6
7
|
import {mergeWith, flow, pick} from 'lodash-es';
|
|
7
8
|
import {findUpSync} from 'find-up';
|
|
@@ -643,11 +644,10 @@ async function recursiveBuildTsConfig(tsConfig, tsConfigPath) {
|
|
|
643
644
|
}
|
|
644
645
|
|
|
645
646
|
// If any of the following are missing, then we need to look up the base config as it could apply
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
const baseTsConfig = await readJson(basePath);
|
|
647
|
+
// Use node resolution
|
|
648
|
+
const require = createRequire(tsConfigPath);
|
|
649
|
+
const basePath = require.resolve(tsConfig.extends);
|
|
650
|
+
const baseTsConfig = JSON5.parse(await fs.readFile(basePath));
|
|
651
651
|
|
|
652
652
|
delete tsConfig.extends;
|
|
653
653
|
|