-
Notifications
You must be signed in to change notification settings - Fork 207
Expand file tree
/
Copy path.oxlintrc.json
More file actions
49 lines (49 loc) · 2.05 KB
/
Copy path.oxlintrc.json
File metadata and controls
49 lines (49 loc) · 2.05 KB
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
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"categories": {
"correctness": "warn"
},
"plugins": [
"react",
"typescript",
"oxc",
"unicorn",
"jest"
// TODO: enable this plugin and fix the a11y lint issues
// "jsx-a11y"
],
"rules": {
"eslint/no-unused-vars": ["warn", {
// Allow using {ignoredProp, ...keepTheRest} to omit a prop like 'ignoredProp' from an object.
"ignoreRestSiblings": true
}],
// We disable exhaustive-deps because: it's noisy, and we often include extra deps when we want a memoized thing to
// re-calculate after some change, even if we're not using that thing in the calculation.
"react-hooks/exhaustive-deps": "off",
// Rule of hooks is useful, but not on by default:
"react/rules-of-hooks": "warn",
"typescript/no-floating-promises": ["error", {
"allowForKnownSafeCalls": [
// queryClient.invalidateQueries returns a promise that can be awaited
// if you want to do something after all the subsequent refetches are
// complete, but we rarely if ever want that; we usually want to
// continue invalidating more things immediately. So we don't usually
// want to await this.
"invalidateQueries"
]
}],
// no-conditional-expect is disabled because the existing code had a lot of violations. Enable in the future?
"jest/no-conditional-expect": "off",
// unbound-method is disabled since it's noisy and our existing code has lots of violations.
"typescript/unbound-method": "off",
// Don't require expect() assertions in each test case; this repo currently uses a pattern where the test
// passes if it doesn't raise any exceptions, and/or put assertions into helper functions.
"jest/expect-expect": "off",
// It's OK to use `expect()` in `beforeEach()` - it does properly assert. However, it seems we can't configure that
// so for now this whole rule is disabled.
"jest/no-standalone-expect": ["off"]
},
"ignorePatterns": [
"webpack.dev-tutor.config.js"
]
}