Closes #1405 - Properly uses `typescript-eslint`: we were missing the preset from it, so some of the default `eslint` rules (that don't properly work with typescript) were being applied and causing false positives - I also moved the `eslint` config into its own file, and enabled `typescript-eslint`'s type-awareness, so that we can enable more type-aware rules in the future if we like - Adds `ts-lit-plugin` to the typescript config, which _hopefully_ will allow us to catch issues during build (in CI) - It looks like `ts-lit-plugin` is sort of abandonware at the moment, and unfortunately _doesn't_ actually work for this purpose right now, but the lit team is working on a replacement here: https://www.npmjs.com/package/@lit-labs/analyzer - Adds `fork-ts-checker-webpack-plugin`, which allows the typescript checking process to be run on a separate forked thread in Webpack, which can help speed up builds & checking - Enables incremental type checking for better speed - Fixes a whole bunch of `eslint`-auto-fixable issues (unused imports and variables, some type issues, etc) - Fixes a bunch of `lit-analyzer` issues (mostly attribute naming, some type issues as well) - Fixes various other type issues: - Improves type safety in a bunch of places, notably anywhere `apiFetch` and `APIPaginatedList` are used - Removes some `any`s
32 lines
709 B
JSON
32 lines
709 B
JSON
{
|
|
"compilerOptions": {
|
|
"outDir": "./dist/",
|
|
"module": "esnext",
|
|
"target": "es6",
|
|
"moduleResolution": "node",
|
|
"allowJs": true,
|
|
"strict": true,
|
|
"noImplicitAny": true,
|
|
"allowSyntheticDefaultImports": true,
|
|
"experimentalDecorators": true,
|
|
"importHelpers": true,
|
|
"sourceMap": true,
|
|
"inlineSources": true,
|
|
"skipLibCheck": true,
|
|
"plugins": [
|
|
{
|
|
"name": "ts-lit-plugin",
|
|
"strict": true,
|
|
"rules": {
|
|
"no-missing-import": "off"
|
|
},
|
|
"globalTags": ["replay-web-page"],
|
|
"maxNodeModuleImportDepth": -1
|
|
}
|
|
],
|
|
"incremental": true
|
|
},
|
|
"include": ["**/*.ts"],
|
|
"exclude": ["node_modules"]
|
|
}
|