This repository has been archived by the owner on May 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 135
/
.eslintrc
36 lines (36 loc) · 1.4 KB
/
.eslintrc
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
{
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"airbnb",
"airbnb-typescript"
],
"plugins": [
"@typescript-eslint",
"jsx-a11y",
"jest"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json"
},
"rules": {
"max-len": ["error", { "code": 120 }],
// Since we use Preact, there's no react in scope
"react/react-in-jsx-scope": "off",
// We follow a pattern of using index files to re-export all public objects/types & we dont want to use default export if there's just one
"import/prefer-default-export": "off",
// We need to create a new object in unit tests without using the resulting object
"no-new": "off",
// In some cases function signature requires a positional arg, but is not needed in body, prepend _ to make it work
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
// Allow immer for param re-assign
"no-param-reassign": ["error", { "props": true, "ignorePropertyModificationsForRegex": ["[dD]raft"] }],
// TODO: Change when dependency bundling strategy is revisited
"import/no-extraneous-dependencies": "off",
// TODO: See if newer versions of preact can better handle rendering consumer provided callbacks using memoized callbacks
"react/jsx-no-bind": "off"
}
}