-
Notifications
You must be signed in to change notification settings - Fork 20
Switch to Node 4 #78
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
Switch to Node 4 #78
Conversation
@simonsmith awesome! I'll take a look this week |
@giuseppeg Think you can look today? I'm going to have some free time over the weekend so I'll get #72 sorted too and publish a new version |
hey @simonsmith sorry man I am afraid that I won't be able to look at it before the weekend. |
@giuseppeg Yeah, most of it was just put through |
In fact I can just work off this branch and merge later. So no worries |
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.
looks good to me :)
var exists = fs.existsSync; | ||
var resolve = path.resolve; | ||
var writeFileSync = fs.outputFileSync; | ||
'use strict'; |
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.
do we need this?
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 get an error saying to use const
and let
it has to be in strict mode.
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.
maybe some eslint rule that we can remove?
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 error comes directly from Node
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.
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
An odd limitation I didn't know about but I guess we should be running in strict anyway
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.
same, it seems that we could pass --use_strict
to mocha
or node
but shrug lets keep "use strict"
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.
I suppose we couldn't be sure it would be run that way by users. I noticed stylelint
add it so probably wise to follow suit 👍
const reporter = require('postcss-reporter'); | ||
const stylelint = require('stylelint'); | ||
const stylelintConfigSuit = require('stylelint-config-suitcss'); | ||
let postcss = require('postcss'); // eslint-disable-line prefer-const |
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.
why let
?
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 is just so the rewire
library can override it in the tests
test/encapsulation/browser.js
Outdated
const test = require('tape-css')(require('tape')); | ||
const styles = require('../fixtures/encapsulation.out.css'); | ||
|
||
const dom = ((() => { |
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 additional expression to wrap the iife is probably unnecessary (() => {})()
should be enough
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.
Ah okay, just a copy paste from lebab. Will update
Fixes #75
Fixes #75