Troubleshooting
Having unexpected issues? Checkout this section
The Scaffolder fails when using yarn
Depending on the context and under specific conditions, the Scaffolder may fail to install the dependencies when using yarn.
In this case you can simply install them yourself. The Scaffolder should spit out the correct command prompt for you to do so at the end of the process. If that doesn't happen, refer to the manual setup instructions.
Alternatively, consider switching package manager to pnpm.
I'm using Nextjs and the Sheriff rules doesn't seem to apply
In a Nextjs project, you shouldn't follow any of Nextjs' ESLint instructions, including the usage of the command next lint. Just use the basic ESlint command eslint.
Refer to the Nextjs compatibility documentation.
I'm getting the error: Parsing error: No tsconfigRootDir was set, and multiple candidate TSConfigRootDirs are present
If you are getting the error:
Parsing error: No tsconfigRootDir was set, and multiple candidate TSConfigRootDirs are present:
...
You'll need to explicitly set tsconfigRootDir in your parser options.
See: https://typescript-eslint.io/packages/parser/#tsconfigrootdireslintIt means that the typescript-eslint parser is unsure about the location of the tsconfig.json file.
Just add this to your ESLint config:
import { sheriff, tseslint } from "eslint-config-sheriff";
const sheriffOptions = {
tsconfigRootDir: import.meta.dirname
};
export default tseslint.config(sheriff(sheriffOptions));import { sheriff, type SheriffSettings, tseslint } from "eslint-config-sheriff";
const sheriffOptions: SheriffSettings = {
tsconfigRootDir: import.meta.dirname
};
export default tseslint.config(sheriff(sheriffOptions));My editor feels slow
Consult the performance tips page.
Last updated on