-
Notifications
You must be signed in to change notification settings - Fork 119
/
Copy patheslint.config.mjs
80 lines (71 loc) · 2.34 KB
/
eslint.config.mjs
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import tseslint from "typescript-eslint";
import { hanabiConfigBase } from "../../eslint.config.mjs";
export default tseslint.config(
...hanabiConfigBase,
{
rules: {
/**
* Documentation:
* https://eslint.org/docs/rules/no-param-reassign
*
* We allow reassigning properties of parameters, but not the parameters themselves.
*/
"no-param-reassign": [
"error",
{
props: false,
},
],
/**
* Documentation:
* https://eslint.org/docs/rules/no-underscore-dangle
*
* KineticJS has functions that are prefixed with an underscore.
*/
"no-underscore-dangle": "off",
/**
* Documentation:
* https://typescript-eslint.io/rules/no-deprecated/
*
* We use a lot of deprecated JQuery methods. If they are removed from the latest version of
* JQuery, then we will stick with using an older version.
*/
"@typescript-eslint/no-deprecated": "off",
/**
* Documentation:
* https://typescript-eslint.io/rules/no-non-null-assertion/
*
* We use many variables that are only null during initialization; adding explicit type guards
* would be superfluous.
*/
"@typescript-eslint/no-non-null-assertion": "off",
/**
* Documentation:
* TODO
*
* Does not work properly with Redux methods.
*/
"complete/require-variadic-function-argument": "off",
/**
* Documentation:
* https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-cycle.md
*
* The client uses cyclical dependencies because various objects are attached to the global
* variables object, but methods of these objects also reference/change global variables.
*/
"import-x/no-cycle": "off",
/**
* Documentation:
* https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-null.md
*
* The codebase uses many cases of null. In the long term, this should be refactored to
* undefined where possible. (We want to wait until the server is rewritten in TypeScript
* first to avoid having to make changes to Golang code.)
*/
"unicorn/no-null": "off",
},
},
{
ignores: ["**/lib/*.js", "**/test_data/*.js"],
},
);