UNPKG

1.21 kBJavaScriptView Raw
1module.exports = {
2 extends: ["./react.js"],
3 overrides: [
4 {
5 files: ["next.config.js"],
6 parser: "@typescript-eslint/parser",
7 },
8 {
9 files: [
10 "**/__tests__/next/**/*.test.tsx",
11 "**/__tests__/pages/**/*.test.tsx",
12 "**/__tests__/pages/**/*.test.jsx",
13 ],
14 rules: {
15 // off because of testing library
16 "jest/valid-expect": "off",
17 "jest/expect-expect": "off",
18 },
19 },
20 ],
21 rules: {
22 "import/no-internal-modules": [
23 "error",
24 {
25 allow: [
26 // eslint-disable-next-line @typescript-eslint/no-var-requires
27 ...require("./shared.js").whitelistedImports,
28 "**/configuration/**/*",
29 "**/configuration/*",
30 "next/*",
31 "next-i18next/*",
32 ],
33 },
34 ],
35 "no-restricted-imports": [
36 "error",
37 {
38 paths: [
39 {
40 name: "next/link",
41 message: "Please use AppLink component instead",
42 },
43 {
44 name: "next/router",
45 importNames: ["default"],
46 message: "Please use router from next-routes instead",
47 },
48 ],
49 },
50 ],
51 },
52}