8000 chore(eslint-plugin): standardise sentences in rule messages (#1935) · dandv/typescript-eslint@f91ff20 · GitHub
[go: up one dir, main page]

Skip to content

Commit f91ff20

Browse files
authored
chore(eslint-plugin): standardise sentences in rule messages (typescript-eslint#1935)
1 parent 93fb661 commit f91ff20

17 files changed

+37
-37
lines changed

packages/eslint-plugin/src/rules/consistent-type-definitions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export default util.createRule({
1717
recommended: false,
1818
},
1919
messages: {
20-
interfaceOverType: 'Use an `interface` instead of a `type`',
21-
typeOverInterface: 'Use a `type` instead of an `interface`',
20+
interfaceOverType: 'Use an `interface` instead of a `type`.',
21+
typeOverInterface: 'Use a `type` instead of an `interface`.',
2222
},
2323
schema: [
2424
{

packages/eslint-plugin/src/rules/naming-convention.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ export default util.createRule<Options, MessageIds>({
349349
unexpectedUnderscore:
350350
'{{type}} name {{name}} must not have a {{position}} underscore.',
351351
missingUnderscore:
352-
'{{type}} name {{name}} must have a {{position}} underscore',
352+
'{{type}} name {{name}} must have a {{position}} underscore.',
353353
missingAffix:
354354
'{{type}} name {{name}} must have one of the following {{position}}es: {{affixes}}',
355355
satisfyCustom:

packages/eslint-plugin/src/rules/no-floating-promises.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ export default util.createRule<Options, MessageId>({
2727
requiresTypeChecking: true,
2828
},
2929
messages: {
30-
floating: 'Promises must be handled appropriately',
30+
floating: 'Promises must be handled appropriately.',
3131
floatingVoid:
3232
'Promises must be handled appropriately' +
33-
' or explicitly marked as ignored with the `void` operator',
34-
floatingFixVoid: 'Add void operator to ignore',
33+
' or explicitly marked as ignored with the `void` operator.',
34+
floatingFixVoid: 'Add void operator to ignore.',
3535
},
3636
schema: [
3737
{

packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default util.createRule<[], MessageIds>({
2828
fixable: 'code',
2929
messages: {
3030
direct:
31-
'This expression unnecessarily compares a boolean value to a boolean instead of using it directly',
31+
'This expression unnecessarily compares a boolean value to a boolean instead of using it directly.',
3232
negated:
3333
'This expression unnecessarily compares a boolean value to a boolean instead of negating it.',
3434
},

packages/eslint-plugin/src/rules/no-unnecessary-condition.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,17 @@ export default createRule<Options, MessageId>({
108108
alwaysTruthy: 'Unnecessary conditional, value is always truthy.',
109109
alwaysFalsy: 'Unnecessary conditional, value is always falsy.',
110110
alwaysTruthyFunc:
111-
'This callback should return a conditional, but return is always truthy',
111+
'This callback should return a conditional, but return is always truthy.',
112112
alwaysFalsyFunc:
113-
'This callback should return a conditional, but return is always falsy',
113+
'This callback should return a conditional, but return is always falsy.',
114114
neverNullish:
115115
'Unnecessary conditional, expected left-hand side of `??` operator to be possibly null or undefined.',
116116
alwaysNullish:
117-
'Unnecessary conditional, left-hand side of `??` operator is always `null` or `undefined`',
117+
'Unnecessary conditional, left-hand side of `??` operator is always `null` or `undefined`.',
118118
literalBooleanExpression:
119-
'Unnecessary conditional, both sides of the expression are literal values',
120-
never: 'Unnecessary conditional, value is `never`',
121-
neverOptionalChain: 'Unnecessary optional chain on a non-nullish value',
119+
'Unnecessary conditional, both sides of the expression are literal values.',
120+
never: 'Unnecessary conditional, value is `never`.',
121+
neverOptionalChain: 'Unnecessary optional chain on a non-nullish value.',
122122
},
123123
},
124124
defaultOptions: [

packages/eslint-plugin/src/rules/no-unsafe-assignment.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ export default util.createRule({
2525
requiresTypeChecking: true,
2626
},
2727
messages: {
28-
anyAssignment: 'Unsafe assignment of an any value',
29-
unsafeArrayPattern: 'Unsafe array destructuring of an any array value',
28+
anyAssignment: 'Unsafe assignment of an any value.',
29+
unsafeArrayPattern: 'Unsafe array destructuring of an any array value.',
3030
unsafeArrayPatternFromTuple:
31-
'Unsafe array destructuring of a tuple element with an any value',
31+
'Unsafe array destructuring of a tuple element with an any value.',
3232
unsafeAssignment:
33-
'Unsafe asignment of type {{sender}} to a variable of type {{receiver}}',
34-
unsafeArraySpread: 'Unsafe spread of an any value in an array',
33+
'Unsafe asignment of type {{sender}} to a variable of type {{receiver}}.',
34+
unsafeArraySpread: 'Unsafe spread of an any value in an array.',
3535
},
3636
schema: [],
3737
},

packages/eslint-plugin/src/rules/no-unsafe-call.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ export default util.createRule<[], MessageIds>({
1414
requiresTypeChecking: true,
1515
},
1616
messages: {
17-
unsafeCall: 'Unsafe call of an any typed value',
18-
unsafeNew: 'Unsafe construction of an any type value',
19-
unsafeTemplateTag: 'Unsafe any typed template tag',
17+
unsafeCall: 'Unsafe call of an any typed value.',
18+
unsafeNew: 'Unsafe construction of an any type value.',
19+
unsafeTemplateTag: 'Unsafe any typed template tag.',
2020
},
2121
schema: [],
2222
},

packages/eslint-plugin/src/rules/no-unsafe-member-access.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ export default util.createRule({
2121
},
2222
messages: {
2323
unsafeMemberExpression:
24-
'Unsafe member access {{property}} on an any value',
24+
'Unsafe member access {{property}} on an any value.',
2525
unsafeComputedMemberAccess:
26-
'Computed name {{property}} resolves to an any value',
26+
'Computed name {{property}} resolves to an any value.',
2727
},
2828
schema: [],
2929
},

packages/eslint-plugin/src/rules/no-unsafe-return.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default util.createRule({
1818
messages: {
1919
unsafeReturn: 'Unsafe return of an {{type}} typed value',
2020
unsafeReturnAssignment:
21-
'Unsafe return of type {{sender}} from function with return type {{receiver}}',
21+
'Unsafe return of type {{sender}} from function with return type {{receiver}}.',
2222
},
2323
schema: [],
2424
},

packages/eslint-plugin/src/rules/no-untyped-public-signature.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export default util.createRule<Options, MessageIds>({
1919
recommended: false,
2020
},
2121
messages: {
22-
noReturnType: 'Public method has no return type',
23-
untypedParameter: 'Public method parameters should be typed',
22+
noReturnType: 'Public method has no return type.',
23+
untypedParameter: 'Public method parameters should be typed.',
2424
},
2525
schema: [
2626
{

0 commit comments

Comments
 (0)
0