diff --git a/src/rules/consistent-test-filename.ts b/src/rules/consistent-test-filename.ts index 07e30e1a..ef83855a 100644 --- a/src/rules/consistent-test-filename.ts +++ b/src/rules/consistent-test-filename.ts @@ -24,7 +24,7 @@ export default createEslintRule< description: 'require .spec test file pattern' }, messages: { - consistentTestFilename: 'use test file name pattern {{pattern}}' + consistentTestFilename: 'Use test file name pattern {{ pattern }}' }, schema: [ { diff --git a/src/rules/max-expects.ts b/src/rules/max-expects.ts index d0885567..b4ce42f5 100644 --- a/src/rules/max-expects.ts +++ b/src/rules/max-expects.ts @@ -19,7 +19,7 @@ export default createEslintRule({ description: 'enforce a maximum number of expect per test' }, messages: { - maxExpect: 'Too many assertion calls ({{count}}). Maximum is {{max}}.' + maxExpect: 'Too many assertion calls ({{ count }}) - maximum allowed is {{ max }}' }, type: 'suggestion', schema: [ diff --git a/src/rules/max-nested-describe.ts b/src/rules/max-nested-describe.ts index e5432de1..b77d9530 100644 --- a/src/rules/max-nested-describe.ts +++ b/src/rules/max-nested-describe.ts @@ -31,7 +31,7 @@ export default createEslintRule({ ], messages: { maxNestedDescribe: - 'Nested describe block should be less than set max value.' + 'Nested describe block should be less than set max value' } }, defaultOptions: [ diff --git a/src/rules/no-commented-out-tests.ts b/src/rules/no-commented-out-tests.ts index 0e644c85..15bf958e 100644 --- a/src/rules/no-commented-out-tests.ts +++ b/src/rules/no-commented-out-tests.ts @@ -18,7 +18,7 @@ export default createEslintRule({ recommended: false }, messages: { - noCommentedOutTests: 'Remove commented out tests. You may want to use `skip` or `only` instead.' + noCommentedOutTests: 'Remove commented out tests - you may want to use `skip` or `only` instead' }, schema: [], type: 'suggestion' diff --git a/src/rules/no-conditional-tests.ts b/src/rules/no-conditional-tests.ts index e4f06f21..27bda68f 100644 --- a/src/rules/no-conditional-tests.ts +++ b/src/rules/no-conditional-tests.ts @@ -14,7 +14,7 @@ export default createEslintRule<[], MESSAGE_ID>({ }, schema: [], messages: { - noConditionalTests: 'Avoid using if conditions in a test.' + noConditionalTests: 'Avoid using if conditions in a test' } }, defaultOptions: [], diff --git a/src/rules/no-disabled-tests.ts b/src/rules/no-disabled-tests.ts index b5b80168..717bb49f 100644 --- a/src/rules/no-disabled-tests.ts +++ b/src/rules/no-disabled-tests.ts @@ -18,8 +18,8 @@ export default createEslintRule({ pending: 'Call to pending()', pendingSuite: 'Call to pending() within test suite', pendingTest: 'Call to pending() within test', - disabledSuite: 'Disabled test suite. If you want to skip a test suite temporarily, use .todo() instead.', - disabledTest: 'Disabled test. If you want to skip a test temporarily, use .todo() instead.' + disabledSuite: 'Disabled test suite - if you want to skip a test suite temporarily, use .todo() instead', + disabledTest: 'Disabled test - if you want to skip a test temporarily, use .todo() instead' }, schema: [] }, diff --git a/src/rules/no-duplicate-hooks.ts b/src/rules/no-duplicate-hooks.ts index a10c64b9..91f5a1c0 100644 --- a/src/rules/no-duplicate-hooks.ts +++ b/src/rules/no-duplicate-hooks.ts @@ -14,7 +14,7 @@ export default createEslintRule({ requiresTypeChecking: false }, messages: { - noDuplicateHooks: 'Duplicate {{hook}} in describe block.' + noDuplicateHooks: 'Duplicate {{ hook }} in describe block' }, schema: [], type: 'suggestion' diff --git a/src/rules/no-focused-tests.ts b/src/rules/no-focused-tests.ts index c5e5e4af..f4abc48b 100644 --- a/src/rules/no-focused-tests.ts +++ b/src/rules/no-focused-tests.ts @@ -39,7 +39,7 @@ export default createEslintRule({ } ], messages: { - noFocusedTests: 'Focused tests are not allowed.' + noFocusedTests: 'Focused tests are not allowed' } }, defaultOptions: [{ fixable: true }], diff --git a/src/rules/no-mocks-import.ts b/src/rules/no-mocks-import.ts index d7793cc3..5740bd3e 100644 --- a/src/rules/no-mocks-import.ts +++ b/src/rules/no-mocks-import.ts @@ -21,7 +21,7 @@ export default createEslintRule({ recommended: false }, messages: { - noMocksImport: `Mocks should not be manually imported from a ${mocksDirName} directory. Instead use \`vi.mock\` and import from the original module path.` + noMocksImport: `Mocks should not be manually imported from a ${mocksDirName} directory. Instead use \`vi.mock\` and import from the original module path` }, schema: [] }, diff --git a/src/rules/no-test-prefixes.ts b/src/rules/no-test-prefixes.ts index 7dcf1211..1f2a22ee 100644 --- a/src/rules/no-test-prefixes.ts +++ b/src/rules/no-test-prefixes.ts @@ -15,7 +15,7 @@ export default createEslintRule({ }, type: 'suggestion', messages: { - usePreferredName: 'Use "{{preferredNodeName}}" instead' + usePreferredName: 'Use "{{ preferredNodeName }}" instead' }, fixable: 'code', schema: [] diff --git a/src/rules/prefer-to-be-object.ts b/src/rules/prefer-to-be-object.ts index 3e699471..98ec0bef 100644 --- a/src/rules/prefer-to-be-object.ts +++ b/src/rules/prefer-to-be-object.ts @@ -17,7 +17,7 @@ export default createEslintRule({ }, fixable: 'code', messages: { - preferToBeObject: 'Prefer toBeObject() to test if a value is an object.' + preferToBeObject: 'Prefer toBeObject() to test if a value is an object' }, schema: [] }, diff --git a/src/rules/require-top-level-describe.ts b/src/rules/require-top-level-describe.ts index 04bfb6e2..4236143d 100644 --- a/src/rules/require-top-level-describe.ts +++ b/src/rules/require-top-level-describe.ts @@ -20,8 +20,8 @@ export default createEslintRule({ messages: { tooManyDescribes: 'There should not be more than {{ max }} describe{{ s }} at the top level', - unexpectedTestCase: 'All test cases must be wrapped in a describe block.', - unexpectedHook: 'All hooks must be wrapped in a describe block.' + unexpectedTestCase: 'All test cases must be wrapped in a describe block', + unexpectedHook: 'All hooks must be wrapped in a describe block' }, type: 'suggestion', schema: [ diff --git a/src/rules/valid-expect.ts b/src/rules/valid-expect.ts index 4f52065c..8e6b907e 100644 --- a/src/rules/valid-expect.ts +++ b/src/rules/valid-expect.ts @@ -125,14 +125,14 @@ export default createEslintRule<[ recommended: false }, messages: { - tooManyArgs: 'Expect takes most {{ amount}} argument{{s}}', - notEnoughArgs: 'Expect requires atleast {{ amount }} argument{{s}}', - modifierUnknown: 'Expect has unknown modifier', - matcherNotFound: 'Expect must have a corresponding matcher call.', - matcherNotCalled: 'Matchers must be called to assert.', - asyncMustBeAwaited: 'Async assertions must be awaited{{orReturned}}', + tooManyArgs: 'Expect takes at most {{ amount}} argument{{ s }}', + notEnoughArgs: 'Expect requires at least {{ amount }} argument{{ s }}', + modifierUnknown: 'Expect has an unknown modifier', + matcherNotFound: 'Expect must have a corresponding matcher call', + matcherNotCalled: 'Matchers must be called to assert', + asyncMustBeAwaited: 'Async assertions must be awaited{{ orReturned }}', promisesWithAsyncAssertionsMustBeAwaited: - 'Promises which return async assertions must be awaited{{orReturned}}' + 'Promises which return async assertions must be awaited{{ orReturned }}' }, type: 'suggestion', fixable: 'code', diff --git a/src/rules/valid-title.ts b/src/rules/valid-title.ts index 2930adaa..1de0f5b0 100644 --- a/src/rules/valid-title.ts +++ b/src/rules/valid-title.ts @@ -128,14 +128,14 @@ export default createEslintRule({ }, messages: { titleMustBeString: 'Test title must be a string, a function or class name', - emptyTitle: '{{functionName}} should not have an empty title', + emptyTitle: '{{ functionName }} should not have an empty title', duplicatePrefix: 'should not have duplicate prefix', accidentalSpace: 'should not have leading or trailing spaces', - disallowedWord: '"{{word}}" is not allowed in test title', - mustNotMatch: '{{functionName}} should not match {{pattern}}', - mustMatch: '{{functionName}} should match {{pattern}}', - mustNotMatchCustom: '{{message}}', - mustMatchCustom: '{{message}}' + disallowedWord: '"{{ word }}" is not allowed in test title', + mustNotMatch: '{{ functionName }} should not match {{ pattern }}', + mustMatch: '{{ functionName }} should match {{ pattern }}', + mustNotMatchCustom: '{{ message }}', + mustMatchCustom: '{{ message }}' }, type: 'suggestion', schema: [