Skip to content

Commit 42d9b2a

Browse files
ci(lint): auto-fix
1 parent 36e4b37 commit 42d9b2a

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

packages/cli/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ import glob = require('glob');
191191
placeholder: shortTsconfig ? `${shortTsconfig} (${parseCommonLine(tsconfig!).fileNames.length} input files)` : 'No tsconfig.json/jsconfig.json found, please enter the path to the tsconfig.json/jsconfig.json file.',
192192
defaultValue: shortTsconfig,
193193
validate(value) {
194-
value ||= shortTsconfig!;
194+
value ||= shortTsconfig;
195195
try {
196196
require.resolve(value, { paths: [process.cwd()] });
197197
} catch {

packages/config/lib/build.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Config } from './types';
22
import { watchConfigFile } from './watch';
33

4-
export async function buildConfigFile(configFilePath: string, createHash?: (path: string) => string): Promise<Config> {
4+
export function buildConfigFile(configFilePath: string, createHash?: (path: string) => string): Promise<Config> {
55
return new Promise((resolve, reject) => {
66
watchConfigFile(
77
configFilePath,
@@ -14,7 +14,7 @@ export async function buildConfigFile(configFilePath: string, createHash?: (path
1414
}
1515
},
1616
false,
17-
createHash,
17+
createHash
1818
);
1919
});
2020
}

packages/config/lib/watch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export async function watchConfigFile(
77
configFilePath: string,
88
onBuild: (config: Config | undefined, result: esbuild.BuildResult) => void,
99
watch = true,
10-
createHash: (path: string) => string = btoa,
10+
createHash: (path: string) => string = btoa
1111
) {
1212
const outDir = _path.resolve(configFilePath, '..', 'node_modules', '.tsslint');
1313
const outFileName = createHash(_path.relative(outDir, configFilePath)) + '.mjs';

packages/core/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export function createLinter(ctx: ProjectContext, config: Config, withStack: boo
106106
const text = ctx.languageServiceHost.readFile(fileName) ?? '';
107107
sourceFiles.set(
108108
fileName,
109-
ts.createSourceFile(fileName, text, ts.ScriptTarget.Latest, true),
109+
ts.createSourceFile(fileName, text, ts.ScriptTarget.Latest, true)
110110
);
111111
}
112112
const stackFile = sourceFiles.get(fileName);

packages/typescript-plugin/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type * as ts from 'typescript';
66

77
const languageServiceDecorators = new WeakMap<ts.server.Project, ReturnType<typeof decorateLanguageService>>();
88

9-
const init: ts.server.PluginModuleFactory = (modules) => {
9+
const init: ts.server.PluginModuleFactory = modules => {
1010
const { typescript: ts } = modules;
1111
const pluginModule: ts.server.PluginModule = {
1212
create(info) {
@@ -18,7 +18,7 @@ const init: ts.server.PluginModuleFactory = (modules) => {
1818
if (tsconfig) {
1919
languageServiceDecorators.set(
2020
info.project,
21-
decorateLanguageService(ts, tsconfig, info),
21+
decorateLanguageService(ts, tsconfig, info)
2222
);
2323
}
2424
}
@@ -36,7 +36,7 @@ export = init;
3636
function decorateLanguageService(
3737
ts: typeof import('typescript'),
3838
tsconfig: string,
39-
info: ts.server.PluginCreateInfo,
39+
info: ts.server.PluginCreateInfo
4040
) {
4141

4242
const {
@@ -182,7 +182,7 @@ function decorateLanguageService(
182182

183183
configFileBuildContext = await watchConfigFile(
184184
configFile,
185-
async (_config, { errors, warnings }) => {
185+
(_config, { errors, warnings }) => {
186186
config = _config;
187187
configFileDiagnostics = [
188188
...errors.map(error => [error, ts.DiagnosticCategory.Error] as const),
@@ -218,7 +218,7 @@ function decorateLanguageService(
218218
info.project.refreshDiagnostics();
219219
},
220220
true,
221-
ts.sys.createHash,
221+
ts.sys.createHash
222222
);
223223
}
224224
}

0 commit comments

Comments
 (0)