forked from StellarLend/Stellarlend-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
39 lines (39 loc) · 1.56 KB
/
Copy path.eslintrc.js
File metadata and controls
39 lines (39 loc) · 1.56 KB
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
// .eslintrc.js
module.exports = {
extends: ["next/core-web-vitals"],
rules: {
"react/prop-types": "off",
"@next/next/no-html-link-for-pages": "off",
"react/no-unescaped-entities": "off",
"react-hooks/exhaustive-deps": "off",
"@next/next/no-img-element": "off",
"no-restricted-syntax": [
"error",
{
selector:
"MemberExpression[object.object.name='process'][object.property.name='env'][computed=false][property.name=/^NEXT_PUBLIC_.*RPC.*$/]",
message:
"Do not expose RPC endpoints via NEXT_PUBLIC_* env vars. Move them to lib/server-config.ts.",
},
{
selector:
"MemberExpression[object.object.name='process'][object.property.name='env'][computed=true][property.value=/^NEXT_PUBLIC_.*RPC.*$/]",
message:
"Do not expose RPC endpoints via NEXT_PUBLIC_* env vars. Move them to lib/server-config.ts.",
},
{
selector:
"VariableDeclarator[init.object.name='process'][init.property.name='env'] > ObjectPattern > Property[key.name=/^NEXT_PUBLIC_.*RPC.*$/]",
message:
"Do not expose RPC endpoints via NEXT_PUBLIC_* env vars. Move them to lib/server-config.ts.",
},
{
selector:
"VariableDeclarator[init.object.name='process'][init.property.name='env'] > ObjectPattern > Property[key.value=/^NEXT_PUBLIC_.*RPC.*$/]",
message:
"Do not expose RPC endpoints via NEXT_PUBLIC_* env vars. Move them to lib/server-config.ts.",
},
],
"@typescript-eslint/no-var-requires": "off",
},
};