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.
@@ -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
- const basePath = path.isAbsolute(tsConfig.extends)
647
- ? tsConfig.extends
648
- : path.resolve(path.dirname(tsConfigPath), tsConfig.extends);
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xo",
3
- "version": "0.52.0",
3
+ "version": "0.52.1",
4
4
  "description": "JavaScript/TypeScript linter (ESLint wrapper) with great defaults",
5
5
  "license": "MIT",
6
6
  "repository": "xojs/xo",