-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.eslintrc.cjs
31 lines (31 loc) · 1.05 KB
/
.eslintrc.cjs
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
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "prettier"],
overrides: [
{
files: ["*.ts", "*.tsx"],
extends: ["@guardian/eslint-config-typescript"],
rules: {
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": "error",
"import/no-cycle": "error",
"@typescript-eslint/strict-boolean-expressions": [
'error',
{
// This rule also errors on any ambiguous type comparisons (e.g !! on a type `null | undefined | ""`)
// https://typescript-eslint.io/rules/strict-boolean-expressions/
allowString: true,
allowNumber: false,
allowNullableObject: true,
allowNullableBoolean: true,
allowNullableString: true,
allowNullableNumber: false, // We only want to enforce this for numbers
allowAny: true,
},
],
},
},
],
};