headintheclouddev / typings-suitescript-2.0

TypeScript typings for SuiteScript version 2.0
MIT License
145 stars 92 forks source link

Don't enable noImplicitUseStrict in TypeScript configuration (causes errors elsewhere) #279

Closed anthony-unicare closed 3 months ago

anthony-unicare commented 4 months ago

Here's a patch:

diff --git a/node_modules/@hitc/netsuite-types/tsconfig.json b/node_modules/@hitc/netsuite-types/tsconfig.json
index fcba21c..c5a2fff
--- a/node_modules/@hitc/netsuite-types/tsconfig.json
+++ b/node_modules/@hitc/netsuite-types/tsconfig.json
@@ -8,7 +8,6 @@
     "esModuleInterop": true,
     "allowSyntheticDefaultImports": true,
     "experimentalDecorators": true,
-    "noImplicitUseStrict": true,
     "baseUrl": ".",
     "lib": ["ES6", "DOM.Iterable", "DOM"],
   },
MrRob commented 4 months ago

@anthony-unicare What errors does noImplicitUseStrict cause?

anthony-unicare commented 4 months ago

@anthony-unicare What errors does noImplicitUseStrict cause?

None.

It was causing ESLint to take a very long time to run, but, after blowing away node_modules and recreating it, this no longer seems to be the case. I apologise for the false bug report.

ShawnTalbert commented 4 months ago

As a side note, I don't have this noImplicitUseStrict flag set in our projects and all is well (for many years). I'm not sure why that was added in the first place - the commit that added it supplied no helpful commit message.

anthony-unicare commented 3 months ago

@ShawnTalbert, I just found the error this was generating:

Option 'noImplicitUseStrict' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.

The documentation says you shouldn’t need this option, so I am again of the opinion that it should be removed.

I also noticed that the comma at the end of the lib line should also be removed, as it isn’t valid JSON.

MrRob commented 3 months ago

@anthony-unicare Okay, I'm removing it :)

anthony-unicare commented 3 months ago

Related: #284 and #283.