-
Notifications
You must be signed in to change notification settings - Fork 101
always set markers for spaced-comment rule to support reference types #318
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,10 @@ | |
*.map | ||
coverage/ | ||
node_modules/ | ||
pnpm-lock.yaml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same with these: +1 to including this in a separate issue and/or PR? Guessing you're a happy pnpm user? 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, shall we put this and array-type settings separately? |
||
src/**/*.js | ||
test/*.js | ||
~test/jest.config.js | ||
!test/tests/**/.eslintrc* | ||
!test/tests/**/*.log | ||
.idea/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,12 +9,13 @@ export const CapitalizedIgnoreMessage = "Only accepts a single string pattern to | |
|
||
export const convertCommentFormat: RuleConverter = tslintRule => { | ||
const capitalizedRuleArguments: string[] = []; | ||
const spaceCommentRuleArguments: string[] = []; | ||
const spaceCommentRuleArguments: Array<string | { markers: string[] }> = []; | ||
const capitalizedNotices: string[] = []; | ||
|
||
if (!tslintRule.ruleArguments.includes("check-space")) { | ||
spaceCommentRuleArguments.push("never"); | ||
if (!spaceCommentRuleArguments.includes("always")) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, looks like you're missing unit test coverage for this line per the test coverage report. You'll need to add test coverage for this case to get it to pass. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I get your point, will made another update There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But I do not know how. I tried to duplicate the test case on line 19, added another version without the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The problem on line 15 is that |
||
spaceCommentRuleArguments.push("always"); | ||
} | ||
spaceCommentRuleArguments.push({ markers: ["/"] }); | ||
|
||
if (tslintRule.ruleArguments.includes("check-uppercase")) { | ||
capitalizedRuleArguments.push("always"); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔If you're interested in enabling another rule, would you mind filing a separate issue/PR? I'm generally in favor of this change but it'd be good to keep it separate.