Skip to content

Commit

Permalink
self code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Syneva Runyan committed Nov 19, 2017
1 parent 688b57d commit 48fe247
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 0 additions & 2 deletions addons/info/src/components/Story.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ export default class Story extends React.Component {
open: false,
stylesheet: this.props.styles(JSON.parse(JSON.stringify(stylesheet))),
};

this.marksy = marksy(this.props.marksyConf);
}

Expand Down Expand Up @@ -232,7 +231,6 @@ export default class Story extends React.Component {
padding = matches[0].length;
}
const source = lines.map(s => s.slice(padding)).join('\n');

return <div style={this.state.stylesheet.infoContent}>{this.marksy(source).tree}</div>;
}

Expand Down
2 changes: 1 addition & 1 deletion addons/info/src/components/markdown/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function P(props) {
fontSize: '15px',
};

// P is oftentimes used as a parent element of
// <P> is oftentimes used as a parent element of
// <a> and <pre> elements, which is why <div>
// is used as the outputted element when parsing
// marksy content rather than <p>.
Expand Down
1 change: 0 additions & 1 deletion addons/info/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ function addInfo(storyFn, context, infoOptions) {
maxPropsIntoLine: options.maxPropsIntoLine,
maxPropStringLength: options.maxPropStringLength,
};

return <Story {...props}>{storyFn(context)}</Story>;
}

Expand Down
7 changes: 4 additions & 3 deletions addons/info/src/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React from 'react';
import ReactDOM from 'react-dom';
import AddonInfo, { withInfo, setDefaults } from './';

/* eslint-disable */
const TestComponent = ({ func, obj, array, number, string, bool, empty }) => (
<div>
<h1>{func.toString()}</h1>
Expand All @@ -19,8 +20,8 @@ const TestComponent = ({ func, obj, array, number, string, bool, empty }) => (
<li>1</li>
<li>2</li>
</ui>
</div>
);
</div>);
/* eslint-enable */

const testContext = { kind: 'addon_info', story: 'jest_test' };
const testOptions = { propTables: false };
Expand Down Expand Up @@ -48,7 +49,7 @@ describe('addon Info', () => {
'# Test story \n## with markdown info \ncontaing **bold**, *cursive* text, `code` and [a link](https://github.com)'
)(story);

const ex = ReactDOM.render(<Info />, document.createElement('div'));
ReactDOM.render(<Info />, document.createElement('div'));
});
it('should render with text options', () => {
const Info = withInfo({ text: 'some text here' })(story);
Expand Down
1 change: 0 additions & 1 deletion app/react/src/server/babel_config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ describe('babel_config', () => {
// As the 'fs' is going to be mocked, let's call require.resolve
// so the require.cache has the correct route to the file.
// In fact let's use it in the tests :)

const babelPluginReactDocgenPath = require.resolve('babel-plugin-react-docgen');

it('should return the config with the extra plugins when `plugins` is an array.', () => {
Expand Down

0 comments on commit 48fe247

Please sign in to comment.