Update code formatting & linting tools again
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..9141329
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,8 @@
+root = true
+
+[*]
+end_of_line = lf
+insert_final_newline = true
+charset = utf-8
+indent_style = space
+indent_size = 4
diff --git a/.eslintrc.json b/.eslintrc.json
index 694dce5..a042c36 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -7,33 +7,21 @@
"ignorePatterns": ["dist/"],
"extends": [
"eslint:recommended",
- "plugin:@typescript-eslint/recommended"
+ "plugin:@typescript-eslint/strict",
+ "prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
- "sourceType": "module"
+ "sourceType": "module",
+ "project": "./tsconfig.json"
},
- "plugins": [
- "@typescript-eslint"
- ],
+ "plugins": ["@typescript-eslint"],
"rules": {
- "indent": [
- "error",
- 4
- ],
- "linebreak-style": [
- "error",
- "unix"
- ],
- "quotes": [
- "error",
- "double"
- ],
- "semi": [
- "error",
- "always"
- ],
+ "indent": ["error", 4],
+ "linebreak-style": ["error", "unix"],
+ "quotes": ["error", "double"],
+ "semi": ["error", "always"],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
@@ -45,10 +33,6 @@
],
"no-trailing-spaces": "error",
"@typescript-eslint/no-explicit-any": "error",
- "no-constant-condition": 0,
- "comma-dangle": [
- "error",
- "never"
- ]
+ "comma-dangle": ["error", "never"]
}
}
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 0000000..bfedc85
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,18 @@
+dist/
+.history/
+node_modules/
+src/config/*
+!src/config/format.ts
+!src/config/default.json
+!src/config/emojis.json
+src/config/main.json
+.vscode/
+yarn-error.log
+yarn.lock
+src/utils/temp/*.png
+src/utils/temp/*.webp
+src/utils/temp/*.jpeg
+src/utils/temp/*.jpg
+
+ClicksMigratingProblems/oldData/
+ClicksMigratingProblems/oldData copy/
\ No newline at end of file
diff --git a/.prettierrc.json b/.prettierrc.json
new file mode 100644
index 0000000..d802dbc
--- /dev/null
+++ b/.prettierrc.json
@@ -0,0 +1,3 @@
+{
+ "trailingComma": "none"
+}
diff --git a/package.json b/package.json
index 872b186..33920d0 100644
--- a/package.json
+++ b/package.json
@@ -1,54 +1,57 @@
{
- "dependencies": {
- "@discordjs/builders": "^0.12.0",
- "@hokify/agenda": "^6.2.12",
- "@tsconfig/node18-strictest-esm": "^1.0.0",
- "@ungap/structured-clone": "^1.0.1",
- "agenda": "^4.3.0",
- "body-parser": "^1.20.0",
- "discord.js": "13.8.1",
- "eslint": "^8.21.0",
- "express": "^4.18.1",
- "fuse.js": "^6.6.2",
- "humanize-duration": "^3.27.1",
- "immutable": "^4.1.0",
- "jshaiku": "file:../haiku",
- "mongodb": "^4.7.0",
- "node-tesseract-ocr": "^2.2.1",
- "pastebin-api": "^5.1.1",
- "structured-clone": "^0.2.2",
- "typescript": "^4.5.5",
- "unscan": "^1.1.2",
- "uuid": "^8.3.2"
- },
- "name": "nucleus",
- "version": "0.0.1",
- "description": "Nucleus: The core of your server",
- "main": "dist/index.js",
- "scripts": {
- "build": "tsc",
- "start": "node --experimental-json-modules dist/index.js",
- "dev": "rm -rf dist && tsc && node --experimental-json-modules dist/index.js",
- "lint": "eslint ."
- },
- "repository": {
- "type": "git",
- "url": "git+ssh://git@github.com/ClicksMinutePer/Nucleus.git"
- },
- "author": "Clicks",
- "contributors": [
- "Minion3665",
- "PineappleFan"
- ],
- "license": "SEE LICENSE IN LICENSE",
- "bugs": {
- "url": "https://github.com/ClicksMinutePer/Nucleus/issues"
- },
- "homepage": "https://github.com/ClicksMinutePer/Nucleus#readme",
- "private": false,
- "type": "module",
- "devDependencies": {
- "@typescript-eslint/eslint-plugin": "^5.32.0",
- "@typescript-eslint/parser": "^5.32.0"
- }
+ "dependencies": {
+ "@discordjs/builders": "^0.12.0",
+ "@hokify/agenda": "^6.2.12",
+ "@tsconfig/node18-strictest-esm": "^1.0.0",
+ "@ungap/structured-clone": "^1.0.1",
+ "agenda": "^4.3.0",
+ "body-parser": "^1.20.0",
+ "discord.js": "13.8.1",
+ "eslint": "^8.21.0",
+ "express": "^4.18.1",
+ "fuse.js": "^6.6.2",
+ "humanize-duration": "^3.27.1",
+ "immutable": "^4.1.0",
+ "jshaiku": "file:../haiku",
+ "mongodb": "^4.7.0",
+ "node-tesseract-ocr": "^2.2.1",
+ "pastebin-api": "^5.1.1",
+ "structured-clone": "^0.2.2",
+ "typescript": "^4.5.5",
+ "unscan": "^1.1.2",
+ "uuid": "^8.3.2"
+ },
+ "name": "nucleus",
+ "version": "0.0.1",
+ "description": "Nucleus: The core of your server",
+ "main": "dist/index.js",
+ "scripts": {
+ "build": "tsc",
+ "start": "node --experimental-json-modules dist/index.js",
+ "dev": "rm -rf dist && tsc && node --experimental-json-modules dist/index.js",
+ "lint": "echo 'Style checking...'; prettier --check .; echo 'Linting...'; eslint .; echo 'To auto-fix everything possible, please run `yarn lint-fix`'; true",
+ "lint-fix": "echo 'Fixing eslint issues...'; eslint . --fix; echo 'Reformatting...'; prettier --write --loglevel warn ."
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/ClicksMinutePer/Nucleus.git"
+ },
+ "author": "Clicks",
+ "contributors": [
+ "Minion3665",
+ "PineappleFan"
+ ],
+ "license": "SEE LICENSE IN LICENSE",
+ "bugs": {
+ "url": "https://github.com/ClicksMinutePer/Nucleus/issues"
+ },
+ "homepage": "https://github.com/ClicksMinutePer/Nucleus#readme",
+ "private": false,
+ "type": "module",
+ "devDependencies": {
+ "@typescript-eslint/eslint-plugin": "^5.32.0",
+ "@typescript-eslint/parser": "^5.32.0",
+ "eslint-config-prettier": "^8.5.0",
+ "prettier": "^2.7.1"
+ }
}