Triage and fix some eslint rules (#55136)

This commit is contained in:
Jake Bailey 2023-07-24 13:53:12 -07:00 committed by GitHub
parent fac24ae4f7
commit d63af29eaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 10 deletions

View File

@ -34,6 +34,7 @@
"dot-notation": "error",
"eqeqeq": "error",
"no-caller": "error",
"no-constant-condition": ["error", { "checkLoops": false }],
"no-eval": "error",
"no-extra-bind": "error",
"no-new-func": "error",
@ -57,6 +58,13 @@
"prefer-object-spread": "error",
"unicode-bom": ["error", "never"],
// Enabled in eslint:recommended, but not applicable here
"no-extra-boolean-cast": "off",
"no-case-declarations": "off",
"no-cond-assign": "off",
"no-control-regex": "off",
"no-inner-declarations": "off",
// @typescript-eslint/eslint-plugin
"@typescript-eslint/naming-convention": [
"error",
@ -79,22 +87,15 @@
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
// Todo: For each of these, investigate whether we want to enable them
"@typescript-eslint/ban-types": "off",
"no-case-declarations": "off",
"no-cond-assign": "off",
"no-constant-condition": "off",
"no-control-regex": "off",
"no-debugger": "off",
"no-extra-boolean-cast": "off",
"no-inner-declarations": "off",
"no-useless-escape": "off",
"prefer-rest-params": "off",
"prefer-spread": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
// Pending https://github.com/typescript-eslint/typescript-eslint/issues/4820

View File

@ -193,6 +193,7 @@ export namespace Debug {
}
export function fail(message?: string, stackCrawlMark?: AnyFunction): never {
// eslint-disable-next-line no-debugger
debugger;
const e = new Error(message ? `Debug Failure. ${message}` : "Debug Failure.");
if ((Error as any).captureStackTrace) {

View File

@ -604,7 +604,6 @@ export function createWatchProgram<T extends BuilderProgram>(host: WatchCompiler
if (hasChangedCompilerOptions) {
newLine = updateNewLine();
if (program && changesAffectModuleResolution(program.getCompilerOptions(), compilerOptions)) {
debugger;
resolutionCache.onChangesAffectModuleResolution();
}
}