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

Lint fixes #10

Merged
merged 5 commits into from
Dec 15, 2021
Merged

Lint fixes #10

merged 5 commits into from
Dec 15, 2021

Conversation

Brianzchen
Copy link
Member

Closes #7


const create = (context) => {
const allowedPattern = context.options[0] ? new RegExp(context.options[0], 'u') : null;
const extraMessage = allowedPattern ? ' Fix it or match `' + allowedPattern.toString() + '`.' : '';
const extraMessage = allowedPattern ? ` Fix it or match \`${allowedPattern.toString()}\`.` : '';

Choose a reason for hiding this comment

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

Suggested change
const extraMessage = allowedPattern ? ` Fix it or match \`${allowedPattern.toString()}\`.` : '';
const extraMessage = allowedPattern ? ` Fix it or match \'${allowedPattern.toString()}\'.` : '';

Maybe instead of a backtick we can use single quotations to match the format of other messages

Choose a reason for hiding this comment

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

btw the test would then need to be updated if it is changed from backticks - this change won't provide much value but we should probably have standards in the error messaging

Copy link

@angelica-bocanegra angelica-bocanegra left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@Brianzchen Brianzchen merged commit f539eac into master Dec 15, 2021
@Brianzchen Brianzchen deleted the lint-fixes branch December 15, 2021 02:09
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.

Fix all lint errors and enable as part of build
2 participants