Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make rule message punctuation consistent #1444

Merged
merged 1 commit into from Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/rules/max-expects.ts
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
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
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
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
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
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
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
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
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
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
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
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
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