Skip to content

Commit 8708d82

Browse files
authored
Don't complain about unmatched comment directives in unchecked JS files (#1188)
1 parent 77ad8f7 commit 8708d82

File tree

3 files changed

+3
-121
lines changed

3 files changed

+3
-121
lines changed

internal/compiler/program.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,11 @@ func (p *Program) getSemanticDiagnosticsForFile(ctx context.Context, sourceFile
452452
return nil
453453
}
454454

455+
// !!! This should be rewritten to work like getBindAndCheckDiagnosticsForFileNoCache.
456+
455457
isPlainJS := ast.IsPlainJSFile(sourceFile, compilerOptions.CheckJs)
456458
if isPlainJS {
457-
diags = core.Filter(diags, func(d *ast.Diagnostic) bool {
459+
return core.Filter(diags, func(d *ast.Diagnostic) bool {
458460
return plainJSErrors.Has(d.Code())
459461
})
460462
}

testdata/baselines/reference/submodule/conformance/spellingUncheckedJS.errors.txt

Lines changed: 0 additions & 58 deletions
This file was deleted.

testdata/baselines/reference/submoduleAccepted/conformance/spellingUncheckedJS.errors.txt.diff

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)