Typescript config parity with Browsertrix repo (#289)

Follow-up from #288 

This matches the strictness rules with the Browsertrix repo,
specifically `noImplicitAny`, and then adds `// @ts-expect-error`s to
suppress existing errors this change raises. This'll help us keep code
quality high moving forward.

Going to just directly merge this once it passes CI; as with #288, this
doesn't change any code, just comments.
This commit is contained in:
Emma Segal-Grossman
2024-03-07 21:12:26 -05:00
committed by GitHub
parent 40d84f3383
commit 5c7b914e69
21 changed files with 121 additions and 19 deletions
+9 -15
View File
@@ -9,33 +9,27 @@
"declaration": true,
"declarationMap": true,
"declarationDir": "./dist/types",
"noImplicitAny": false,
"noImplicitAny": true,
"allowSyntheticDefaultImports": true,
"experimentalDecorators": true,
"importHelpers": true,
"sourceMap": true,
"inlineSources": true,
"paths": {
"flexsearch": ["./node_modules/@types/flexsearch"]
},
"skipLibCheck": true,
"plugins": [
{
"name": "ts-lit-plugin",
"strict": true,
"rules": {
// This seems to produce a bunch of false positives, so we've turned it off for now.
// Relevant issues:
// https://github.com/runem/lit-analyzer/issues/293
// https://github.com/runem/lit-analyzer/issues/302
// https://github.com/runem/lit-analyzer/issues/266
"no-missing-import": "off",
// ts-lit-plugin also doesn't seem to understand string interpolations in CSS, so this is also turned off.
"no-invalid-css": "off"
}
"no-missing-import": "off"
},
"maxNodeModuleImportDepth": -1
}
],
"skipLibCheck": true
"incremental": true,
"paths": {
"flexsearch": ["./node_modules/@types/flexsearch"]
}
},
"include": ["src/**/*.ts", "src/**/*.js", "src/**/*.d.ts"]
}