mirror of
https://github.com/SableClient/Sable.git
synced 2026-12-03 15:22:22 -08:00
chore: enforce typescript-only app sources
This commit is contained in:
3 files changed
+22
-8
No files matched your search
@@ -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,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
@@ -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"]
|
||||
}
|
||||
Reference in new issue
Block a user