-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[docs] Demo codesandbox deps #10158
[docs] Demo codesandbox deps #10158
Conversation
a6eafee
to
a56aa47
Compare
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.
Yeah! I was too lazy to push this forward. It's less code and more future proof. Good call 👍
@@ -55,6 +55,10 @@ module.exports = { | |||
'import/unambiguous': 'off', // scripts | |||
'import/namespace': ['error', { allowComputed: true }], | |||
'import/no-extraneous-dependencies': 'off', | |||
'import/order': ['error', { |
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 try to be as unopinionated as possible around the Airbnb rules.
Will that conflict with?
https://github.com/airbnb/javascript/blob/aefff97bd10e8e17963749bd1013a6927d90fe29/packages/eslint-config-airbnb-base/rules/imports.js#L141-L147
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.
the nested array makes it so all groups can be mingled (other ref)
without the groups
option, it defaults to their default group order, which makes a bunch of errors. I used it more for newlines-between
to make sure import are together at the top of the file, easier to process
@@ -31,3 +31,19 @@ export function pageToTitle(page) { | |||
|
|||
return titleize(name); | |||
} | |||
|
|||
export function getDependencies(raw) { |
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.
Some unit tests for this method would be perfect.
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
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.
there are no tests for docs, should I put a helpers.spec.js next to it, (and add a npm script for testing also docs/**?
I think that adding the docs folder for the "test:unit"
command is a good tradeoff. The tests won't be run in the CI, nor it will impact codecoverage. One simple test like the repl you linked should be enough :).
@caub good job, thanks. |
I think a test will be safer, I've tried a few ones, it seems to work
Follow up for #10150