forked from agustif/opencode-lmstudio
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
45 lines (44 loc) · 1.18 KB
/
Copy patheslint.config.js
File metadata and controls
45 lines (44 loc) · 1.18 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
// @ts-check
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import eslintConfigPrettier from "eslint-config-prettier/flat";
export default tseslint.config(
{
ignores: ["node_modules/", "coverage/", "dist/"],
},
eslint.configs.recommended,
tseslint.configs.recommendedTypeChecked,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
files: ["*.config.ts", "*.config.js"],
extends: [tseslint.configs.disableTypeChecked],
},
// Global rule customization
{
rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
],
},
},
// Relax rules for test files — mocks legitimately use async without
// await and access untyped fetch args for assertion purposes.
{
files: ["test/**/*.ts"],
rules: {
"@typescript-eslint/require-await": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
},
},
eslintConfigPrettier,
);