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

Enable the no-empty-character-class and no-template-curly-in-string linting rules #13788

Merged
merged 1 commit into from
Jul 24, 2021

Conversation

timvandermeij
Copy link
Contributor

@timvandermeij timvandermeij commented Jul 24, 2021

The former prevents unintended errors in regexes. The latter is something I ran into a couple of times before editors had proper support for syntax highlighting in template literals, and it's an easy mistake to make, especially when converting older code to use template literals. Nowadays most editors display template literals in different colors, but nevertheless it seems like a good idea to enable this rule.

Fortunately both rules don't require any code changes, so it's more for prevention.

Refer to https://eslint.org/docs/rules/no-empty-character-class and https://eslint.org/docs/rules/no-template-curly-in-string for more information about those rules.

…g` linting rules

The former prevents unintended errors in regexes. The latter is
something I ran into a couple of times before editors had proper support
for syntax highlighting in template literals, and it's an easy mistake
to make, especially when converting older code to use template literals.
Nowadays most editors display template literals in different colors, but
nevertheless it seems like a good idea to enable this rule.

Fortunately both rules don't require any code changes, so it's more for
prevention.
@timvandermeij
Copy link
Contributor Author

/botio lint

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_lint from @timvandermeij received. Current queue size: 1

Live output at: http://54.67.70.0:8877/d75f3113cc1aef2/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_lint from @timvandermeij received. Current queue size: 1

Live output at: http://3.101.106.178:8877/d4374f43baac4c0/output.txt

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

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

More linting is always a good idea; thank you!

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/d75f3113cc1aef2/output.txt

Total script time: 2.49 mins

  • Lint: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://3.101.106.178:8877/d4374f43baac4c0/output.txt

Total script time: 3.99 mins

  • Lint: Passed

@Snuffleupagus Snuffleupagus merged commit bcd6dc4 into mozilla:master Jul 24, 2021
@timvandermeij timvandermeij deleted the eslint-rules branch July 24, 2021 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants