21Cps
21Cps
TTCTheo's Typesafe Cult
Created by 21Cps on 5/21/2023 in #questions
Disable Es-Lint rule
Here's the fix: i needed to put "off" in an array + the correct eslint rule is : import/no-anonymous-default-export + also needed to disable react/display-name corrected config 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"],
"react/display-name":["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"],
"react/display-name":["off"]
},
};

module.exports = config;
5 replies
TTCTheo's Typesafe Cult
Created by 21Cps on 5/21/2023 in #questions
Disable Es-Lint rule
but it didnt disable
5 replies
TTCTheo's Typesafe Cult
Created by 21Cps on 5/21/2023 in #questions
Disable Es-Lint rule
basically i added this on rules: "@import/no-anonymous-default-export": "off",
5 replies
TTCTheo's Typesafe Cult
Created by 21Cps on 4/9/2023 in #questions
Error spammed on my console
thanks in advance
3 replies
TTCTheo's Typesafe Cult
Created by 21Cps on 4/9/2023 in #questions
Error spammed on my console
the error doesnt only show on just 1 page but rather every page
3 replies