Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter #555

Open
wants to merge 3 commits into
base: 5.6.0-release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .eslintrc.json

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
node_modules/
*.log
*.tar.gz
.env
.env
package-lock.json
41 changes: 20 additions & 21 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@ module.exports = {
},

// PLUGINS

AUTOMOD: {
ENABLED: false,
LOG_EMBED: "#36393F",
DM_EMBED: "#36393F",
},

DASHBOARD: {
enabled: false, // enable or disable dashboard
enabled: false,
baseURL: "http://localhost:8080", // base url
failureURL: "http://localhost:8080", // failure redirect url
port: "8080", // port to run the bot on
Expand All @@ -50,24 +49,6 @@ module.exports = {
MAX_BEG_AMOUNT: 2500, // maximum coins to be received when beg command is used
},

MUSIC: {
ENABLED: false,
IDLE_TIME: 60, // Time in seconds before the bot disconnects from an idle voice channel
MAX_SEARCH_RESULTS: 5,
DEFAULT_SOURCE: "SC", // YT = Youtube, YTM = Youtube Music, SC = SoundCloud
// Add any number of lavalink nodes here
// Refer to https://github.com/freyacodes/Lavalink to host your own lavalink server
LAVALINK_NODES: [
{
host: "localhost",
port: 2333,
password: "youshallnotpass",
id: "Local Node",
secure: false,
},
],
},

GIVEAWAYS: {
ENABLED: false,
REACTION: "🎁",
Expand Down Expand Up @@ -102,8 +83,26 @@ module.exports = {
},
},

MUSIC: {
ENABLED: false,
IDLE_TIME: 60, // Time in seconds before the bot disconnects from an idle voice channel
MAX_SEARCH_RESULTS: 5,
DEFAULT_SOURCE: "SC", // YT = Youtube, YTM = Youtube Music, SC = SoundCloud
// Add any number of lavalink nodes here
// Refer to https://github.com/lavalink-devs/Lavalink to host your own lavalink server
LAVALINK_NODES: [
{
host: "localhost",
port: 2333,
password: "youshallnotpass",
id: "Local Node",
secure: false,
},
],
},

PRESENCE: {
ENABLED: false, // Whether or not the bot should update its status
ENABLED: false,
STATUS: "online", // The bot's status [online, idle, dnd, invisible]
TYPE: "WATCHING", // Status type for the bot [ CUSTOM | PLAYING | LISTENING | WATCHING | COMPETING ]
// Your bot status message (note: in custom status type you won't have "Playing", "Listening", "Competing" prefix)
Expand Down
39 changes: 39 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import jsdoc from "eslint-plugin-jsdoc";
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [...compat.extends("eslint:recommended"), {
plugins: {
jsdoc,
},

languageOptions: {
globals: {
...globals.node,
...globals.commonjs,
},

ecmaVersion: "latest",
sourceType: "commonjs",
},

rules: {
"no-unused-vars": ["error", {
args: "none",
}],

"jsdoc/no-undefined-types": 1,
"no-cond-assign": 0,
},
}];
Loading