Skip to content

Commit

Permalink
Adds code formatting scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
James Kerr committed Aug 10, 2018
1 parent e29c42a commit 103cc9d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ npx jest --watch



## Code Style
## Style

This project uses eslint and prettier for style consistency.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"watch:static": "npm run build:static -- --watch",
"watch:reload": "livereload dist",
"lint": "eslint src",
"format": "prettier"
"format": "prettier 'src/**/*.{js,scss}' --write --loglevel warn"
},
"jest": {
"notify": true,
Expand Down
14 changes: 6 additions & 8 deletions src/js/components/BroLogRawFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ export default class BroLogRawFields extends React.PureComponent {
<section className="raw-fields-section" style={{position: "relative"}}>
<table className="fields-table">
<tbody>
{this.props.broLog
.fieldNames()
.map(fieldName => (
<RawFieldTableRow
key={fieldName}
field={this.props.broLog.getField(fieldName)}
/>
))}
{this.props.broLog.fieldNames().map(fieldName => (
<RawFieldTableRow
key={fieldName}
field={this.props.broLog.getField(fieldName)}
/>
))}
</tbody>
</table>
</section>
Expand Down
4 changes: 3 additions & 1 deletion src/js/components/Spaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ class Spaces extends React.Component {
</header>

<ul className="spaces-list">
{names.map(name => <SpaceInfo key={name} space={spaces[name]} />)}
{names.map(name => (
<SpaceInfo key={name} space={spaces[name]} />
))}
</ul>
</div>
</div>
Expand Down

0 comments on commit 103cc9d

Please sign in to comment.