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

add strict option#258

Merged
chinesedfan merged 2 commits intostyled-components:masterfrom
crispthinking:strict-option
Mar 26, 2019
Merged

add strict option#258
chinesedfan merged 2 commits intostyled-components:masterfrom
crispthinking:strict-option

Conversation

@43081j
Copy link
Copy Markdown
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

43081j added 2 commits March 25, 2019 12:50
Fixes styled-components#253.

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

Coverage Status

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

Copy link
Copy Markdown
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
Copy Markdown
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