mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
chore: Code changes & formatting and linting (#3552)
* Do some code changes & run prettier and eslint
* Fix test:test-type script
* Apply code review suggestions
* update heartbeat interval & add a reason for the specific value
* Fix husky error
* Update to TS 5.5
And use ${configDir}
* Fix test.json tsconfig base
---------
Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
This commit is contained in:
+1
-1
@@ -22,4 +22,4 @@
|
||||
"noInterop": false
|
||||
},
|
||||
"sourceMaps": "inline"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
"test:e2e": "c8 --r lcov mocha --no-warnings --jobs 1 --t 30000 'tests/e2e/**/*.spec.ts' && node ../../scripts/coveragePathFixing.js rest",
|
||||
"test:unit:watch": "mocha --no-warnings --watch --parallel 'tests/unit/**/*.spec.ts'",
|
||||
"test:type": "tsc --noEmit",
|
||||
"test:test-type": "tsc --project tsconfig.test.json"
|
||||
"test:test-type": "tsc --project tests/tsconfig.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@discordeno/gateway": "19.0.0-alpha.1",
|
||||
@@ -49,6 +49,6 @@
|
||||
"sinon": "^17.0.1",
|
||||
"ts-node": "^10.9.2",
|
||||
"tsconfig": "*",
|
||||
"typescript": "5.4.5"
|
||||
"typescript": "^5.5.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Intents } from '@discordeno/types'
|
||||
import { delay, logger } from '@discordeno/utils'
|
||||
import { delay, logger, snakeToCamelCase } from '@discordeno/utils'
|
||||
import { use as chaiUse } from 'chai'
|
||||
import chaiAsPromised from 'chai-as-promised'
|
||||
import { describe, it } from 'mocha'
|
||||
@@ -23,12 +23,9 @@ describe('[Bot] Delete any guild owned guilds', () => {
|
||||
|
||||
// RUN DISPATCH CHECK
|
||||
await bot.events.dispatchRequirements?.(data, shard.id)
|
||||
bot.events[
|
||||
data.t.toLowerCase().replace(/_([a-z])/g, function (g) {
|
||||
return g[1].toUpperCase()
|
||||
}) as keyof EventHandlers
|
||||
// @ts-expect-error as any gets removed by linter
|
||||
]?.(data.d, shard)
|
||||
|
||||
const eventName = snakeToCamelCase(data.t)
|
||||
bot.events[eventName as keyof EventHandlers]?.(data.d as never, shard as never)
|
||||
},
|
||||
},
|
||||
intents: Intents.Guilds,
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "tsconfig/test.json"
|
||||
}
|
||||
@@ -1,8 +1,3 @@
|
||||
{
|
||||
"extends": "tsconfig/base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist"
|
||||
},
|
||||
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
|
||||
"exclude": ["node_modules", "dist", "test", "tests"]
|
||||
"extends": "tsconfig/base.json"
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"extends": "tsconfig/test.json",
|
||||
"include": ["tests"],
|
||||
"exclude": ["node_modules", "dist", "src"]
|
||||
}
|
||||
Reference in New Issue
Block a user