ESLint changes don't show when running turbo build

Hi, in my .eslintrc.cjs file I've made some changes which include warning instead of throwing errors for certain rules, for example this is my file:
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-misused-promises": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
},
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-misused-promises": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
},
I've changed "no-misused-promises" to warn instead of showing an error but when I run turbo build I get the error:
build: 126:22 Error: Promise-returning function provided to attribute where a void return was expected. @typescript-eslint/no-misused-promises
build: 126:22 Error: Promise-returning function provided to attribute where a void return was expected. @typescript-eslint/no-misused-promises
Shouldn't this just show a warning instead of throwing an error or am I doing something wrong? I'm using Next 13.4 with the app router and this occurs when running both npm run build and turbo build. When I change them from warn to off the error still occurs.
3 Replies
Josh
Josh12mo ago
Try setting that rule to "warn" instead of an array
wlvz
wlvz12mo ago
it is “warn”, the rule that’s an array is a different one. i’m getting an error for no misused promises which isn’t in an array
Josh
Josh12mo ago
Ahh I misread Sounds like the eslint file isnt being picked up properly Have you tried making sure the other rules are applying correctly? Specifically, are you able to make it a json file instead of cjs?