Skip to content

Commit 51b19c7

Browse files
committed
add notices for space-within-parens
1 parent f198132 commit 51b19c7

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

src/rules/converters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ export const converters = new Map([
229229
// if you're willing to take on that work, that'd be great! Please send PRs! 💖
230230
// as these are enabled, they should be added in sorted order to the list above.
231231

232-
// tSLint core rules:
232+
// TSLint core rules:
233233
// ["ban", convertBan], // no-restricted-properties
234234
// ["import-blacklist", convertImportBlacklist], // no-restricted-imports
235235
// ["newline-before-return", convertNewlineBeforeReturn],

src/rules/converters/space-within-parens.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
import { RuleConverter } from "../converter";
22

33
export const convertSpaceWithinParens: RuleConverter = tslintRule => {
4-
let arg = "";
5-
if (tslintRule.ruleArguments.length === 1) {
6-
arg = "always";
7-
} else {
8-
arg = "never";
9-
}
4+
const arg = tslintRule.ruleArguments.length === 1 ? "always" : "never";
105
return {
116
rules: [
127
{
138
ruleArguments: [arg],
149
ruleName: "@typescript-eslint/space-within-parens",
10+
notices: ["The number of spaces will be ignored"],
1511
},
1612
],
1713
};

src/rules/converters/tests/space-within-parens.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ describe(convertSpaceWithinParens, () => {
1111
{
1212
ruleArguments: ["never"],
1313
ruleName: "@typescript-eslint/space-within-parens",
14+
notices: ["The number of spaces will be ignored"],
1415
},
1516
],
1617
});
@@ -26,6 +27,7 @@ describe(convertSpaceWithinParens, () => {
2627
{
2728
ruleArguments: ["always"],
2829
ruleName: "@typescript-eslint/space-within-parens",
30+
notices: ["The number of spaces will be ignored"],
2931
},
3032
],
3133
});

0 commit comments

Comments
 (0)