Repository navigation
Expand file tree
/
Copy patheslint.config.js
More file actions
64 lines (59 loc) · 1.88 KB
/
Copy patheslint.config.js
File metadata and controls
64 lines (59 loc) · 1.88 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
// eslint.config.js
import js from "@eslint/js";
import tseslint from "typescript-eslint";
export default tseslint.config(
// Global ignores: a config object that only carries `ignores` applies to every other config.
// Generated and frozen artifacts stay out of lint entirely, so neither `eslint .` nor
// `eslint --fix .` can rewrite output that only its generator owns.
{
ignores: [
"**/dist/**",
"**/node_modules/**",
"**/.opencode/**",
"**/e2e/**",
"**/test/**",
"**/artifacts/**",
"**/packages/storybook/.storybook/**",
"**/packages/ui/src/**/*.stories.tsx",
"**/*.gen.ts",
"**/sst-env.d.ts",
"**/sdk/js/src/gen/**",
"**/sdk/js/src/v2/gen/**",
"**/client/src/generated/**",
"**/client/src/generated-effect/**",
"**/desktop/src/bindings.ts",
],
},
js.configs.recommended,
...tseslint.configs.recommended,
{
files: ["**/*.ts", "**/*.tsx"],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
// Temporarily disable these to reduce noise
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/consistent-return": "off",
"@typescript-eslint/no-unsafe-type-assertion": "off",
"@typescript-eslint/no-empty-object-type": "off",
"no-empty": "off",
"no-useless-assignment": "off",
"no-case-declarations": "off",
"no-fallthrough": "off",
"no-self-assign": "off",
"no-undef": "off",
"prefer-const": "warn",
// Keep these enabled
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/no-require-imports": "warn",
"@typescript-eslint/no-namespace": "warn",
"require-yield": "warn",
}
}
);