aboutsummaryrefslogtreecommitdiffstats
path: root/src/packages/eslint-config/eslint.library.config.js
blob: 81542447e5dfcd1780882da000691429cd94b104 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// @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";

export default ts.config(
  eslint.configs.recommended,
  ...ts.configs.recommended,
  {
    name: "eslint-config-turbo (recreated flat)",
    plugins: {
      turbo: { rules: turboPlugin.rules },
    },
    rules: {
      "turbo/no-undeclared-env-vars": "error",
    },
  },
  {
    name: "library",
    languageOptions: {
      globals: {
        ...globals.browser,
        ...globals.node,
        React: true,
        JSX: true,
        Svelte: true
      },
    },
    ignores: ["**/build/", "**/.svelte-kit/", "**/dist/"],
  },
  prettier,
);