Skip to content

fix(eslint-plugin): eslint rules not found#226

Merged
rainerhahnekamp merged 1 commit intosoftarc-consulting:mainfrom
michaelbe812:fix/dependency-rule-not-found
Aug 8, 2025
Merged

fix(eslint-plugin): eslint rules not found#226
rainerhahnekamp merged 1 commit intosoftarc-consulting:mainfrom
michaelbe812:fix/dependency-rule-not-found

Conversation

@michaelbe812
Copy link
Collaborator

From what I have seen the issue #225 is caused by an incorrect file pattern which was introduced in commit #837d792

Fixes #225

import rules from '../rules';

const commonConfig: TSESLint.FlatConfig.Config = {
files: ['*.ts, *.js'],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unbelieveable: I have checked that line before but didn't see the issue.
Following my tests, the line must be like that:

files: ['**/*.ts', '**/*.js'],

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, you're right. I will update my PR :)

@rainerhahnekamp
Copy link
Collaborator

@weberhofer @michaelbe812, Thanks again. I am currently on holiday and have therefore limited availability (I can still publish the lib).

My primary concern is the following: We have so many integration tests, but why did none of them fail? If our tests failed this case completely, we should probably also add one.

Incorrect file pattern caused that the eslint rules could not be found

Fixes softarc-consulting#225
@michaelbe812 michaelbe812 force-pushed the fix/dependency-rule-not-found branch from f91e828 to 6412fa7 Compare August 1, 2025 08:50
@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 1, 2025

@michaelbe812
Copy link
Collaborator Author

@weberhofer @michaelbe812, Thanks again. I am currently on holiday and have therefore limited availability (I can still publish the lib).

My primary concern is the following: We have so many integration tests, but why did none of them fail? If our tests failed this case completely, we should probably also add one.

This is also what I am wondering about. Somehow I have the feeling that something's wrong with the integration tests. I'll try to check

@weberhofer
Copy link

I think the old file definitions worked on older eslint versions. My configurations broke after eslint 9.30.1. Integration tests seem to use eslint 8.x versions.

@rainerhahnekamp
Copy link
Collaborator

@michaelbe812, I'd like to push two new integration tests to your branch. One will run nx-create-workspace and apply our eslint rules via a simple script. The other one does the same for the Angular CLI. In that way, we would be notified if nx or angular-eslint/schematics changes their layout.

@michaelbe812
Copy link
Collaborator Author

@michaelbe812, I'd like to push two new integration tests to your branch. One will run nx-create-workspace and apply our eslint rules via a simple script. The other one does the same for the Angular CLI. In that way, we would be notified if nx or angular-eslint/schematics changes their layout.

Great idea 💡 this will definitely add some more safety nets.

I'm just asking myself if it would not be enough to just scaffold minimal projects with each eslint version which should be supported instead of full-blown nx and angular workspaces?

@rainerhahnekamp
Copy link
Collaborator

So it should only be the minimal angular app that no and cli generate. Not the full blown ones we already have.

but I think it is important to verify if someone runs a new ng new that sheriff works as expected.

@rainerhahnekamp rainerhahnekamp merged commit 2347d14 into softarc-consulting:main Aug 8, 2025
4 checks passed
@rainerhahnekamp
Copy link
Collaborator

Since I haven't been able to come up with the integration tests and we have a blocker here, I merged the fix and published.

Integration tests will be done in a separate, follow-up issue.

Thanks @michaelbe812 and @weberhofer for fixing this.

@michaelbe812 michaelbe812 deleted the fix/dependency-rule-not-found branch August 9, 2025 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

eslint-plugin broken from 0.18.1

3 participants