chore: enforce typescript-only app sources

This commit is contained in:
hazre committed 2026-04-14 23:43:03 +02:00
1 parent bb90fa7b80
commit 00abf3a381
3 files changed
+22 -8

No files matched your search

+20
View File
@@ -221,6 +221,26 @@ const projectOverrides = defineConfig([
'@typescript-eslint/consistent-type-definitions': 'off',
},
},
{
name: 'project/secret-storage-helpers',
files: ['src/client/secretStorageKeys.ts'],
rules: {
'no-void': 'off',
},
},
{
name: 'project/no-js-in-src',
files: ['src/**/*.{js,jsx}'],
rules: {
'no-restricted-syntax': [
'error',
{
selector: 'Program',
message: 'JavaScript files are not allowed under src. Use TypeScript instead.',
},
],
},
},
]);
export default defineConfig([
+1 -7
View File
@@ -1,13 +1,7 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"entry": ["src/sw.ts"],
"ignore": [
"src/ext.d.ts",
"src/types/matrix-sdk-events.d.ts",
"src/client/secretStorageKeys.d.ts",
"src/app/utils/bgColorImg.d.ts",
"scripts/*"
],
"ignore": ["src/ext.d.ts", "src/types/matrix-sdk-events.d.ts", "scripts/*"],
"ignoreExportsUsedInFile": {
"interface": true,
"type": true
+1 -1
View File
@@ -46,6 +46,6 @@
"$client/*": ["src/client/*"]
}
},
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.js", "src/**/*.jsx"],
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts"],
"exclude": ["node_modules", "dist", "coverage"]
}