Skip to content

Commit

Permalink
Small Changes
Browse files Browse the repository at this point in the history
- Update NPM packages
- Move to ESLint flat config
- Add funding button
- Rename clientID to ClientId
- Rename maxBadges to MaxBadges
- Fix REST API processing being inside console.log()
  • Loading branch information
SomeAspy committed Jul 6, 2023
1 parent dd64051 commit da39607
Show file tree
Hide file tree
Showing 10 changed files with 137 additions and 154 deletions.
43 changes: 0 additions & 43 deletions .eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: someaspy
4 changes: 2 additions & 2 deletions config/config.example.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"clientID": "BotID",
"ClientId": "Bot ID",
"DatabaseName": "GlobalBadges",
"CollectionName": "database",
"maxBadges": 5,
"MaxBadges": 5,
"promptChannel": "ChannelID"
}
30 changes: 30 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import ts from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import json from 'eslint-plugin-json';

export default {
parser: tsParser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
extraFileExtensions: ['.json'],

},
plugins: {
'@typescript-eslint': ts,
ts,
json
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:json/recommended",
],
rules: {
semi: ["error", "always"],
"prefer-const": ["error"],
"@typescript-eslint/no-non-null-assertion": "off"
},
files: ["**/*.ts", "**/*.json"]
};
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"dev": "tsx src/index.ts",
"start": "node dist/index.js",
"build": "tsc",
"lint": "eslint src/**/* config/* -c .eslintrc"
"lint": "eslint"
},
"devDependencies": {
"@types/node": "^20.3.2",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"eslint": "^8.43.0",
"@types/node": "^20.4.0",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
"eslint": "^8.44.0",
"eslint-plugin-json": "^3.1.0",
"tsx": "^3.12.7",
"typescript": "^5.1.6",
Expand All @@ -21,7 +21,7 @@
},
"dependencies": {
"@discordjs/rest": "^1.7.1",
"discord-api-types": "^0.37.46",
"discord-api-types": "^0.37.47",
"discord.js": "^14.11.0",
"mongodb": "^5.6.0"
}
Expand Down
Loading

0 comments on commit da39607

Please sign in to comment.