Skip to content
This repository was archived by the owner on Oct 26, 2022. It is now read-only.

Commit 793e435

Browse files
committed
Add TSLint rules and lint existing code
1 parent 10a1f11 commit 793e435

8 files changed

+408
-66
lines changed

package-lock.json

+289
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
},
3131
"devDependencies": {
3232
"@types/node": "^11.13.2",
33+
"tslint": "^5.15.0",
3334
"typescript": "^3.4.2"
3435
}
3536
}

src/builders.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
export function getPackage (dirName: string) {
2-
return `{
1+
export function getPackage(dirName: string) {
2+
return `{
33
"name": "${dirName}",
44
"version": "0.0.1",
55
"description": "Bot created with create-discord-bot CLI",
@@ -11,9 +11,9 @@ export function getPackage (dirName: string) {
1111
}`
1212
}
1313

14-
export function getScript (token: string, botName: string)  {
15-
const tokenValue = token.length > 0 ? token : 'your-token-from-discord-api'
16-
return `/* ${botName} generated with create-discord-bot CLI */
14+
export function getScript(token: string, botName: string) {
15+
const tokenValue = token.length > 0 ? token : 'your-token-from-discord-api'
16+
return `/* ${botName} generated with create-discord-bot CLI */
1717
const Discord = require('discord.js')
1818
const client = new Discord.Client()
1919
client.on('ready', () => {
@@ -22,14 +22,14 @@ export function getScript (token: string, botName: string)  {
2222
client.login('${tokenValue}');`
2323
}
2424

25-
export function getReadme (botName: string) {
26-
return `# ${botName}
25+
export function getReadme(botName: string) {
26+
return `# ${botName}
2727
Discord Bot generated with [create-discord-bot](https://github.com/HZooly/create-discord-bot)
2828
2929
To get the Bot invitation link, you can use [discord-bot-invitation](https://github.com/HZooly/discord-bot-invitation)
3030
`
3131
}
3232

33-
export function getGitignore () {
34-
return '/node_modules'
33+
export function getGitignore() {
34+
return '/node_modules'
3535
}

0 commit comments

Comments
 (0)