styled-components / stylelint-processor-styled-components

Lint your styled components with stylelint!
https://styled-components.com
MIT License
656 stars 61 forks source link

add `strict` option #258

Closed 43081j closed 5 years ago

43081j commented 5 years ago

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
coveralls commented 5 years ago

Coverage Status

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

chinesedfan commented 5 years ago

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