forked from nodejs/nodejs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
73 lines (73 loc) · 2.1 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
"extends": ["eslint:recommended", "next"],
"overrides": [
{
"files": ["**/*.{mjs,js,jsx,ts,tsx}"],
"extends": ["plugin:prettier/recommended"],
"env": { "node": true, "es6": true }
},
{
"files": ["**/*.{ts,tsx}"],
"globals": { "globalThis": false }
},
{
"files": ["**/*.tsx"],
"rules": {
"react/no-unused-prop-types": "off",
"react/require-default-props": "off",
"react/jsx-props-no-spreading": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"consistent-return": "off",
"react/function-component-definition": [
"error",
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"react/jsx-filename-extension": [
2,
{ "extensions": [".js", ".jsx", ".ts", ".tsx"] }
]
}
},
{
"files": ["**/*.{md,mdx}"],
"extends": ["plugin:mdx/recommended"],
"settings": { "mdx/code-blocks": false },
"rules": { "react/jsx-no-undef": "off", "no-useless-escape": "off" }
},
{
"files": [
"pages/*/about/*.{md,mdx}",
"pages/*/download/*.{md,mdx}",
"pages/*/get-involved/*.{md,mdx}",
"pages/*/docs/*.{md,mdx}",
"pages/*/*.{md,mdx}"
],
"settings": { "mdx/code-blocks": true }
},
{
"files": ["pages/**/*.{md,mdx}/*.{js,jsx,cjs,mjs,ts,tsx}"],
"rules": {
"camelcase": "off",
"@typescript-eslint/no-unused-vars": "off",
"consistent-return": "off",
"func-names": "off",
"import/extensions": "off",
"import/no-extraneous-dependencies": "off",
"import/no-unresolved": "off",
"no-console": "off",
"no-empty": "off",
"no-restricted-globals": "off",
"no-restricted-syntax": "off",
"no-undef": "off",
"no-underscore-dangle": "off",
"no-unused-expressions": "off",
"no-unused-vars": "off",
"prefer-promise-reject-errors": "off"
}
}
]
}