-
Notifications
You must be signed in to change notification settings - Fork 242
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
Snap processor makes enforcing other rules on .snap files impossible #292
Comments
I'm afraid I don't understand the issue here
Configurable in what way? |
If I want to run any specific rules on .snap files, right now they're swallowed by the processor because the processor removes anything that isn't no-large-snapshots. I'd like to see this written more configurably such that the processor could be bypassed / made optional |
Aha, gotcha. Wanna send a PR? I'm not sure how this is normally handled |
Let me know how you get on w/ this - I have an idea on how to implement a solution, but will leave it for now, as I'm focusing on the TS conversation :) |
@scottsheffield we've not had anyone else report this, but it does sound reasonable so if you provide me with an easy reproduction I don't mind looking into it further. Otherwise I'd like to close this issue off. |
I was just about to close this but then had a quick look at our processor and saw:
Unfortunately it looks like there's no way to directly configure processors as they don't get anything from the
I would say that the solution is we just shouldn't be filtering out rules and that people should be using Having said that I'm wondering if we actually even need the processor anymore - without that filter all it does is return the sourcecode as-is, which ESLint might do by default for non-js files (wouldn't be surprised if it didn't though 🤷). @SimenB what do you think? |
Happy to remove it if it's not needed. Give it a go? 😀 |
🎉 This issue has been resolved in version 28.0.0-next.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 28.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Adding the processors to .snap files, and those processors being so explicitly about no-large-snapshots, means I cannot use max-lines, for example, on snapshots to enforce that we are not generating too many snapshots for a given suite.
I appreciate the value of limiting the rules applied to .snap files specifically, but I think it ought to be configurable.
The text was updated successfully, but these errors were encountered: