Skip to content

Commit

Permalink
chore(prefer-to-be): don't make prefer to be a recomended rule (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
veritem authored Dec 19, 2023
1 parent 2920475 commit dc190c9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default [
| [prefer-snapshot-hint](docs/rules/prefer-snapshot-hint.md) | Prefer including a hint with external snapshots | | 🌐 | | |
| [prefer-spy-on](docs/rules/prefer-spy-on.md) | Suggest using `vi.spyOn` | | 🌐 | 🔧 | |
| [prefer-strict-equal](docs/rules/prefer-strict-equal.md) | Prefer strict equal over equal | | 🌐 | | 💡 |
| [prefer-to-be](docs/rules/prefer-to-be.md) | Suggest using toBe() | | | 🔧 | |
| [prefer-to-be](docs/rules/prefer-to-be.md) | Suggest using toBe() | | 🌐 | 🔧 | |
| [prefer-to-be-falsy](docs/rules/prefer-to-be-falsy.md) | Suggest using toBeFalsy() | | 🌐 | 🔧 | |
| [prefer-to-be-object](docs/rules/prefer-to-be-object.md) | Prefer toBeObject() | | 🌐 | 🔧 | |
| [prefer-to-be-truthy](docs/rules/prefer-to-be-truthy.md) | Suggest using `toBeTruthy` | | 🌐 | 🔧 | |
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/prefer-to-be.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Suggest using toBe() (`vitest/prefer-to-be`)

💼 This rule is enabled in the `recommended` config.
⚠️ This rule _warns_ in the 🌐 `all` config.

🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).

Expand Down
5 changes: 2 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,13 @@ const allRules = {
[preferComparisonMatcherName]: 'warn',
[preferToContainName]: 'warn',
[preferCalledExactlyOnceWithName]: 'warn',
[preferExpectAssertionsName]: 'warn'
// [unboundMethodName]: 'warn'
[preferExpectAssertionsName]: 'warn',
[usePreferTobe]: 'warn'
}

const recommended = {
[expectedExpect]: 'error',
[noIdenticalTitleName]: 'error',
[usePreferTobe]: 'error',
[noCommentedOutTestsName]: 'error',
[validTitleName]: 'error',
[validExpectName]: 'error',
Expand Down

0 comments on commit dc190c9

Please sign in to comment.