update dependencies + eslint

This commit is contained in:
ido 2015-02-24 10:07:55 +02:00
parent 0fa3404d81
commit 6826a880ef
4 changed files with 18 additions and 17 deletions

View File

@ -129,7 +129,8 @@
"key-spacing": [1, { "beforeColon": false, "afterColon": true }],
"comma-spacing": 1,
"space-unary-ops": [1, { "words": true, "nonwords": false }],
"indent": [2, 4]
"indent": [2, 4],
"space-before-function-parentheses": [1, {"anonymous": "always", "named": "never"}]
},
"env": {
"browser": false,

View File

@ -21,26 +21,26 @@
},
"homepage": "https://github.com/wix/react-templates",
"dependencies": {
"chalk": "^0.5.1",
"chalk": "^1.0.0",
"cheerio": "^0.18.0",
"escodegen": "^1.6.1",
"esprima-harmony": "^7001.1.0-dev-harmony-fb",
"lodash": "^3.2.0",
"lodash": "^3.3.0",
"optionator": "^0.5.0",
"text-table": "^0.2.0"
},
"devDependencies": {
"brace": "^0.4.0",
"brfs": "^1.3.0",
"brace": "^0.4.1",
"brfs": "^1.4.0",
"coveralls": "^2.11.2",
"grunt": "^0.4.5",
"grunt-browserify": "^3.3.0",
"grunt-browserify": "^3.4.0",
"grunt-contrib-requirejs": "^0.4.4",
"grunt-contrib-uglify": "^0.7.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-eslint": "^6.0.0",
"grunt-eslint": "^7.0.0",
"grunt-node-tap": "^0.1.61",
"istanbul": "^0.3.5",
"istanbul": "^0.3.6",
"react": "^0.12.2",
"tape": "^3.5.0"
},

View File

@ -44,7 +44,7 @@ define(['react', 'lodash', 'jquery', './libs/codemirror-4.8/lib/codemirror'], fu
inner.className = 'CodeMirror-lint-marker-multiple';
}
if (tooltips !== false) {
CodeMirror.on(inner, 'mouseover', function(e) {
CodeMirror.on(inner, 'mouseover', function (e) {
showTooltipFor(e, labels, inner);
});
}
@ -84,7 +84,7 @@ define(['react', 'lodash', 'jquery', './libs/codemirror-4.8/lib/codemirror'], fu
rm(tt);
}
tt.style.opacity = 0;
setTimeout(function() { rm(tt); }, 600);
setTimeout(function () { rm(tt); }, 600);
}
function showTooltipFor(e, content, node) {
@ -93,7 +93,7 @@ define(['react', 'lodash', 'jquery', './libs/codemirror-4.8/lib/codemirror'], fu
CodeMirror.off(node, 'mouseout', hide);
if (tooltip) { hideTooltip(tooltip); tooltip = null; }
}
var poll = setInterval(function() {
var poll = setInterval(function () {
if (tooltip) {
for (var n = node;; n = n.parentNode) {
if (n === document.body) {

View File

@ -97,7 +97,7 @@ define(['react', 'jquery', 'lodash', './playground-fiddle.rt', './playground.rt'
templateSource: '',
validHTML: true,
validProps: true,
setTimeout: function() {
setTimeout: function () {
//console.log('setTimeout');
clearTimeout(this.timeoutID);
this.timeoutID = setTimeout.apply(null, arguments);
@ -171,7 +171,7 @@ define(['react', 'jquery', 'lodash', './playground-fiddle.rt', './playground.rt'
},
showError: function (e, editor) {
var mountNode = this.refs.mount.getDOMNode();
this.setTimeout(function() {
this.setTimeout(function () {
showMessage(editor, e.message);
React.render(
React.createElement('div', {className: 'playground-error'}, e.toString()),
@ -181,7 +181,7 @@ define(['react', 'jquery', 'lodash', './playground-fiddle.rt', './playground.rt'
},
showErrorAnnotation: function (annot, editor) {
var mountNode = this.refs.mount.getDOMNode();
this.setTimeout(function() {
this.setTimeout(function () {
editor.annotate(annot);
React.render(
React.createElement('div', {className: 'playground-error'}, annot.message),
@ -229,7 +229,7 @@ define(['react', 'jquery', 'lodash', './playground-fiddle.rt', './playground.rt'
//this.updateSample(currentState);
return currentState;
},
componentDidMount: function() {
componentDidMount: function () {
if (this.props.fiddle) {
window.addEventListener('resize', this.calcSize);
this.calcSize();
@ -246,10 +246,10 @@ define(['react', 'jquery', 'lodash', './playground-fiddle.rt', './playground.rt'
componentDidUpdate: function () {
this.renderSample();
},
componentWillUnmount: function(){
componentWillUnmount: function (){
window.removeEventListener('resize', this.calcSize);
},
calcSize: function() {
calcSize: function () {
var contentHeight = $(window).height() - $('#header').height();
var height = contentHeight / 2 - 10;