-
Notifications
You must be signed in to change notification settings - Fork 309
Conversation
@@ -176,7 +176,8 @@ rules: | |||
|
|||
brace-style: # enforce one true brace style | |||
[2, "1tbs", { "allowSingleLine": true }] | |||
camelcase: 2 # require camel case names | |||
camelcase: # require camel case names, except in properties | |||
[2, { "properties": "never" }] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inline-style-prefixer's browser data generator outputs objects with keys like ios_saf
. This disables the camelcase
check for object properties. We can't easily add eslint-disable
rules to those specific files because they're generated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which files are generated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/prefix-data/static.js
and src/prefix-data/dynamic.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anything else in prefix-data
? If not, can't we just revert this here and drop a new src/prefix-data/.eslintrc
that overrides it there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered that and would be happy to do it, lemme make the case for why I didn't though:
- We'd need it in
scripts
too (the input object togenerateData
also has underscores) - Really I find the whole lint rule applying to properties extremely presumptuous. Other people's APIs use underscores (this example, JSON from REST APIs, even React has
unstable_foo
methods that people actually use) and it's lame needing an exception for that every single time. If our code were completely self-contained and didn't interact with anyone else's APIs then it would make sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
2 similar comments
scripts/update-prefix-data.js
Outdated
* this if browser support changes or `inline-style-prefixer` gets fixes for the | ||
* supported browsers. | ||
*/ | ||
import path from 'path' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to lint the scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I changed ESLint to lint everything so this forgotten-directories thing stops happening (turns out test
was also not linted).
2 similar comments
@exogen -- Looks like https://unpkg.com/[email protected]/ is released! Do we just version bump to finish this PR or does other work remain? /cc @alexlande |
expect(rendered) | ||
.to.contain('data-radium="true"').and | ||
.to.contain('style="background:red;color:white"'); | ||
expect(rendered).to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an auto-formatted result? Chai assertions are typically always:
expect(foo)
.to.SOMETHING.and
.to.SOMETHING_ELSE.and
.to.LAST_THING;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or is that prettier turned loose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like that is what prettier
wants. npm run lint
will fail otherwise.
looks like |
@stefvhuynh -- Give the update a go and see if you can get CI to pass! |
2 similar comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! 👍
@alexlande -- Thanks! @stefvhuynh -- You're a go for merge + publish! |
@stefvhuynh @alexlande @exogen -- What semver bump is this change? |
@ryan-roemer Big dependency bumps like this are tricky – the intention here was to be MINOR (we tried to make sure to support the same browser versions as before, none of our tests had to change, we get some new i-s-p features). But then again i-s-p v3 was also a complete rewrite, it wouldn't surprise me if some edge cases were different for some people, so MAJOR would be the absolute safest. |
Given that Radium is still on |
This upgrades inline-style-prefixer to version 3. Fixes #918.
update-prefix-data
script and stored insrc/prefix-data
(the script outputs ES source files).