-
-
Notifications
You must be signed in to change notification settings - Fork 400
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
warn users when allegedly "themed" styles dont use themes. #1005
Comments
You can do it with
|
Thats quite easy to add. |
We could even do the same with function styles in development so that they also only receive one argument. We should warn when the user uses anything other than one argument. |
Yeah |
is master branch a proper branch to base PR on? |
yes |
I'm on it then |
offtopic question. why author field in react-css is the way it is? "author": {
"name": "Dan Abramov",
"email": "[email protected]"
}, |
@gaearon has originally created the first version of react-jss. I am not sure what the traditions are around author field, it has been obviously rewritten several times since then. |
I think we should make the Also, it should be the same for every package in my opinion. |
…te-sheets-manager * 'master' of https://github.com/cssinjs/jss: warn consumers if themed styles are misused. fix #1005 (#1006) Added TypeScript Usage documentation for React JSS (#1009)
… update-jss-types * jss-plugin-rule-value-function/fix-process-styles: (35 commits) Add formatting TS files Update typings Use types jss definitions Fix TS type definitions (#1030) v10.0.0-alpha.10 Update publish scripts (#1027) [docs] Update SSR setup with react-jss (#1018) temporarily remove the link to the docs, we need perma links instead #1006 [jss] Update SheetsManager (#1019) warn consumers if themed styles are misused. fix #1005 (#1006) Added TypeScript Usage documentation for React JSS (#1009) [react-jss] Export the context as __Context from react-jss (#1014) [jss-plugin-camel-case] Support css vars better (#1017) [docs] Add badges to readmes (#1016) Revert "Add tests for css variables in camel case plugins" Revert "Fix css variables being hyphenated" Revert "Run prettier" Run prettier Fix css variables being hyphenated Add tests for css variables in camel case plugins ... # Conflicts: # packages/jss/src/index.d.ts
…ssinjs#1006) * warn consumers if themed styles are misused. fix cssinjs#1005 * Fix tests on node 10 upgrade karma-browserstack-launcher to at least 1.4.0, because "internalBinding is not defined" due to old "natives" module See more: * karma-runner/karma-browserstack-launcher#140 * popcodeorg/popcode#1626 * add tests * update snapshots * add test for themed styles misuse warning not shown in prod * Add dev expression babel plugin while testing * Remove test and babel plugin from test setup * Update size-snapshot
Is your feature request related to a problem? Please describe.
Sometimes developers define styles as themed once purely out of habit without real necessity to depend on a theme.
Apparently people do it a lot.
Describe the solution you'd like
When component pulls this trick please warn developer this component doesn't need to use themed styles.
Are you willing to implement it?
Yes
The text was updated successfully, but these errors were encountered: