Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ReDBrother committed Feb 12, 2024
1 parent b1ddac2 commit 8f289ae
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
16 changes: 16 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
root: true

plugins:
- jest
env:
node: true
browser: false

parser: "@babel/eslint-parser"

extends:
- "plugin:jest/recommended"

rules:
no-console: 0
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
# - name: Setup db

- name: Login to Docker Hub
run: echo "${{ services.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --pasword-stdin
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --pasword-stdin

- name: Build docker image for codebattle bot
run: make docker-build-chat-bot
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
yarn run lint
yarn test
3 changes: 1 addition & 2 deletions app/discord/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import logger from '../logger';
import socket from '../socket';

import commands from './commands';
import { intersection } from 'lodash';

// https://github.com/discordjs/discord.js/tree/main/packages/discord.js#readme

Expand Down Expand Up @@ -51,7 +50,7 @@ const setup = (params) => {
if (!interaction.isChatInputCommand()) return;

const callback = commands[interaction.commandName]?.callback || noop;
callback(intersection);
callback(interaction);
});

client.login(token);
Expand Down
3 changes: 1 addition & 2 deletions app/socket/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ socket.onOpen(() => {
socket.onError((err) => {
logger.error(
`Socket connection with codebattle server is closed with error: ${JSON.stringify(
err,
null,
err, null,
2,
)}`,
);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"start:health": "node dist/health.js",
"build": "babel app -d dist",
"prettier": "prettier --write app/**/*.js",
"lint": "eslint --cache --debug app/",
"lint": "eslint --cache app/",
"lint:write": "eslint --write app/**/*.js",
"setup": "yarn",
"prepare": "husky",
Expand Down

0 comments on commit 8f289ae

Please sign in to comment.