Skip to content

Commit 31cae3b

Browse files
authored
fix: make rule message punctuation more consistent and address some typos (#628)
1 parent 003846c commit 31cae3b

14 files changed

+27
-27
lines changed

src/rules/consistent-test-filename.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default createEslintRule<
2424
description: 'require .spec test file pattern'
2525
},
2626
messages: {
27-
consistentTestFilename: 'use test file name pattern {{pattern}}'
27+
consistentTestFilename: 'Use test file name pattern {{ pattern }}'
2828
},
2929
schema: [
3030
{

src/rules/max-expects.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default createEslintRule<Options, MESSAGE_ID>({
1919
description: 'enforce a maximum number of expect per test'
2020
},
2121
messages: {
22-
maxExpect: 'Too many assertion calls ({{count}}). Maximum is {{max}}.'
22+
maxExpect: 'Too many assertion calls ({{ count }}) - maximum allowed is {{ max }}'
2323
},
2424
type: 'suggestion',
2525
schema: [

src/rules/max-nested-describe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default createEslintRule<Options, MESSAGE_ID>({
3131
],
3232
messages: {
3333
maxNestedDescribe:
34-
'Nested describe block should be less than set max value.'
34+
'Nested describe block should be less than set max value'
3535
}
3636
},
3737
defaultOptions: [

src/rules/no-commented-out-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default createEslintRule<Options, MESSAGE_IDS>({
1818
recommended: false
1919
},
2020
messages: {
21-
noCommentedOutTests: 'Remove commented out tests. You may want to use `skip` or `only` instead.'
21+
noCommentedOutTests: 'Remove commented out tests - you may want to use `skip` or `only` instead'
2222
},
2323
schema: [],
2424
type: 'suggestion'

src/rules/no-conditional-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default createEslintRule<[], MESSAGE_ID>({
1414
},
1515
schema: [],
1616
messages: {
17-
noConditionalTests: 'Avoid using if conditions in a test.'
17+
noConditionalTests: 'Avoid using if conditions in a test'
1818
}
1919
},
2020
defaultOptions: [],

src/rules/no-disabled-tests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ export default createEslintRule<Options, MESSAGE_ID>({
1818
pending: 'Call to pending()',
1919
pendingSuite: 'Call to pending() within test suite',
2020
pendingTest: 'Call to pending() within test',
21-
disabledSuite: 'Disabled test suite. If you want to skip a test suite temporarily, use .todo() instead.',
22-
disabledTest: 'Disabled test. If you want to skip a test temporarily, use .todo() instead.'
21+
disabledSuite: 'Disabled test suite - if you want to skip a test suite temporarily, use .todo() instead',
22+
disabledTest: 'Disabled test - if you want to skip a test temporarily, use .todo() instead'
2323
},
2424
schema: []
2525
},

src/rules/no-duplicate-hooks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default createEslintRule<Options, MESSAGE_IDS>({
1414
requiresTypeChecking: false
1515
},
1616
messages: {
17-
noDuplicateHooks: 'Duplicate {{hook}} in describe block.'
17+
noDuplicateHooks: 'Duplicate {{ hook }} in describe block'
1818
},
1919
schema: [],
2020
type: 'suggestion'

src/rules/no-focused-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default createEslintRule<Options, MessageIds>({
3939
}
4040
],
4141
messages: {
42-
noFocusedTests: 'Focused tests are not allowed.'
42+
noFocusedTests: 'Focused tests are not allowed'
4343
}
4444
},
4545
defaultOptions: [{ fixable: true }],

src/rules/no-mocks-import.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default createEslintRule<Options, MESSAGE_IDS>({
2121
recommended: false
2222
},
2323
messages: {
24-
noMocksImport: `Mocks should not be manually imported from a ${mocksDirName} directory. Instead use \`vi.mock\` and import from the original module path.`
24+
noMocksImport: `Mocks should not be manually imported from a ${mocksDirName} directory. Instead use \`vi.mock\` and import from the original module path`
2525
},
2626
schema: []
2727
},

src/rules/no-test-prefixes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default createEslintRule<Options, MESSAGE_IDS>({
1515
},
1616
type: 'suggestion',
1717
messages: {
18-
usePreferredName: 'Use "{{preferredNodeName}}" instead'
18+
usePreferredName: 'Use "{{ preferredNodeName }}" instead'
1919
},
2020
fixable: 'code',
2121
schema: []

0 commit comments

Comments
 (0)