Skip to content

Commit afaefbb

Browse files
JounQinljharb
authored andcommitted
[Refactor] ExportMap: rename tsConfig to tsconfig
1 parent eaa1591 commit afaefbb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/ExportMap.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ let ts;
2424
const log = debug('eslint-plugin-import:ExportMap');
2525

2626
const exportCache = new Map();
27-
const tsConfigCache = new Map();
27+
const tsconfigCache = new Map();
2828

2929
export default class ExportMap {
3030
constructor(path) {
@@ -549,20 +549,20 @@ ExportMap.parse = function (path, content, context) {
549549
const source = makeSourceCode(content, ast);
550550

551551
function readTsConfig(context) {
552-
const tsConfigInfo = tsConfigLoader({
552+
const tsconfigInfo = tsConfigLoader({
553553
cwd: context.parserOptions && context.parserOptions.tsconfigRootDir || process.cwd(),
554554
getEnv: (key) => process.env[key],
555555
});
556556
try {
557-
if (tsConfigInfo.tsConfigPath !== undefined) {
557+
if (tsconfigInfo.tsConfigPath !== undefined) {
558558
// Projects not using TypeScript won't have `typescript` installed.
559559
if (!ts) { ts = require('typescript'); } // eslint-disable-line import/no-extraneous-dependencies
560560

561-
const configFile = ts.readConfigFile(tsConfigInfo.tsConfigPath, ts.sys.readFile);
561+
const configFile = ts.readConfigFile(tsconfigInfo.tsConfigPath, ts.sys.readFile);
562562
return ts.parseJsonConfigFileContent(
563563
configFile.config,
564564
ts.sys,
565-
dirname(tsConfigInfo.tsConfigPath),
565+
dirname(tsconfigInfo.tsConfigPath),
566566
);
567567
}
568568
} catch (e) {
@@ -576,10 +576,10 @@ ExportMap.parse = function (path, content, context) {
576576
const cacheKey = hashObject({
577577
tsconfigRootDir: context.parserOptions && context.parserOptions.tsconfigRootDir,
578578
}).digest('hex');
579-
let tsConfig = tsConfigCache.get(cacheKey);
579+
let tsConfig = tsconfigCache.get(cacheKey);
580580
if (typeof tsConfig === 'undefined') {
581581
tsConfig = readTsConfig(context);
582-
tsConfigCache.set(cacheKey, tsConfig);
582+
tsconfigCache.set(cacheKey, tsConfig);
583583
}
584584

585585
return tsConfig && tsConfig.options ? tsConfig.options.esModuleInterop : false;

0 commit comments

Comments
 (0)