forked from pixiebrix/eslint-config-pixiebrix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests.js
34 lines (30 loc) · 1016 Bytes
/
tests.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
/** @file These additional rules are meant for tests in order to make it stricter as well as simplify it */
module.exports = {
env: {
node: true,
jest: true,
},
plugins: ["jest", "testing-library"],
extends: [
"plugin:jest/recommended",
"plugin:jest/style",
"plugin:testing-library/react",
],
rules: {
// Loosen types a bit to facilitate testing
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-non-null-assertion": "off",
// Tests can import any file
"import/no-restricted-paths": "off",
// Common and required usage in tests
"unicorn/no-useless-undefined": "off",
// These 2 make the tests less readable/idiomatic
"jest/no-conditional-expect": "off",
"unicorn/consistent-function-scoping": "off",
},
};