Skip to content
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

chore: Enabling max-len lint rule #1014

Merged
merged 1 commit into from Aug 31, 2020
Merged

chore: Enabling max-len lint rule #1014

merged 1 commit into from Aug 31, 2020

Conversation

hiranya911
Copy link
Contributor

I'm enabling the max-len lint rule with a max line length of 120. Ideally we should be using a max line length of 100, but we have way too many violations to attempt that right now.

Copy link
Member

@lahirumaramba lahirumaramba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Hiranya! LGTM!
Left one question.

@@ -246,7 +246,7 @@ describe('admin.remoteConfig', () => {
INVALID_JSON_STRINGS.forEach((invalidJson) => {
it(`should throw if the json string is ${JSON.stringify(invalidJson)}`, () => {
expect(() => admin.remoteConfig().createTemplateFromJSON(invalidJson))
.to.throw(/^Failed to parse the JSON string: ([\D\w]*)\. SyntaxError: Unexpected token ([\D\w]*) in JSON at position ([0-9]*)$/);
.to.throw(/Failed to parse the JSON string/);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this pass integration test? I thought the regex should match the complete message.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was because the regex was defined with ^...$ symbols. Without them you don't need to match the whole message.

});
});

['abc', 'a123b', 'a123', '123a', 1.2, '70.2'].forEach(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! :)

});
});

['abc', 'a123b', 'a123', '123a', 1.2, '70.2'].forEach((invalidVersion) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! :)

@lahirumaramba lahirumaramba removed their assignment Aug 31, 2020
@hiranya911 hiranya911 merged commit ddce5b6 into master Aug 31, 2020
@hiranya911 hiranya911 deleted the hkj-max-len branch August 31, 2020 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants