This repository was archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Fix eslint warnings #141
Merged
Merged
Fix eslint warnings #141
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
This change sounds like it makes the test not do what it is described to do.
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.
It's testing whether
.parse
works without.default
. Thefury
isconst fury = require('../lib/fury');
, so it's equivalent.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.
@honzajavorek Ah, thanks!
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.
Yes, although IMO I dislike the global version of Fury that is returned here. Personally I would like to consider dropping this functionality so that
require('fury')
returns theFury
class which the consumer must instansiate their own version and add the adapters. I don't like singleton state that is currently permitted.Along with #32 we would be renaming the libraries and Fury would become API Elements Core. In that case, I think it would make sense to make "Fury" itself a Namespace and thus perhaps in the future we would have something like:
As the biggest consumers of Fury (Dredd/Docs) I would love to hear some feedback regarding these potential changes. I was thinking that
Namespace
here is actually a subclass ofminim
namespace (if Minim continues to exist standalone). It is a namespace with additional methodsdetect
,validate
,parse
andcompose/serialise
.I have also been pondering the idea of a complete API Elements JS package which incorporates all the adapters for all formats so you don't have to worry about individual support.
In your cases it may make sense to depend on
apielements
whereas the separatecore
, and adapter packages are provided for consumers who wish to mix and match adapters. Although you both are not using the serialisers and this may add additional dependency bloat so it may not be desired.