-
Notifications
You must be signed in to change notification settings - Fork 27
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
Standard js style guide (WiP) #177
Open
quadrophobiac
wants to merge
56
commits into
master
Choose a base branch
from
standard-js-style-guide
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
Comma Chameleon has a gh-pages served site in its docs folder that we are going to ignore for now
-_____-)
Exec *is* required in order that the build package terminates
other electron applications adhere to const instead of globals, commonly declaring a group of them together like so `const {Menu, app, BrowserWindow, dialog} = require('electron') `
This is a HACK and will not persist in the long run, its technically abusing a feature of (standard js)[https://www.npmjs.com/package/standard#i-use-a-library-that-pollutes -the-global-namespace-how-do-i-prevent-variable-is-not-defined-errors]. Doing so is warranted as adhering to standard JS will involve a refactor of code logic which I deem better addressed in its own ticket
This is a noted problem in the standard documentation relating to how mocha works as a test suite
basically catching jQuery and the HandsOnTable object
StandardJS mandates path.join but Electron stipulation of interpolation also passes muster https://github.com/electron/electron/blob/master/docs/api/browser-window .md
Standard requires errors to be thrown
this seems a suspect/shallow way of catching errors, but the usual way of `.on(err, //etc)` doesn’t satisfy standards so including this way to satisfy standardJS
Including only to satisfy StandardJS - I’m really not sure that errors need to be caught during specs but happy to be corrected by someone more au fait with this
this may or may not be worth keeping
let statement declares a block scope local variable, which can then be modified in mocha `beforeEach` and still pass standardJS standards
There were two vars called hot up until this point I suspect this spec (line 25 - 35) needs a refactor
coverage WILL drop for this as I've pruned some non useful tests |
not sure if this will work but making the amendment so this PR is consistent all the way around
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.
This is to fix #175
Including standard has actually flagged up a lot of errors within Comma Chameleon, which is obviously a good thing but also why a WiP label is attached to this PR. Will use this PR as a place from which to list the relevant bugs that have been encountered