mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-18 05:43:11 -05:00
Use built-in no-restricted-syntax to ban null instead of plugin, ban null type too (#58095)
This commit is contained in:
@@ -2394,7 +2394,7 @@ export function convertToJson(
|
||||
return false;
|
||||
|
||||
case SyntaxKind.NullKeyword:
|
||||
return null; // eslint-disable-line no-null/no-null
|
||||
return null; // eslint-disable-line no-restricted-syntax
|
||||
|
||||
case SyntaxKind.StringLiteral:
|
||||
if (!isDoubleQuotedString(valueExpression)) {
|
||||
@@ -2869,8 +2869,8 @@ export function setConfigFileInOptions(options: CompilerOptions, configFile: TsC
|
||||
}
|
||||
}
|
||||
|
||||
function isNullOrUndefined(x: any): x is null | undefined {
|
||||
return x === undefined || x === null; // eslint-disable-line no-null/no-null
|
||||
function isNullOrUndefined(x: any): x is null | undefined { // eslint-disable-line no-restricted-syntax
|
||||
return x === undefined || x === null; // eslint-disable-line no-restricted-syntax
|
||||
}
|
||||
|
||||
function directoryOfCombinedPath(fileName: string, basePath: string) {
|
||||
|
||||
Reference in New Issue
Block a user