-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patheslint.config.mjs
More file actions
45 lines (43 loc) · 1.52 KB
/
eslint.config.mjs
File metadata and controls
45 lines (43 loc) · 1.52 KB
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
36
37
38
39
40
41
42
43
44
45
import { fixupPluginRules } from "@eslint/compat";
import { defineConfig, globalIgnores } from "eslint/config";
// @ts-expect-error missing types
import universe from "eslint-config-universe/flat/node.js";
// @ts-expect-error missing types
import * as drizzle from "eslint-plugin-drizzle";
import baseConfig from "@exactly/common/eslint/base.mjs";
import nodeConfig from "@exactly/common/eslint/node.mjs";
import reactConfig from "@exactly/common/eslint/react.mjs";
export default defineConfig([
globalIgnores(["app/"]),
universe,
baseConfig,
nodeConfig,
{
languageOptions: { parserOptions: { projectService: true } },
plugins: { drizzle: fixupPluginRules(drizzle) }, // eslint-disable-line @typescript-eslint/no-unsafe-argument -- missing types
rules: {
"drizzle/enforce-delete-with-where": ["error", { drizzleObjectName: "database" }],
"drizzle/enforce-update-with-where": ["error", { drizzleObjectName: "database" }],
"n/no-missing-import": "off", // handled by bundler
"unicorn/prefer-top-level-await": "off", // unsupported in cjs
},
},
{ files: ["**/*.tsx"], extends: [reactConfig], settings: { react: { version: "detect" } } },
{
files: ["api/**"],
rules: {
"no-restricted-imports": [
"error",
{
paths: [
{
name: "hono/utils/http-status",
importNames: ["UnofficialStatusCode"],
message: "It breaks client types because its type is -1.",
},
],
},
],
},
},
]);