-
Notifications
You must be signed in to change notification settings - Fork 126
/
.eslintrc.cjs
46 lines (43 loc) · 1.27 KB
/
.eslintrc.cjs
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
module.exports = {
extends: ["@sladg/eslint-config-base/node"],
ignorePatterns: [
"**/node_modules/**",
"**/dist/**",
"**/pnpm-lock.yaml",
"packages/open-next/assets/sharp-node-modules",
],
rules: {
"prettier/prettier": [
"error",
{
// This resets rules to prettier's defaults
},
],
"sonarjs/elseif-without-else": "warn",
"sonarjs/no-duplicate-string": "warn",
"sonarjs/cognitive-complexity": ["warn", 35],
// We add some typescript rules - The recommended rules breaks too much stuff
// TODO: We should add more rules, especially around typescript types
// Promises related rules
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-misused-promises": [
"error",
{ checksVoidReturn: false },
],
"@typescript-eslint/unbound-method": "error",
"@typescript-eslint/consistent-type-imports": "error",
},
overrides: [
{
files: ["example/**/*", "examples/**/*"],
rules: {
"unused-imports/no-unused-vars": "off",
},
},
],
parserOptions: {
project: ["./tsconfig.eslint.json", "./**/tsconfig.json"],
},
ignorePatterns: ["**/node_modules/**", "**/dist/**", "**/out/**"],
};