-
Notifications
You must be signed in to change notification settings - Fork 38
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
Issue using plugins with Betterer's eslint #1012
Comments
Hi @phenomnomnominal Is it possible to make a new function which allow us to pass the ESLint config? Cheers, |
The intention is that the full configuration for the test should live in the projects real .eslintrc configuration file and the You can of course have your own test in your own codebase that takes the whole ESLint configuration. |
Hi @cathey191 |
Betterer does load the I have tested this by installing It seems that |
@phenomnomnominal Thanks for the explanation. I will take a look again at our project directory structure. |
… configuration This adds an optional parameter to the configuration passed to the ESLint test factory which should allow overrides to be passed into eslint. phenomnomnominal#1012
I found something that helped in my case. What happened was the following:
I think this happens because I managed to sidestep the issue by moving the templates to their own |
I have the same issue, but then for a component inside a spec file.
|
Describe the bug
Trying to use the eslint plugin
rxjs/no-unsafe-takeuntil
with Betterer, however getting the error saying it needs the parserServices to be generated.To Reproduce
Import the package eslint-plugin-rxjs.
"eslint-plugin-rxjs": "^5.0.2",
Add to your .eslintrc.json
{ "root": true, "parser": "@typescript-eslint/parser", "plugins": [ "no-only-tests", "rxjs" ] }
Add to your betterer file
'no-unsafe-takeuntil': () => eslint({ 'rxjs/no-unsafe-takeuntil': ['error', { "allow": ["count", "defaultIfEmpty", "endWith", "every", "finalize", "finally", "isEmpty", "last", "max", "min", "publish", "publishBehavior", "publishLast", "publishReplay", "reduce", "share", "shareReplay", "shareReplayHot", "skipLast", "takeLast", "throwIfEmpty", "toArray", "catchError"] }] })
Expected behavior
Betterer should run the new tests and give a result of how many are failing. In my case Im expecting in the 60s. Instead I receieve this error message mixed in with my other test results in the termal
🔥 no-unsafe-takeuntil: Error while loading rule 'rxjs/no-unsafe-takeuntil': You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: