chore: Name the default export 'arrayFunctions'#661
Merged
freaktechnik merged 2 commits intofreaktechnik:mainfrom Mar 8, 2026
Merged
chore: Name the default export 'arrayFunctions'#661freaktechnik merged 2 commits intofreaktechnik:mainfrom
freaktechnik merged 2 commits intofreaktechnik:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #661 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 8 8
Lines 466 466
=========================================
Hits 466 466 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
freaktechnik
requested changes
Mar 8, 2026
Owner
freaktechnik
left a comment
There was a problem hiding this comment.
The whole point of default exports/imports is that naming is decoupled... If I wanted to imply naming I'd use a named export. See also the extensive discussion at import-js/eslint-plugin-import#1041
All of that said I think in this case the naming isn't that relevant in the scope of the module itself, so I think this is fine. Just a word of warning about taking that rule as a general recommendation.
freaktechnik
approved these changes
Mar 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When importing the default export, it's recommended to use the same name as the exported variable (cf. import-x/no-rename-default).
The variable name exported by eslint-plugin-array-func is
index. With the following configuration:ESLint reports this error:
With this pull request, we will be able to use the name
arrayFunc