aboutsummaryrefslogtreecommitdiffstats
path: root/src/packages/eslint-config/eslint.library.config.js
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2024-10-31 10:36:25 -0500
committerMatt Strapp <matt@mattstrapp.net>2024-10-31 10:36:25 -0500
commit8d1d5ca1cab59ead9085bf00f4ee5214bf10bfe8 (patch)
tree0d8a1772a4579a136ebfdd06a3d368b3a2c0d1cf /src/packages/eslint-config/eslint.library.config.js
parentci: Alter version bump to only ignore pnpm lockfile, not rest (diff)
downloadlocusts-8d1d5ca1cab59ead9085bf00f4ee5214bf10bfe8.tar
locusts-8d1d5ca1cab59ead9085bf00f4ee5214bf10bfe8.tar.gz
locusts-8d1d5ca1cab59ead9085bf00f4ee5214bf10bfe8.tar.bz2
locusts-8d1d5ca1cab59ead9085bf00f4ee5214bf10bfe8.tar.lz
locusts-8d1d5ca1cab59ead9085bf00f4ee5214bf10bfe8.tar.xz
locusts-8d1d5ca1cab59ead9085bf00f4ee5214bf10bfe8.tar.zst
locusts-8d1d5ca1cab59ead9085bf00f4ee5214bf10bfe8.zip
js: Migrate to ESLint 9
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to 'src/packages/eslint-config/eslint.library.config.js')
-rw-r--r--src/packages/eslint-config/eslint.library.config.js39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/packages/eslint-config/eslint.library.config.js b/src/packages/eslint-config/eslint.library.config.js
new file mode 100644
index 0000000..e3c7866
--- /dev/null
+++ b/src/packages/eslint-config/eslint.library.config.js
@@ -0,0 +1,39 @@
+// @ts-check
+
+import globals from "globals";
+import eslint from "@eslint/js";
+import ts from "typescript-eslint";
+import prettier from "eslint-config-prettier";
+import turboPlugin from "eslint-plugin-turbo";
+
+import { resolve } from "node:path";
+
+const project = resolve(process.cwd(), "tsconfig.json");
+
+export default ts.config(
+ eslint.configs.recommended,
+ ...ts.configs.recommended,
+ prettier,
+ {
+ name: "eslint-config-turbo (recreated flat)",
+ plugins: {
+ turbo: { rules: turboPlugin.rules },
+ },
+ rules: {
+ "turbo/no-undeclared-env-vars": "error",
+ },
+ },
+ {
+ name: "library",
+ languageOptions: {
+ // parserOptions: {
+ // project: resolve(process.cwd(), "tsconfig.json")
+ // },
+ globals: {
+ ...globals.browser,
+ ...globals.node,
+ },
+ },
+ ignores: ["build/", ".svelte-kit/", "dist/"],
+ },
+);