21Cps
21Cps
TTCTheo's Typesafe Cult
Created by 21Cps on 5/21/2023 in #questions
Disable Es-Lint rule
hello how can i disable the following rule? eslintimport/no-anonymous-default-export i tried with the following .eslintrc.cjs file:
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require("path");

/** @type {import("eslint").Linter.Config} */
const config = {
overrides: [
{
extends: [
"plugin:@typescript-eslint/recommended-requiring-type-checking",
],
files: ["*.ts", "*.tsx"],
parserOptions: {
project: path.join(__dirname, "tsconfig.json"),
},
},
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: path.join(__dirname, "tsconfig.json"),
},
plugins: ["@typescript-eslint"],
extends: ["next/core-web-vitals", "plugin:@typescript-eslint/recommended"],
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@import/no-anonymous-default-export": "off",
},
};

module.exports = config;
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require("path");

/** @type {import("eslint").Linter.Config} */
const config = {
overrides: [
{
extends: [
"plugin:@typescript-eslint/recommended-requiring-type-checking",
],
files: ["*.ts", "*.tsx"],
parserOptions: {
project: path.join(__dirname, "tsconfig.json"),
},
},
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: path.join(__dirname, "tsconfig.json"),
},
plugins: ["@typescript-eslint"],
extends: ["next/core-web-vitals", "plugin:@typescript-eslint/recommended"],
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@import/no-anonymous-default-export": "off",
},
};

module.exports = config;
5 replies
TTCTheo's Typesafe Cult
Created by 21Cps on 4/9/2023 in #questions
Error spammed on my console
hello, i am using t3 stack with clerk and am getting this error:
event - compiled client and server successfully in 435 ms (380 modules)
wait - compiling /api/trpc/[trpc] (client and server)...
error - unhandledRejection: TypeError: Cannot read property 'timeoutType' of undefined
at _resume (evalmachine.<anonymous>:11000:33)
at resume (evalmachine.<anonymous>:10969:7)
at connect (evalmachine.<anonymous>:10956:7)
event - compiled client and server successfully in 435 ms (380 modules)
wait - compiling /api/trpc/[trpc] (client and server)...
error - unhandledRejection: TypeError: Cannot read property 'timeoutType' of undefined
at _resume (evalmachine.<anonymous>:11000:33)
at resume (evalmachine.<anonymous>:10969:7)
at connect (evalmachine.<anonymous>:10956:7)
this is the complete error and i am unable to find where it is coming from, but it happens right after it shows compiling /api/trpc/[trpc], i tried looking on google for solutions or gpt-3 but couldnt, can anyone help or guide me to finding the fix, thanks
3 replies
TTCTheo's Typesafe Cult
Created by 21Cps on 4/8/2023 in #questions
Fetching using useQuery based on changing state causes app to be too slow and throws an error
hello, i am trying to fetch data with a param based on the page the user is on
export default function PcBuilderPartData({
component,
}: {
component: Component;
}) {
api.builder.fetchComponents.useQuery(
{
component,
},
{
refetchOnWindowFocus: false,
refetchOnMount: false,
refetchOnReconnect: false,
}
);
...
export default function PcBuilderPartData({
component,
}: {
component: Component;
}) {
api.builder.fetchComponents.useQuery(
{
component,
},
{
refetchOnWindowFocus: false,
refetchOnMount: false,
refetchOnReconnect: false,
}
);
...
component changes whenever i go to the route of a different component but this has caused it to become too slow whenever i change pages and throws following error:
error - unhandledRejection: TypeError: Cannot read property 'timeoutType' of undefined
at _resume (evalmachine.<anonymous>:11000:33)
at resume (evalmachine.<anonymous>:10969:7)
at connect (evalmachine.<anonymous>:10956:7)
error - unhandledRejection: TypeError: Cannot read property 'timeoutType' of undefined
at _resume (evalmachine.<anonymous>:11000:33)
at resume (evalmachine.<anonymous>:10969:7)
at connect (evalmachine.<anonymous>:10956:7)
2 replies