Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Add quotemark type validation to allow early return (#4310) #4344

Merged
merged 5 commits into from
Jun 17, 2019

Conversation

isabelleweber
Copy link
Contributor

@isabelleweber isabelleweber commented Dec 5, 2018

PR checklist

Overview of change:

Add quotemark type validation to allow early return if not one of `, ' or ".

Before:

When linting something like (a')...

SyntaxError: Invalid regular expression: /\\)/: Unmatched ')'

After:

No error

CHANGELOG.md entry:

[bugfix] additional quotemark validation

@palantirtech
Copy link
Member

Thanks for your interest in palantir/tslint, @isabelleweber! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

Copy link
Contributor

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Functionality looks great - just a style comment and a test fixup.

test/rules/quotemark/double/test.ts.lint Outdated Show resolved Hide resolved
src/rules/quotemarkRule.ts Outdated Show resolved Hide resolved
@JoshuaKGoldberg
Copy link
Contributor

👋 @isabelleweber just a heads up - I merged in master and resolved the test feedback. This'll be available in the next TSLint release!

@JoshuaKGoldberg JoshuaKGoldberg merged commit db04231 into palantir:master Jun 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

quotemark: Invalid regular expression: /\\)/: Unmatched ')'
4 participants