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

add strict option #258

Merged
merged 2 commits into from
Mar 26, 2019
Merged

Conversation

43081j
Copy link
Contributor

@43081j 43081j commented Mar 25, 2019

Fixes #253.

Enables stricter parsing, in that only expressions using the specified
importName from the moduleName will be parsed.

// moduleName = some-module, importName = foo
import { foo, bar } from 'some-module';
foo`test`; // parsed
bar`test`; // parsed
foo.bleh`test`; // parsed
bar.bleh`test`; // parsed

// moduleName = some-module, importName = foo, strict = true
import { foo, bar } from 'some-module';
foo`test`; // parsed
bar`test`; // ignored
foo.bleh`test`; // parsed
bar.bleh`test`; // ignored

Fixes styled-components#253.

Enables stricter parsing, in that only expressions using the specified
`importName` from the `moduleName` will be parsed.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling d69ed56 on crispthinking:strict-option into 9293945 on styled-components:master.

Copy link
Member

@chinesedfan chinesedfan left a comment

Choose a reason for hiding this comment

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

Clever new option. I like it.

@chinesedfan chinesedfan merged commit 27d6780 into styled-components:master Mar 26, 2019
@43081j 43081j deleted the strict-option branch March 26, 2019 15:28
@chinesedfan
Copy link
Member

@43081j Just released 1.6.0. Thanks for your efforts and enjoy!

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.

3 participants