bridge icon indicating copy to clipboard operation
bridge copied to clipboard

Eslint Development Issues

Open Vliegenier04 opened this issue 9 months ago • 3 comments

@jejebecarte @Amxgh Please have a look at these ESLint error's that I have solved. Thanks in advance.

Vliegenier04 avatar Apr 23 '25 10:04 Vliegenier04

Hello! Looks mostly good! I took a quick look and a some things popped out:

  • you should use consola (this doesn't have winston yet) for those log statements you used eslint-disable for - it's best to keep it consistent and also avoid @ignores whenever possible
  • looking at the package.json for the above I saw you ended up using g... please remove is possible :pray:
  • you might want to check your use of async/await in some area - handleStatsCommand for example. You use it asynchronously but based on it's implementation it doesn't look like it's actually necessary. There might be other bits like that too.
  • you'll probably want to move joindata.json out of the root folder
  • be cautious of synchronous file reading - I think I did that back when I wrote the blacklist logic but it should really be async

The file structure is looking good though! Big fan.

P.S. - I would also recommend squashing when you merge so the timeline is neater.

jejebecarte avatar Apr 23 '25 11:04 jejebecarte

@jejebecarte

  • I have removed g from package.json.
  • I have removed the console.log statements to include logger.log with their respectable imports on the right place.
  • joindata.json is still in root folder since I've looked into it and figured it is somewhere the same as .env file and thus is better at it's place in root.
  • Synchronous file reading does not really impact this function as I see.
  • Async & Await for handleStatsCommand is required since we are working in a Event file. It breaks if it isn't Asynchronous.

I don't know what squashing is ;)

Vliegenier04 avatar Apr 27 '25 18:04 Vliegenier04

Ok awesome thanks.

joindata.json is still in root folder since I've looked into it and figured it is somewhere the same as .env file and thus is better at it's place in root.

I don't quite understand what you mean by this...

Synchronous file reading does not really impact this function as I see.

Pretty sure it does. If I find it I'll point it out in the GH code comment thing.

See more info on squashing branches here.

jejebecarte avatar Apr 29 '25 12:04 jejebecarte