Skip to content

Commit

Permalink
Upgrade ESLint, fix many jsdoc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianVennen committed Sep 3, 2024
1 parent 7af8b12 commit 21a8da1
Show file tree
Hide file tree
Showing 113 changed files with 1,018 additions and 789 deletions.
47 changes: 47 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import jsdoc from 'eslint-plugin-jsdoc';
import json from 'eslint-plugin-json';
import globals from 'globals';
import js from '@eslint/js';

export default [
js.configs.recommended,
json.configs.recommended,
jsdoc.configs['flat/recommended'],
{
files: ['**/*.js'],
plugins: {
jsdoc,
},
rules: {
'jsdoc/require-param-description': 'off',
'jsdoc/require-returns-description': 'off',
'jsdoc/require-property-description': 'off',
}
},
{
languageOptions: {
globals: {
...globals.node,
},

ecmaVersion: 'latest',
sourceType: 'module',
},

rules: {
indent: ['error', 4, {
SwitchCase: 1,
}],

'linebreak-style': ['error', 'unix'],

'no-unused-vars': ['error', {
vars: 'all',
args: 'none',
ignoreRestSiblings: false,
}],

semi: ['error', 'always'],
},
}
];
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import RestEventManagerEventManager from './src/events/rest/RestEventManager.js'
import commandManager from './src/commands/CommandManager.js';
import IntervalManager from './src/interval/IntervalManager.js';

/**
*
*/
async function start() {
await logger.debug('Loading settings');
await config.load();
Expand Down Expand Up @@ -34,7 +37,7 @@ start().catch(async (error) => {
await logger.critical('Bot crashed', error);
}
catch (e) {
console.error('Failed to send fatal error to monitoring');
console.error('Failed to send fatal error to monitoring', e);
}
console.error(error);
process.exit(1);
Expand Down
Loading

0 comments on commit 21a8da1

Please sign in to comment.