forked from ubaltaci/gemini-cli-proxy
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
64 lines (62 loc) · 2 KB
/
eslint.config.js
File metadata and controls
64 lines (62 loc) · 2 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import stylistic from "@stylistic/eslint-plugin";
import importPlugin from "eslint-plugin-import";
import globals from "globals";
export default tseslint.config(
{
// Global ignores
ignores: ["node_modules/*", "dist/**"],
},
eslint.configs.recommended,
...tseslint.configs.recommended,
{
// General overrides and rules for the project (TS files)
files: ["src/**/*.ts"],
plugins: {
import: importPlugin,
"@stylistic": stylistic,
},
settings: {
"import/resolver": {
node: true,
},
},
languageOptions: {
globals: {
...globals.node,
...globals.es2021,
},
},
rules: {
// General Best Practice Rules
"@typescript-eslint/array-type": ["error", { default: "array-simple" }],
"arrow-body-style": ["error", "as-needed"],
curly: ["error", "multi-line"],
eqeqeq: ["error", "always", { null: "ignore" }],
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
"no-var": "error",
"object-shorthand": "error",
"prefer-const": ["error", { destructuring: "all" }],
"default-case": "error",
"@stylistic/quotes": ["error", "double"],
"@stylistic/array-bracket-spacing": ["error", "never"],
"@stylistic/object-curly-spacing": ["error", "never"],
"@stylistic/indent": ["error", 4],
"@stylistic/semi": "error",
},
},
);