From 8d1d5ca1cab59ead9085bf00f4ee5214bf10bfe8 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Thu, 31 Oct 2024 10:36:25 -0500 Subject: js: Migrate to ESLint 9 Signed-off-by: Matt Strapp --- .../eslint-config/eslint.library.config.js | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/packages/eslint-config/eslint.library.config.js (limited to 'src/packages/eslint-config/eslint.library.config.js') 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/"], + }, +); -- cgit v1.2.3