Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sheriff 0.16.1 legacy configuration doesn't work #114

Closed
vnabet opened this issue Jul 30, 2024 · 1 comment · Fixed by #116
Closed

sheriff 0.16.1 legacy configuration doesn't work #114

vnabet opened this issue Jul 30, 2024 · 1 comment · Fixed by #116
Assignees

Comments

@vnabet
Copy link

vnabet commented Jul 30, 2024

Node: 20.12.2
Angular cli: 17.3.8
Sheriff: 0.16.1

steps:

  • Create angular 17 projet with cli (default options)
  • npx ng lint to initialize angular eslint configuration
  • npx ng lint to execute linting => OK
  • npm i -D @softarc/sheriff-core @softarc/eslint-plugin-sheriff
  • npx sheriff init
  • adding legacy configuration in .eslintrc.json
  • npx ng lint => KO

An unhandled exception occurred: Failed to load plugin '@softarc/sheriff' declared in '.eslintrc.json#overrides[2]': Cannot find module 'typescript-eslint'

@rainerhahnekamp rainerhahnekamp self-assigned this Jul 30, 2024
@rainerhahnekamp
Copy link
Collaborator

@vnabet, thanks for letting us know. There seems to be an issue with the integration tests. They are there to ensure that exactly these things do not happen.

Let me check first on the tests and then come up with a fix.

rainerhahnekamp added a commit that referenced this issue Aug 19, 2024
Previously:
1. Integration tests were run in a subfolder within the root project, allowing 
   them to inherit missing dependencies from the root.
2. `npm/yarn link` was used to integrate Sheriff, resulting in Sheriff using 
   the TypeScript version from the root project instead of the version within 
   the integration tests.

These issues prevented the tests from detecting missing dependencies, such as 
the "typescript-eslint" package (as reported in #114), and caused failures due 
to version mismatches in TypeScript.

**Changes:**
- Integration tests have been moved to a temporary directory outside the root 
  project, ensuring complete isolation.
- `yalc` is now used instead of `npm/yarn link`, eliminating symlinks and 
  enforcing the use of the correct dependencies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants