Newer
Older
"extends": ["@rocket.chat/eslint-config", "@rocket.chat/eslint-config/react", "plugin:you-dont-need-lodash-underscore/compatible"],
"globals": {
"__meteor_bootstrap__": false,
"__meteor_runtime_config__": false,
"Assets": false,
"chrome": false,
"jscolor": false
},
"rules": {
"import/named": "error",
"react-hooks/exhaustive-deps": [
"warn",
{
"additionalHooks": "(useComponentDidUpdate)"
}
],
"prefer-arrow-callback": [
"error",
{
"allowNamedFunctions": true
}
]
},
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
"rules": {
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
65
66
67
68
69
70
71
72
73
"@typescript-eslint/naming-convention": [
"error",
{
"selector": ["function", "parameter", "variable"],
"modifiers": ["destructured"],
"format": null
},
{
"selector": ["variable"],
"format": ["camelCase", "UPPER_CASE", "PascalCase"],
"leadingUnderscore": "allowSingleOrDouble"
},
{
"selector": ["function"],
"format": ["camelCase", "PascalCase"],
"leadingUnderscore": "allowSingleOrDouble"
},
{
"selector": ["parameter"],
"format": ["PascalCase"],
"filter": {
"regex": "Component$",
"match": true
}
},
{
"selector": ["parameter"],
"format": ["camelCase"],
"leadingUnderscore": "allow"
},
{
"selector": ["parameter"],
"format": ["camelCase"],
"modifiers": ["unused"],
"leadingUnderscore": "require"
},
{
"selector": ["interface"],
"format": ["PascalCase"],
"custom": {
"regex": "^I[A-Z]",
"match": true
}
}
],
"@typescript-eslint/no-misused-promises": [
"error",
{
"checksVoidReturn": {
Rodrigo Nascimento
committed
"arguments": false
}
}
Rodrigo Nascimento
committed
],
"@typescript-eslint/no-floating-promises": "error",
"no-unreachable-loop": "error"
"parserOptions": {
"project": ["./tsconfig.json"]
},
"excludedFiles": [".scripts/*.ts"]
},
{
"files": ["**/*.tests.js", "**/*.tests.ts", "**/*.spec.ts"],
"env": {
"mocha": true
}
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
},
{
"files": ["**/*.spec.ts", "**/*.spec.tsx"],
"extends": ["plugin:testing-library/react"],
"rules": {
"testing-library/no-await-sync-events": "warn",
"testing-library/no-manual-cleanup": "warn",
"testing-library/prefer-explicit-assert": "warn",
"testing-library/prefer-user-event": "warn"
},
"env": {
"mocha": true
}
},
{
"files": ["**/*.stories.js", "**/*.stories.jsx", "**/*.stories.ts", "**/*.stories.tsx", "**/*.spec.tsx"],
"rules": {
"react/display-name": "off",
"react/no-multi-comp": "off"
}
},
{
"files": ["**/*.stories.ts", "**/*.stories.tsx"],
"rules": {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"
}
},
{
"files": ["client/**/*.ts", "client/**/*.tsx", "ee/client/**/*.ts", "ee/client/**/*.tsx"],
"rules": {
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-floating-promises": "off"
}
},
{
"files": ["**/*.d.ts"],
"rules": {
"@typescript-eslint/naming-convention": "off"
}