Add eslint
- Copy eslint configs from TransPlace's moderation bot
- Modify some settings to better fit this project
diff --git a/package.json b/package.json
index e42a2a5..a26b083 100644
--- a/package.json
+++ b/package.json
@@ -5,6 +5,7 @@
"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",
@@ -24,7 +25,8 @@
"scripts": {
"build": "tsc",
"start": "node --experimental-json-modules dist/index.js",
- "dev": "rm -rf dist && tsc && node --experimental-json-modules dist/index.js"
+ "dev": "rm -rf dist && tsc && node --experimental-json-modules dist/index.js",
+ "lint": "eslint ."
},
"repository": {
"type": "git",
@@ -41,5 +43,10 @@
},
"homepage": "https://github.com/ClicksMinutePer/Nucleus#readme",
"private": false,
- "type": "module"
+ "type": "module",
+ "devDependencies": {
+ "@tsconfig/node16-strictest-esm": "^1.0.3",
+ "@typescript-eslint/eslint-plugin": "^5.32.0",
+ "@typescript-eslint/parser": "^5.32.0"
+ }
}