Skip to content

Commit

Permalink
Merge pull request #19 from nteract/bump-and-lint
Browse files Browse the repository at this point in the history
Bump package versions, handle linting
  • Loading branch information
captainsafia committed Aug 23, 2016
2 parents cfaa3b5 + b289486 commit bf86bd6
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 27 deletions.
6 changes: 5 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
},
"rules": {
"camelcase": [0],
"no-console": [2, { allow: ["warn", "error"] }]
"no-underscore-dangle": [0],
"react/no-string-refs": [0],
"react/jsx-filename-extension": [0],
"import/prefer-default-export": [0],
"react/no-find-dom-node": [0]
}
}
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@
"babel-preset-react": "^6.3.13",
"chai": "^3.2.0",
"chai-immutable": "^1.5.4",
"electron-mocha": "^1.2.2",
"electron-prebuilt": "^0.37.8",
"electron-mocha": "^3.0.4",
"electron-prebuilt": "^1.3.4",
"enzyme": "^2.2.0",
"eslint": "^2.7.0",
"eslint-config-airbnb": "^8.0.0",
"eslint": "^3.3.1",
"eslint-config-airbnb": "^10.0.1",
"eslint-plugin-import": "^1.5.0",
"eslint-plugin-jsx-a11y": "^1.0.2",
"eslint-plugin-react": "^5.0.1",
"eslint-plugin-jsx-a11y": "^2.1.0",
"eslint-plugin-react": "^6.1.2",
"immutable": "^3.8.1",
"mkdirp": "^0.5.1",
"mocha": "^2.2.5",
"mocha": "^3.0.2",
"react": "^15.0.1",
"react-addons-test-utils": "^15.0.1",
"react-dom": "^15.0.1",
Expand Down
2 changes: 0 additions & 2 deletions src/components/html-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ export default class HTMLDisplay extends React.Component {
const fragment = range.createContextualFragment(this.props.data);
ReactDOM.findDOMNode(this.refs.here).appendChild(fragment);
} else {
console.warn('Environment does not support Range ' +
'createContextualFragment, falling back on innerHTML');
ReactDOM.findDOMNode(this.refs.here).innerHTML = this.props.data;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/image-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';

export function ImageDisplay(props) {
return (
<img src={`data:${props.mimetype};base64,${props.data}`} />
<img role="presentation" src={`data:${props.mimetype};base64,${props.data}`} />
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/javascript-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class HTMLDisplay extends React.Component {
const element = ReactDOM.findDOMNode(this.refs.here); // eslint-disable-line
eval(this.props.data); // eslint-disable-line
} catch (err) {
console.error('Could not execute user Javascript', err);
console.error('Could not execute user Javascript', err); //eslint-disable-line
}
}
}
Expand Down
26 changes: 12 additions & 14 deletions src/components/latex-display.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import React from 'react';
import katex from 'katex';

export default class LaTeXDisplay extends React.Component {
static propTypes = {
data: React.PropTypes.string,
}

render() {
return (
<div
dangerouslySetInnerHTML={{ // eslint-disable-line
__html: katex.renderToString(this.props.data),
}}
/>
);
}
export default function LaTeXDisplay(props) {
return (
<div
dangerouslySetInnerHTML={{ // eslint-disable-line
__html: katex.renderToString(props.data),
}}
/>
);
}

LaTeXDisplay.propTypes = {
data: React.PropTypes.string,
};
2 changes: 1 addition & 1 deletion test/components/image_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('ImageDisplay', () => {
const component = shallow(
<ImageDisplay data={imageData} mimetype="image/png" />
);
expect(component.html()).to.equal(`<img src="data:image/png;base64,${imageData}"/>`);
expect(component.html()).to.equal(`<img role="presentation" src="data:image/png;base64,${imageData}"/>`);
});
});

Expand Down

0 comments on commit bf86bd6

Please sign in to comment.