Skip to content

Commit 84121ee

Browse files
authored
fix: make rule message punctuation consistent (#1444)
1 parent 90488de commit 84121ee

13 files changed

+21
-21
lines changed

src/rules/max-expects.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default createRule({
1616
},
1717
messages: {
1818
exceededMaxAssertion:
19-
'Too many assertion calls ({{ count }}). Maximum allowed is {{ max }}.',
19+
'Too many assertion calls ({{ count }}) - maximum allowed is {{ max }}',
2020
},
2121
type: 'suggestion',
2222
schema: [

src/rules/max-nested-describe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default createRule({
1111
},
1212
messages: {
1313
exceededMaxDepth:
14-
'Too many nested describe calls ({{ depth }}). Maximum allowed is {{ max }}.',
14+
'Too many nested describe calls ({{ depth }}) - maximum allowed is {{ max }}',
1515
},
1616
type: 'suggestion',
1717
schema: [

src/rules/no-export.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default createRule({
1010
recommended: 'error',
1111
},
1212
messages: {
13-
unexpectedExport: `Do not export from a test file.`,
13+
unexpectedExport: `Do not export from a test file`,
1414
},
1515
type: 'suggestion',
1616
schema: [],

src/rules/no-focused-tests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ export default createRule({
1010
recommended: 'error',
1111
},
1212
messages: {
13-
focusedTest: 'Unexpected focused test.',
14-
suggestRemoveFocus: 'Remove focus from test.',
13+
focusedTest: 'Unexpected focused test',
14+
suggestRemoveFocus: 'Remove focus from test',
1515
},
1616
schema: [],
1717
type: 'suggestion',

src/rules/no-identical-title.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ export default createRule({
2727
},
2828
messages: {
2929
multipleTestTitle:
30-
'Test title is used multiple times in the same describe block.',
30+
'Test title is used multiple times in the same describe block',
3131
multipleDescribeTitle:
32-
'Describe block title is used multiple times in the same describe block.',
32+
'Describe block title is used multiple times in the same describe block',
3333
},
3434
schema: [],
3535
type: 'suggestion',

src/rules/no-if.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default createRule({
4343
recommended: false,
4444
},
4545
messages: {
46-
conditionalInTest: 'Test should not contain {{ condition }} statements.',
46+
conditionalInTest: 'Test should not contain {{ condition }} statements',
4747
},
4848
deprecated: true,
4949
replacedBy: ['no-conditional-in-test'],

src/rules/no-mocks-import.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default createRule({
2222
recommended: 'error',
2323
},
2424
messages: {
25-
noManualImport: `Mocks should not be manually imported from a ${mocksDirName} directory. Instead use \`jest.mock\` and import from the original module path.`,
25+
noManualImport: `Mocks should not be manually imported from a ${mocksDirName} directory. Instead use \`jest.mock\` and import from the original module path`,
2626
},
2727
schema: [],
2828
},

src/rules/no-standalone-expect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export default createRule<
6565
recommended: 'error',
6666
},
6767
messages: {
68-
unexpectedExpect: 'Expect must be inside of a test block.',
68+
unexpectedExpect: 'Expect must be inside of a test block',
6969
},
7070
type: 'suggestion',
7171
schema: [

src/rules/no-test-return-statement.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default createRule({
2929
recommended: false,
3030
},
3131
messages: {
32-
noReturnValue: 'Jest tests should not return a value.',
32+
noReturnValue: 'Jest tests should not return a value',
3333
},
3434
schema: [],
3535
type: 'suggestion',

src/rules/prefer-expect-resolves.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default createRule({
1212
},
1313
fixable: 'code',
1414
messages: {
15-
expectResolves: 'Use `await expect(...).resolves instead.',
15+
expectResolves: 'Use `await expect(...).resolves instead',
1616
},
1717
schema: [],
1818
type: 'suggestion',

0 commit comments

Comments
 (0)