Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

Commit

Permalink
Update eslint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhaiwat10 committed Nov 30, 2021
1 parent 86867b5 commit 9d607a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react-app/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
module.exports = {
env: {
browser: true,
es6: true,
},
extends: ["eslint:recommended", "prettier", "next"],
rules: {
"no-console": "warn",
"no-undef": "warn",
"no-undef": "error",
"react-hooks/rules-of-hooks": "warn",
},
};
2 changes: 2 additions & 0 deletions packages/react-app/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function Home() {
},
];
try {
// eslint-disable-next-line no-undef
await ethereum.request({
method: "wallet_switchEthereumChain",
params: [{ chainId: data[0].chainId }],
Expand All @@ -44,6 +45,7 @@ function Home() {
// This error code indicates that the chain has not been added to MetaMask.
if (switchError.code === 4902) {
try {
// eslint-disable-next-line no-undef
await ethereum.request({
method: "wallet_addEthereumChain",
params: data,
Expand Down

0 comments on commit 9d607a6

Please sign in to comment.