Skip to content

Commit

Permalink
fix: Turn of TS's exactOptionalPropertyTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
jhnns committed Dec 11, 2024
1 parent 0557a83 commit 4069985
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions eslint/presets/typescript.test/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import test from "./test.json" with { type: "json" };
// eslint-disable-next-line @typescript-eslint/naming-convention
const snake_case = 123;

// Should not complain about missing dot-notation here since
// we're using TS's noPropertyAccessFromIndexSignature
process.env["SOME_ENV_VAR"] = "test";

class SomeClass {
#someProp = true;
private someEventHandler = () => {
Expand Down
4 changes: 3 additions & 1 deletion typescript/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"compilerOptions": {
"checkJs": true,
"esModuleInterop": true,
"exactOptionalPropertyTypes": true,
// We decided to turn off `exactOptionalPropertyTypes` because it's too strict
// by complaining about too much unproblematic code. We may revisit this decision later.
"exactOptionalPropertyTypes": false,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"lib": ["DOM", "ESNext"],
Expand Down

0 comments on commit 4069985

Please sign in to comment.