Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bb72fd6

Browse files
authored
chore(eslint-plugin): fix missing periods in rule messages (typescript-eslint#3789)
1 parent 463e768 commit bb72fd6

10 files changed

+30
-29
lines changed

packages/eslint-plugin/src/rules/consistent-indexed-object-style.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default createRule<Options, MessageIds>({
1919
recommended: false,
2020
},
2121
messages: {
22-
preferRecord: 'A record is preferred over an index signature',
22+
preferRecord: 'A record is preferred over an index signature.',
2323
preferIndexSignature: 'An index signature is preferred over a record.',
2424
},
2525
fixable: 'code',

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,14 @@ export default util.createRule<Options, MessageIds>({
6161
},
6262
messages: {
6363
typeOverValue:
64-
'All imports in the declaration are only used as types. Use `import type`',
65-
someImportsAreOnlyTypes: 'Imports {{typeImports}} are only used as types',
66-
aImportIsOnlyTypes: 'Import {{typeImports}} is only used as types',
64+
'All imports in the declaration are only used as types. Use `import type`.',
65+
someImportsAreOnlyTypes:
66+
'Imports {{typeImports}} are only used as types.',
67+
aImportIsOnlyTypes: 'Import {{typeImports}} is only used as types.',
6768
someImportsInDecoMeta:
68-
'Type imports {{typeImports}} are used by decorator metadata',
69+
'Type imports {{typeImports}} are used by decorator metadata.',
6970
aImportInDecoMeta:
70-
'Type import {{typeImports}} is used by decorator metadata',
71+
'Type import {{typeImports}} is used by decorator metadata.',
7172
valueOverType: 'Use an `import` instead of an `import type`.',
7273
noImportTypeAnnotations: '`import()` type annotations are forbidden.',
7374
},

packages/eslint-plugin/src/rules/no-confusing-non-null-assertion.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ export default util.createRule({
1919
fixable: 'code',
2020
messages: {
2121
confusingEqual:
22-
'Confusing combinations of non-null assertion and equal test like "a! == b", which looks very similar to not equal "a !== b"',
22+
'Confusing combinations of non-null assertion and equal test like "a! == b", which looks very similar to not equal "a !== b".',
2323
confusingAssign:
24-
'Confusing combinations of non-null assertion and equal test like "a! = b", which looks very similar to not equal "a != b"',
25-
notNeedInEqualTest: 'Unnecessary non-null assertion (!) in equal test',
24+
'Confusing combinations of non-null assertion and equal test like "a! = b", which looks very similar to not equal "a != b".',
25+
notNeedInEqualTest: 'Unnecessary non-null assertion (!) in equal test.',
2626
notNeedInAssign:
27-
'Unnecessary non-null assertion (!) in assignment left hand',
27+
'Unnecessary non-null assertion (!) in assignment left hand.',
2828
wrapUpLeft:
29-
'Wrap up left hand to avoid putting non-null assertion "!" and "=" together',
29+
'Wrap up left hand to avoid putting non-null assertion "!" and "=" together.',
3030
},
3131
schema: [],
3232
},

packages/eslint-plugin/src/rules/no-confusing-void-expression.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default util.createRule<Options, MessageId>({
5757
invalidVoidExprReturnWrapVoid:
5858
'Void expressions returned from a function ' +
5959
'must be marked explicitly with the `void` operator.',
60-
voidExprWrapVoid: 'Mark with an explicit `void` operator',
60+
voidExprWrapVoid: 'Mark with an explicit `void` operator.',
6161
},
6262
schema: [
6363
{

packages/eslint-plugin/src/rules/no-duplicate-imports.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ export default util.createRule<Options, MessageIds>({
2121
schema: baseRule.meta.schema,
2222
messages: {
2323
...baseRule.meta.messages,
24-
importType: '{{module}} type import is duplicated',
25-
importTypeAs: '{{module}} type import is duplicated as type export',
26-
exportType: '{{module}} type export is duplicated',
27-
exportTypeAs: '{{module}} type export is duplicated as type import',
24+
importType: '{{module}} type import is duplicated.',
25+
importTypeAs: '{{module}} type import is duplicated as type export.',
26+
exportType: '{{module}} type export is duplicated.',
27+
exportTypeAs: '{{module}} type export is duplicated as type import.',
2828
},
2929
},
3030
defaultOptions: [

packages/eslint-plugin/src/rules/no-implicit-any-catch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export default util.createRule<Options, MessageIds>({
2626
},
2727
fixable: 'code',
2828
messages: {
29-
implicitAnyInCatch: 'Implicit any in catch clause',
30-
explicitAnyInCatch: 'Explicit any in catch clause',
29+
implicitAnyInCatch: 'Implicit any in catch clause.',
30+
explicitAnyInCatch: 'Explicit any in catch clause.',
3131
suggestExplicitUnknown:
3232
'Use `unknown` instead, this will force you to explicitly, and safely assert the type is correct.',
3333
},

packages/eslint-plugin/src/rules/no-invalid-void-type.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ export default util.createRule<[Options], MessageIds>({
2828
},
2929
messages: {
3030
invalidVoidForGeneric:
31-
'{{ generic }} may not have void as a type variable',
31+
'{{ generic }} may not have void as a type variable.',
3232
invalidVoidNotReturnOrGeneric:
33-
'void is only valid as a return type or generic type variable',
34-
invalidVoidNotReturn: 'void is only valid as a return type',
33+
'void is only valid as a return type or generic type variable.',
34+
invalidVoidNotReturn: 'void is only valid as a return type.',
3535
invalidVoidNotReturnOrThisParam:
36-
'void is only valid as return type or type of `this` parameter',
36+
'void is only valid as return type or type of `this` parameter.',
3737
invalidVoidNotReturnOrThisParamOrGeneric:
38-
'void is only valid as a return type or generic type variable or the type of a `this` parameter',
38+
'void is only valid as a return type or generic type variable or the type of a `this` parameter.',
3939
},
4040
schema: [
4141
{

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ export default createRule<Options, MessageId>({
121121
alwaysNullish:
122122
'Unnecessary conditional, left-hand side of `??` operator is always `null` or `undefined`.',
123123
literalBooleanExpression:
124-
'Unnecessary conditional, both sides of the expression are literal values',
124+
'Unnecessary conditional, both sides of the expression are literal values.',
125125
noOverlapBooleanExpression:
126-
'Unnecessary conditional, the types have no overlap',
127-
never: 'Unnecessary conditional, value is `never`',
128-
neverOptionalChain: 'Unnecessary optional chain on a non-nullish value',
126+
'Unnecessary conditional, the types have no overlap.',
127+
never: 'Unnecessary conditional, value is `never`.',
128+
neverOptionalChain: 'Unnecessary optional chain on a non-nullish value.',
129129
noStrictNullCheck:
130130
'This rule requires the `strictNullChecks` compiler option to be turned on to function correctly.',
131131
},

packages/eslint-plugin/src/rules/prefer-enum-initializers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default util.createRule<[], MessageIds>({
1616
},
1717
messages: {
1818
defineInitializer:
19-
"The value of the member '{{ name }}' should be explicitly defined",
19+
"The value of the member '{{ name }}' should be explicitly defined.",
2020
defineInitializerSuggestion:
2121
'Can be fixed to {{ name }} = {{ suggested }}',
2222
},

packages/eslint-plugin/src/rules/prefer-return-this-type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default createRule({
2727
requiresTypeChecking: true,
2828
},
2929
messages: {
30-
useThisType: 'use `this` type instead.',
30+
useThisType: 'Use `this` type instead.',
3131
},
3232
schema: [],
3333
fixable: 'code',

0 commit comments

Comments
 (0)