forked from gooddata/gooddata-ui-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
47 lines (46 loc) · 1.74 KB
/
.eslintrc.js
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
// (C) 2020 GoodData Corporation
module.exports = {
root: true,
ignorePatterns: ["**/dist/**/*.*"],
rules: {
"@typescript-eslint/array-type": "off",
"@typescript-eslint/ban-ts-comment": ["error", { "ts-expect-error": "allow-with-description" }],
"@typescript-eslint/ban-types": [
"error",
{
types: {
object: false,
},
extendDefaults: true,
},
],
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"import/order": "off",
"no-restricted-imports": [
"error",
{
paths: [{ name: "lodash/get", message: "Please use the ?. and ?? operators instead." }],
},
],
// we don't mind duplicate string most of the time as they are often checked by TypeScript unions
"sonarjs/no-duplicate-string": "off",
// some of these findings are not actionable in a reasonable time
"sonarjs/cognitive-complexity": "warn",
"tsdoc/syntax": "error"
},
overrides: [
{
files: ["*.test.ts", "*.test.tsx", "*.spec.ts"],
rules: {
// we do not care about duplicate functions in test files, they often make sense (e.g. in different describe blocks)
"sonarjs/no-identical-functions": "off",
},
},
],
};