1
0
Fork 0
mirror of https://git.sr.ht/~ashkeel/strimertul synced 2024-09-20 02:00:49 +00:00

Lint fixes

This commit is contained in:
Ash Keel 2022-01-14 01:41:53 +01:00
parent 7aebb4b0ff
commit 893f40459d
No known key found for this signature in database
GPG key ID: BAD8D93E7314ED3E
2 changed files with 4 additions and 0 deletions

View file

@ -10,6 +10,9 @@ module.exports = {
'@typescript-eslint/no-use-before-define': ['error'], '@typescript-eslint/no-use-before-define': ['error'],
'@typescript-eslint/no-shadow': ['error'], '@typescript-eslint/no-shadow': ['error'],
'default-case': 'off', 'default-case': 'off',
'consistent-return': 'off',
'@typescript-eslint/no-unsafe-return': ['error'],
'@typescript-eslint/switch-exhaustiveness-check': ['error'],
}, },
settings: { settings: {
'import/resolver': { 'import/resolver': {

View file

@ -492,6 +492,7 @@ func (m *BotAlertsModule) addTemplate(templateList map[int]*template.Template, i
templateList[id] = tpl templateList[id] = tpl
} }
// writeTemplate renders the template and sends the message to the channel
func writeTemplate(bot *Bot, tpl *template.Template, data interface{}) { func writeTemplate(bot *Bot, tpl *template.Template, data interface{}) {
var buf bytes.Buffer var buf bytes.Buffer
err := tpl.Execute(&buf, data) err := tpl.Execute(&buf, data)