File tree Expand file tree Collapse file tree 2 files changed +6
-20
lines changed
packages/plugin-typescript/src/lib Expand file tree Collapse file tree 2 files changed +6
-20
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,11 @@ import { join } from 'node:path';
33import * as process from 'node:process' ;
44import type { CompilerOptions } from 'typescript' ;
55import { TS_ERROR_CODES } from './runner/ts-error-codes.js' ;
6+ import type { DiagnosticsOptions } from './runner/ts-runner.js' ;
67import {
78 loadTargetConfig ,
89 loadTsConfigDefaultsByVersion ,
910} from './runner/utils.js' ;
10- import type { TypescriptPluginOptions } from './types.js' ;
1111
1212/**
1313 * It will evaluate if the option strict is enabled. If so, it must enable all it's dependencies.
@@ -36,9 +36,7 @@ export function handleCompilerOptionStrict(options: CompilerOptions) {
3636 * later if existing
3737 * @param options Plugin options
3838 */
39- export async function normalizeCompilerOptions (
40- options : Required < Pick < TypescriptPluginOptions , 'tsConfigPath' > > ,
41- ) {
39+ export async function normalizeCompilerOptions ( options : DiagnosticsOptions ) {
4240 const { tsConfigPath } = options ;
4341 const { compilerOptions : defaultCompilerOptions } =
4442 await loadTsConfigDefaultsByVersion ( ) ;
Original file line number Diff line number Diff line change 11/* eslint-disable @typescript-eslint/no-magic-numbers, unicorn/numeric-separators-style */
22
3- /**
4- * Strict grouping: https://github.com/microsoft/TypeScript/blob/56a08250f3516b3f5bc120d6c7ab4450a9a69352/src/compiler/utilities.ts Line 9113
5- * noImplicitThis: {
6- * dependencies: ["strict"],
7- * computeValue: compilerOptions => {
8- * return getStrictOptionValue(compilerOptions, "noImplicitThis");
9- * },
10- * },
11- * Line 9262
12- * export function getStrictOptionValue(compilerOptions: CompilerOptions, flag: StrictOptionName): boolean {
13- * return compilerOptions[flag] === undefined ? !!compilerOptions.strict : !!compilerOptions[flag];
14- * }
15- * https://github.com/microsoft/TypeScript/blob/56a08250f3516b3f5bc120d6c7ab4450a9a69352/src/compiler/utilities.ts#L9262
16- */
17-
183/** This is the list of error codes that can be triggered by the TypeScript compiler.
19- * It's divided into: category -> compiler option -> error codes (that might trigger)
4+ * It's divided into: group -> compiler option as audit -> error codes
5+ *
6+ * Source:
7+ * https://github.com/microsoft/TypeScript/blob/56a08250f3516b3f5bc120d6c7ab4450a9a69352/src/compiler/diagnosticMessages.json
208 */
219export const TS_ERROR_CODES = {
2210 languageAndEnvironment : {
You can’t perform that action at this time.
0 commit comments