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

feat(ts): enable jest/unbound-method #141

Merged
merged 1 commit into from Dec 15, 2022
Merged

Conversation

zanminkian
Copy link
Contributor

@zanminkian zanminkian commented Dec 14, 2022

Description

Hi. Enabling @typescript-eslint/unbound-method will make some trouble when using jest or vitest. This PR will convenient for writing unit test.

See https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.md

Linked Issues

Additional context

@zanminkian zanminkian changed the title feat: enable jest/unbound-method feat(ts): enable jest/unbound-method Dec 14, 2022
@@ -51,6 +51,15 @@ module.exports = {
'@typescript-eslint/restrict-template-expressions': 'error',
'@typescript-eslint/unbound-method': 'error',
},
}, {
// https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.md
files: ['**/__tests__/**/*.ts', '**/*.spec.ts', '**/*.test.ts'],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@antfu antfu merged commit 2ad3503 into antfu:main Dec 15, 2022
@zanminkian zanminkian deleted the zmj-jest branch December 16, 2022 03:39
MaloLebrin added a commit to MaloLebrin/naturopathe-camion-nuxt3 that referenced this pull request Jan 29, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@antfu/eslint-config](https://togithub.com/antfu/eslint-config) |
[`^0.34.0` ->
`^0.35.0`](https://renovatebot.com/diffs/npm/@antfu%2feslint-config/0.34.0/0.35.1)
|
[![age](https://badges.renovateapi.com/packages/npm/@antfu%2feslint-config/0.35.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@antfu%2feslint-config/0.35.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@antfu%2feslint-config/0.35.1/compatibility-slim/0.34.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@antfu%2feslint-config/0.35.1/confidence-slim/0.34.0)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>antfu/eslint-config</summary>

###
[`v0.35.1`](https://togithub.com/antfu/eslint-config/releases/tag/v0.35.1)

[Compare
Source](https://togithub.com/antfu/eslint-config/compare/v0.35.0...v0.35.1)

#####    🐞 Bug Fixes

- Disable `@typescript-eslint/no-unused-vars`  -  by
[@&#8203;antfu](https://togithub.com/antfu)
[<samp>(4b576)</samp>](https://togithub.com/antfu/eslint-config/commit/4b57638)

#####     [View changes on
GitHub](https://togithub.com/antfu/eslint-config/compare/v0.35.0...v0.35.1)

###
[`v0.35.0`](https://togithub.com/antfu/eslint-config/releases/tag/v0.35.0)

[Compare
Source](https://togithub.com/antfu/eslint-config/compare/v0.34.2...v0.35.0)

#####    🚀 Features

- Auto fix for unused imports  -  by
[@&#8203;antfu](https://togithub.com/antfu)
[<samp>(f466a)</samp>](https://togithub.com/antfu/eslint-config/commit/f466ac5)

#####     [View changes on
GitHub](https://togithub.com/antfu/eslint-config/compare/v0.34.2...v0.35.0)

###
[`v0.34.2`](https://togithub.com/antfu/eslint-config/releases/tag/v0.34.2)

[Compare
Source](https://togithub.com/antfu/eslint-config/compare/v0.34.1...v0.34.2)

#####    🚀 Features

- Allow require() in cjs  -  by
[@&#8203;antfu](https://togithub.com/antfu)
[<samp>(f45a0)</samp>](https://togithub.com/antfu/eslint-config/commit/f45a0d9)

#####    🐞 Bug Fixes

- Group `&&`, ` &nbsp;-&nbsp; by ** ` and `?:`
([#&#8203;152](https://togithub.com/antfu/eslint-config/issues/152))\*\*
[<samp>()</samp>](https://togithub.com/antfu/eslint-config/commit/)

#####     [View changes on
GitHub](https://togithub.com/antfu/eslint-config/compare/v0.34.1...v0.34.2)

###
[`v0.34.1`](https://togithub.com/antfu/eslint-config/releases/tag/v0.34.1)

[Compare
Source](https://togithub.com/antfu/eslint-config/compare/v0.34.0...v0.34.1)

#####    🚀 Features

- **ts**: Enable `jest/unbound-method`  -  by
[@&#8203;zanminkian](https://togithub.com/zanminkian) in
[antfu/eslint-config#141
[<samp>(2ad35)</samp>](https://togithub.com/antfu/eslint-config/commit/2ad3503)

#####    🐞 Bug Fixes

- Allow void as statement in ts file  -  by
[@&#8203;zanminkian](https://togithub.com/zanminkian) in
[antfu/eslint-config#142
[<samp>(5d5b3)</samp>](https://togithub.com/antfu/eslint-config/commit/5d5b3c3)
- Prefer const when all variables in destructuring should be const  - 
by [@&#8203;sxzz](https://togithub.com/sxzz) in
[antfu/eslint-config#149
[<samp>(2a224)</samp>](https://togithub.com/antfu/eslint-config/commit/2a224ef)

#####     [View changes on
GitHub](https://togithub.com/antfu/eslint-config/compare/v0.34.0...v0.34.1)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/MaloLebrin/naturopathe-camion-nuxt3).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMTYuMSIsInVwZGF0ZWRJblZlciI6IjM0LjExNi4xIn0=-->
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.

None yet

2 participants