From 41f7873f734e0122264ace42f6d99733e7e25089 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Fri, 31 Jul 2020 10:40:42 +1200 Subject: [PATCH] feat: add `valid-title` to recommended ruleset BREAKING CHANGE: recommend `valid-title` rule --- README.md | 2 +- src/__tests__/__snapshots__/rules.test.ts.snap | 1 + src/rules/valid-title.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 231fa653a..b70cd1323 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ installations requiring long-term consistency. | [valid-describe](docs/rules/valid-describe.md) | Enforce valid `describe()` callback | ![recommended][] | | | [valid-expect](docs/rules/valid-expect.md) | Enforce valid `expect()` usage | ![recommended][] | | | [valid-expect-in-promise](docs/rules/valid-expect-in-promise.md) | Enforce having return statement when testing with promises | ![recommended][] | | -| [valid-title](docs/rules/valid-title.md) | Enforce valid titles | | ![fixable][] | +| [valid-title](docs/rules/valid-title.md) | Enforce valid titles | ![recommended][] | ![fixable][] | diff --git a/src/__tests__/__snapshots__/rules.test.ts.snap b/src/__tests__/__snapshots__/rules.test.ts.snap index 72f66320f..9f274a86d 100644 --- a/src/__tests__/__snapshots__/rules.test.ts.snap +++ b/src/__tests__/__snapshots__/rules.test.ts.snap @@ -80,6 +80,7 @@ Object { "jest/valid-describe": "error", "jest/valid-expect": "error", "jest/valid-expect-in-promise": "error", + "jest/valid-title": "error", }, }, "style": Object { diff --git a/src/rules/valid-title.ts b/src/rules/valid-title.ts index bc9caa771..c970d0fbf 100644 --- a/src/rules/valid-title.ts +++ b/src/rules/valid-title.ts @@ -81,7 +81,7 @@ export default createRule<[Options], MessageIds>({ docs: { category: 'Best Practices', description: 'Enforce valid titles', - recommended: false, + recommended: 'error', }, messages: { titleMustBeString: 'Title must be a string',