From abf7f9199e047278aed04e64978559e064ca16fa Mon Sep 17 00:00:00 2001
From: NovemLinguae <novemlinguae@gmail.com>
Date: Mon, 9 Dec 2024 08:03:19 -0800
Subject: [PATCH] tests: turn on eslint

I had it off. I guess because it needs a different config (wikimedia/server). This patch sets that up.

Will run autofixes in the next patch. Should be able to get rid of a bunch of rule exceptions by running the autofixes.
---
 .eslintignore        |  1 -
 tests/.eslintrc.json | 30 ++++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 tests/.eslintrc.json

diff --git a/.eslintignore b/.eslintignore
index c56157704..9d2449b36 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1,3 +1,2 @@
 scripts/
-tests/
 lib/
diff --git a/tests/.eslintrc.json b/tests/.eslintrc.json
new file mode 100644
index 000000000..08862765e
--- /dev/null
+++ b/tests/.eslintrc.json
@@ -0,0 +1,30 @@
+{
+	"extends": [
+		"wikimedia/server"
+	],
+	"env": {
+		"jest": true
+	},
+	"root": true,
+	"rules": {
+		"array-bracket-spacing": "off",
+		"computed-property-spacing": "off",
+		"no-shadow": "off",
+		"space-in-parens": "off",
+
+		"camelcase": "warn",
+		"comma-dangle": "warn",
+		"eol-last": "warn",
+		"new-cap": "warn",
+		"prefer-arrow-callback": "warn",
+		"prefer-const": "warn",
+		"no-trailing-spaces": "warn",
+		"no-undef": "warn",
+		"no-useless-escape": "warn",
+		"no-var": "warn",
+		"semi": "warn",
+		"strict": "warn",
+		"quotes": "warn",
+		"unicorn/prefer-date-now": "warn"
+	}
+}