Skip to content
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

chore: migrate to named exports from rules #363

Merged
merged 3 commits into from Oct 11, 2021
Merged

chore: migrate to named exports from rules #363

merged 3 commits into from Oct 11, 2021

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Oct 9, 2021

Using default export of an object to get a name for this is weird, and requires extra wrapping when reexporting them. Using named exports makes for a cleaner approach.

Also, using export function instead of export const makes #332 a bit cleaner (as it doesn't have to migrate from arrow functions)

ignore whitespace: https://github.com/jest-community/jest-extended/pull/363/files?w=1

@SimenB SimenB requested a review from keeganwitt October 9, 2021 08:18
@codecov
Copy link

codecov bot commented Oct 9, 2021

Codecov Report

Merging #363 (39b28b8) into main (405f1e7) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #363   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          127       126    -1     
  Lines          806       744   -62     
  Branches       126       126           
=========================================
- Hits           806       744   -62     
Impacted Files Coverage Δ
src/matchers/fail/index.js 100.00% <100.00%> (ø)
src/matchers/pass/index.js 100.00% <100.00%> (ø)
src/matchers/toBeAfter/index.js 100.00% <100.00%> (ø)
src/matchers/toBeArray/index.js 100.00% <100.00%> (ø)
src/matchers/toBeArrayOfSize/index.js 100.00% <100.00%> (ø)
src/matchers/toBeBefore/index.js 100.00% <100.00%> (ø)
src/matchers/toBeBoolean/index.js 100.00% <100.00%> (ø)
src/matchers/toBeDate/index.js 100.00% <100.00%> (ø)
src/matchers/toBeDateString/index.js 100.00% <100.00%> (ø)
src/matchers/toBeEmpty/index.js 100.00% <100.00%> (ø)
... and 54 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 405f1e7...39b28b8. Read the comment docs.

@@ -33,5 +33,13 @@
"no-trailing-spaces": 1,
"object-curly-spacing": [1, "always"],
"quotes": ["warn", "single", { "avoidEscape": true }]
}
},
"overrides": [
Copy link
Member Author

@SimenB SimenB Oct 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly to give a squiggle for people rebasing old PRs (in addition to failing tests) - I expect all new to copy the approach of existent ones and not notice this rule

@SimenB SimenB merged commit 9966215 into main Oct 11, 2021
@SimenB SimenB deleted the named-exports branch October 11, 2021 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant