-
Notifications
You must be signed in to change notification settings - Fork 11
/
.eslintrc.json
40 lines (40 loc) · 1.46 KB
/
.eslintrc.json
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
{
"root": true,
"env": {
"browser": true,
"node": true
},
"extends": [
"@moxy/eslint-config-base/esm",
"@moxy/eslint-config-babel",
"@moxy/eslint-config-react",
"@moxy/eslint-config-react-web-a11y",
"@moxy/eslint-config-jest"
],
"rules": {
// Next.js <Link> component doesn't play nice with anchor validation.
"jsx-a11y/anchor-is-valid": 0,
// Disallow imports as we have built-in replacements for this project.
"no-restricted-imports": ["error", {
"paths": [
{
"name": "@moxy/react-page-swapper",
"message": "Please import from 'shared/react/page-swapper' instead."
},
{
"name": "next/router",
"importNames": ["useRouter", "withRouter"],
"message": "You most likely want to import 'usePageRouter' or 'withPageRouter' from 'shared/react/next-router' as it preservers the router between page transitions."
},
{
"name": "@testing-library/react",
"message": "Please import from 'shared/react/testing-library' instead."
},
{
"name": "@testing-library/user-event",
"message": "Please import from 'shared/react/testing-library' instead."
}
]
}]
}
}