Skip to content

Commit

Permalink
fix: make rule message punctuation consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Sep 29, 2023
1 parent 1ee0087 commit e86c6eb
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/rules/max-expects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default createRule({
},
messages: {
exceededMaxAssertion:
'Too many assertion calls ({{ count }}). Maximum allowed is {{ max }}.',
'Too many assertion calls ({{ count }}) - maximum allowed is {{ max }}',
},
type: 'suggestion',
schema: [
Expand Down
2 changes: 1 addition & 1 deletion src/rules/max-nested-describe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default createRule({
},
messages: {
exceededMaxDepth:
'Too many nested describe calls ({{ depth }}). Maximum allowed is {{ max }}.',
'Too many nested describe calls ({{ depth }}) - maximum allowed is {{ max }}',
},
type: 'suggestion',
schema: [
Expand Down
2 changes: 1 addition & 1 deletion src/rules/no-export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default createRule({
recommended: 'error',
},
messages: {
unexpectedExport: `Do not export from a test file.`,
unexpectedExport: `Do not export from a test file`,
},
type: 'suggestion',
schema: [],
Expand Down
4 changes: 2 additions & 2 deletions src/rules/no-focused-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export default createRule({
recommended: 'error',
},
messages: {
focusedTest: 'Unexpected focused test.',
suggestRemoveFocus: 'Remove focus from test.',
focusedTest: 'Unexpected focused test',
suggestRemoveFocus: 'Remove focus from test',
},
schema: [],
type: 'suggestion',
Expand Down
4 changes: 2 additions & 2 deletions src/rules/no-identical-title.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ export default createRule({
},
messages: {
multipleTestTitle:
'Test title is used multiple times in the same describe block.',
'Test title is used multiple times in the same describe block',
multipleDescribeTitle:
'Describe block title is used multiple times in the same describe block.',
'Describe block title is used multiple times in the same describe block',
},
schema: [],
type: 'suggestion',
Expand Down
2 changes: 1 addition & 1 deletion src/rules/no-if.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default createRule({
recommended: false,
},
messages: {
conditionalInTest: 'Test should not contain {{ condition }} statements.',
conditionalInTest: 'Test should not contain {{ condition }} statements',
},
deprecated: true,
replacedBy: ['no-conditional-in-test'],
Expand Down
2 changes: 1 addition & 1 deletion src/rules/no-mocks-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default createRule({
recommended: 'error',
},
messages: {
noManualImport: `Mocks should not be manually imported from a ${mocksDirName} directory. Instead use \`jest.mock\` and import from the original module path.`,
noManualImport: `Mocks should not be manually imported from a ${mocksDirName} directory. Instead use \`jest.mock\` and import from the original module path`,
},
schema: [],
},
Expand Down
2 changes: 1 addition & 1 deletion src/rules/no-standalone-expect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default createRule<
recommended: 'error',
},
messages: {
unexpectedExpect: 'Expect must be inside of a test block.',
unexpectedExpect: 'Expect must be inside of a test block',
},
type: 'suggestion',
schema: [
Expand Down
2 changes: 1 addition & 1 deletion src/rules/no-test-return-statement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default createRule({
recommended: false,
},
messages: {
noReturnValue: 'Jest tests should not return a value.',
noReturnValue: 'Jest tests should not return a value',
},
schema: [],
type: 'suggestion',
Expand Down
2 changes: 1 addition & 1 deletion src/rules/prefer-expect-resolves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default createRule({
},
fixable: 'code',
messages: {
expectResolves: 'Use `await expect(...).resolves instead.',
expectResolves: 'Use `await expect(...).resolves instead',
},
schema: [],
type: 'suggestion',
Expand Down
2 changes: 1 addition & 1 deletion src/rules/prefer-spy-on.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default createRule({
recommended: false,
},
messages: {
useJestSpyOn: 'Use jest.spyOn() instead.',
useJestSpyOn: 'Use jest.spyOn() instead',
},
fixable: 'code',
schema: [],
Expand Down
14 changes: 7 additions & 7 deletions src/rules/valid-expect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ export default createRule<[Options], MessageIds>({
recommended: 'error',
},
messages: {
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 }}.',
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',
schema: [
Expand Down
2 changes: 1 addition & 1 deletion src/rules/valid-title.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default createRule<[Options], MessageIds>({
emptyTitle: '{{ jestFunctionName }} 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 titles.',
disallowedWord: '"{{ word }}" is not allowed in test titles',
mustNotMatch: '{{ jestFunctionName }} should not match {{ pattern }}',
mustMatch: '{{ jestFunctionName }} should match {{ pattern }}',
mustNotMatchCustom: '{{ message }}',
Expand Down

0 comments on commit e86c6eb

Please sign in to comment.