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

no-large-snapshots should not care about file types #370

Closed
G-Rath opened this issue Aug 6, 2019 · 4 comments
Closed

no-large-snapshots should not care about file types #370

G-Rath opened this issue Aug 6, 2019 · 4 comments

Comments

@G-Rath
Copy link
Collaborator

G-Rath commented Aug 6, 2019

Currently, no-large-snapshots checks if the file being linted ends w/ the .js file extension, preventing it from linting other files, such as .tsx, .ts, & .jsx.

This file check should be removed.

} else if (context.getFilename().endsWith('.js')) {

@SimenB
Copy link
Member

SimenB commented Aug 6, 2019

Potentially a breaking change, but I'd call it a bugfix...

It was added in #186, @JohanBrorson thoughts on just removing the check? We should just return from the .snap if

@G-Rath
Copy link
Collaborator Author

G-Rath commented Aug 6, 2019

I can confirm that it does mean .ts files won't be linted by this rule.

Aside from that, I wouldn't really call it "breaking" per say, for the same reason prefer-to-spyon shouldn't bother trying to figure out if it's in a test file: eslint-plugin-jest is only meant for jest tests suites.

@graphan
Copy link

graphan commented May 14, 2020

@G-Rath, @SimenB, @JohanBrorson We have our tests written in TypeScript, so we need it to be fixed. I created the following PR: #581
It is not passing due to some reason though, could you take a look?

G-Rath added a commit that referenced this issue Aug 2, 2020
G-Rath added a commit that referenced this issue Aug 2, 2020
SimenB pushed a commit that referenced this issue Aug 8, 2020
BREAKING CHANGE: `no-large-snapshots` runs on all files regardless of type 

Fixes #370
SimenB pushed a commit that referenced this issue Aug 22, 2020
BREAKING CHANGE: `no-large-snapshots` runs on all files regardless of type 

Fixes #370
SimenB pushed a commit that referenced this issue Aug 22, 2020
BREAKING CHANGE: `no-large-snapshots` runs on all files regardless of type 

Fixes #370
SimenB pushed a commit that referenced this issue Aug 24, 2020
BREAKING CHANGE: `no-large-snapshots` runs on all files regardless of type 

Fixes #370
SimenB pushed a commit that referenced this issue Aug 24, 2020
BREAKING CHANGE: `no-large-snapshots` runs on all files regardless of type 

Fixes #370
SimenB pushed a commit that referenced this issue Aug 31, 2020
BREAKING CHANGE: `no-large-snapshots` runs on all files regardless of type 

Fixes #370
SimenB pushed a commit that referenced this issue Sep 4, 2020
BREAKING CHANGE: `no-large-snapshots` runs on all files regardless of type 

Fixes #370
@SimenB SimenB closed this as completed in 22113db Sep 4, 2020
github-actions bot pushed a commit that referenced this issue Sep 4, 2020
# [24.0.0](v23.20.0...v24.0.0) (2020-09-04)

### Bug Fixes

* **no-large-snapshots:** run on all files regardless of type ([#637](#637)) ([22113db](22113db)), closes [#370](#370)
* remove Jasmine globals ([#596](#596)) ([a0e2bc5](a0e2bc5))
* update to typescript-eslint@4 ([1755965](1755965)), closes [#590](#590)

### Code Refactoring

* **no-test-callback:** rename rule to `no-done-callback` ([#653](#653)) ([e15a8d1](e15a8d1))

### Features

* **no-done-callback:** support hooks ([#656](#656)) ([3e6cb44](3e6cb44)), closes [#649](#649) [#651](#651)
* add `no-conditional-expect` to the recommended ruleset ([40cd89d](40cd89d))
* add `no-deprecated-functions` to the recommended ruleset ([5b2af00](5b2af00))
* add `no-interpolation-in-snapshots` to the recommended ruleset ([3705dff](3705dff))
* add `valid-title` to recommended ruleset ([41f7873](41f7873))
* drop support for node 8 ([#570](#570)) ([6788e72](6788e72))
* set `no-jasmine-globals` to `error` in recommended ruleset ([7080952](7080952))
* **no-large-snapshots:** remove `whitelistedSnapshots` option ([8c1c0c9](8c1c0c9))

### BREAKING CHANGES

* **no-done-callback:** `no-done-callback` will now report hooks using callbacks as well, not just tests
* **no-test-callback:** rename `no-test-callback` to `no-done-callback`
* recommend `no-conditional-expect` rule
* recommend `no-interpolation-in-snapshots` rule
* recommend `no-deprecated-functions` rule
* recommend `valid-title` rule
* recommend erroring for `no-jasmine-globals` rule
* **no-large-snapshots:** `no-large-snapshots` runs on all files regardless of type
* Jasmine globals are no marked as such
* Node 10+ required
@github-actions
Copy link

github-actions bot commented Sep 4, 2020

🎉 This issue has been resolved in version 24.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

3 participants