Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
VITE_INFO_GRAPH=https://api.studio.thegraph.com/query/82608/ve-analytics/version/latest
VITE_BLOCKS_GRAPH=https://api.studio.thegraph.com/query/50593/base-testnet-blocks/version/latest
VITE_FARMING_GRAPH=https://api.studio.thegraph.com/query/82608/ve-farms/version/latest
VITE_INFURA_RPC=https://base-sepolia-rpc.publicnode.com
VITE_WALLETCONNECT_PROJECT_ID=79c313a96c99edbc26d06cd97bff1126
VITE_REOWN_PROJECT_ID=ec3b13417cc829a50ded0f1534a6fc47
VITE_GRAPH_API_KEY=68386d41ea4c7e40566e44ee7c88c0dc
58 changes: 41 additions & 17 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,42 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
root: true,
env: { browser: true, es2020: true },
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:react-hooks/recommended"],
ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: "@typescript-eslint/parser",
plugins: ["react-refresh"],
rules: {
"no-restricted-imports": [
"error",
{
patterns: [
{
group: ["@/modules/*/components", "@/modules/*/components/*"],
message: `Direct imports from "components" folders are restricted.
Please import from the module root instead, for example:

import ModuleName from "@/modules/ModuleName";
const { SomeComponent } = ModuleName.components;`,
},
{
group: ["@/modules/*/hooks", "@/modules/*/hooks/*"],
message: `Direct imports from "hooks" folders are restricted.
Please import from the module root instead, for example:

import ModuleName from "@/modules/ModuleName";
const { useSomeHook } = ModuleName.hooks;`,
},
{
group: ["@/modules/*/utils", "@/modules/*/utils/*"],
message: `Direct imports from "utils" folders are restricted.
Please import from the module root instead, for example:

import ModuleName from "@/modules/ModuleName";
const { someUtility } = ModuleName.utils;`,
},
],
},
],
"@typescript-eslint/no-explicit-any": ["off"],
},
};
31 changes: 12 additions & 19 deletions codegen.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
import { INFO_GRAPH_URL, FARMING_GRAPH_URL, DEFAULT_CHAIN_ID } from "./config";
import type { CodegenConfig } from "@graphql-codegen/cli";

const config: CodegenConfig = {
overwrite: true,
schema: [
"https://api.studio.thegraph.com/query/82608/ve-analytics/version/latest",
"https://api.studio.thegraph.com/query/50593/goerli-blocks/version/latest",
"https://api.studio.thegraph.com/query/82608/ve-farms/version/latest",
],
documents: "src/graphql/queries/!(*.d).{ts,tsx}",
generates: {
"src/graphql/generated/graphql.tsx": {
plugins: [
"typescript",
"typescript-operations",
"typescript-react-apollo",
],
config: {
withHooks: true,
withResultType: true,
},
overwrite: true,
schema: [INFO_GRAPH_URL[DEFAULT_CHAIN_ID], FARMING_GRAPH_URL[DEFAULT_CHAIN_ID]],
documents: "src/graphql/queries/!(*.d).{ts,tsx}",
generates: {
"src/graphql/generated/graphql.tsx": {
plugins: ["typescript", "typescript-operations", "typescript-react-apollo"],
config: {
withHooks: true,
withResultType: true,
},
},
},
},
};

export default config;
Loading