Skip to content

Commit d63af29

Browse files
authored
Triage and fix some eslint rules (#55136)
1 parent fac24ae commit d63af29

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

.eslintrc.json

+10-9
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"dot-notation": "error",
3535
"eqeqeq": "error",
3636
"no-caller": "error",
37+
"no-constant-condition": ["error", { "checkLoops": false }],
3738
"no-eval": "error",
3839
"no-extra-bind": "error",
3940
"no-new-func": "error",
@@ -57,6 +58,13 @@
5758
"prefer-object-spread": "error",
5859
"unicode-bom": ["error", "never"],
5960

61+
// Enabled in eslint:recommended, but not applicable here
62+
"no-extra-boolean-cast": "off",
63+
"no-case-declarations": "off",
64+
"no-cond-assign": "off",
65+
"no-control-regex": "off",
66+
"no-inner-declarations": "off",
67+
6068
// @typescript-eslint/eslint-plugin
6169
"@typescript-eslint/naming-convention": [
6270
"error",
@@ -79,22 +87,15 @@
7987
"@typescript-eslint/no-namespace": "off",
8088
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
8189
"@typescript-eslint/no-var-requires": "off",
90+
"@typescript-eslint/no-empty-interface": "off",
91+
"@typescript-eslint/no-explicit-any": "off",
8292

8393
// Todo: For each of these, investigate whether we want to enable them ✨
8494
"@typescript-eslint/ban-types": "off",
85-
"no-case-declarations": "off",
86-
"no-cond-assign": "off",
87-
"no-constant-condition": "off",
88-
"no-control-regex": "off",
89-
"no-debugger": "off",
90-
"no-extra-boolean-cast": "off",
91-
"no-inner-declarations": "off",
9295
"no-useless-escape": "off",
9396
"prefer-rest-params": "off",
9497
"prefer-spread": "off",
9598
"@typescript-eslint/no-empty-function": "off",
96-
"@typescript-eslint/no-empty-interface": "off",
97-
"@typescript-eslint/no-explicit-any": "off",
9899
"@typescript-eslint/no-unused-vars": "off",
99100

100101
// Pending https://github.com/typescript-eslint/typescript-eslint/issues/4820

src/compiler/debug.ts

+1
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ export namespace Debug {
193193
}
194194

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

src/compiler/watchPublic.ts

-1
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,6 @@ export function createWatchProgram<T extends BuilderProgram>(host: WatchCompiler
604604
if (hasChangedCompilerOptions) {
605605
newLine = updateNewLine();
606606
if (program && changesAffectModuleResolution(program.getCompilerOptions(), compilerOptions)) {
607-
debugger;
608607
resolutionCache.onChangesAffectModuleResolution();
609608
}
610609
}

0 commit comments

Comments
 (0)