Skip to content

How to setup correctly sheriff with eslint using create-next-app #185

@attilacsanyi

Description

@attilacsanyi

🐛 ESLint Issue with Sheriff Dependency Rules in `create-next-app

  1. Set up a Next.js project with create-next-app@latest.
  2. Install and configure @softarc/sheriff for enforcing module boundaries.
  3. Run pnpm lint.

Example Pull Request with example code.

Describe the issue

I'm encountering a weird ESLint issue related to eslint.config.mjs when using the @softarc/sheriff library for module boundaries.

Error message:

Dependency Rule (internal error): FsPath: /Users/.../node_modules/.pnpm/node_modules/@isaacs/cliui does not existeslint(@softarc/sheriff/dependency-rule)

eslint.config.mjs which is not as expected:

...
import sheriff from '@softarc/eslint-plugin-sheriff';

...
  {
    ...sheriff.configs.all,
    ignores: ['app/layout.tsx', '**/*.test.tsx', 'sheriff.config.ts'],
  },
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions