Skip to content
This repository was archived by the owner on Mar 5, 2022. It is now read-only.

Commit 4476e05

Browse files
committed
chore: linting using standard
1 parent 7b4e542 commit 4476e05

File tree

6 files changed

+15
-14
lines changed

6 files changed

+15
-14
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ node_js:
1010
before_script:
1111
- npm prune
1212
script:
13+
- npm run lint
1314
- npm test -- --record
1415
after_success:
1516
- npm run semantic-release

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"build": "webpack -d",
1010
"cy:open": "cypress open",
1111
"transpile": "tsc",
12+
"pretest": "npm run lint",
13+
"lint": "standard --verbose --fix *.js src cypress/integration",
1214
"semantic-release": "semantic-action pre && npm run transpile && npm publish && semantic-action post"
1315
},
1416
"files": [

src/counter.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ export class Counter extends React.Component {
1717
render () {
1818
return <p onClick={this.click.bind(this)}>count: {this.state.count}</p>
1919
}
20-
}
20+
}

src/stateless-alert.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const HelloWorld = ({name, click}) => {
1212

1313
return (
1414
<div>
15-
<a href="#"
15+
<a href='#'
1616
onClick={sayHi}>Say Hi</a>
1717
</div>
1818
)

src/stateless.jsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ import React from 'react'
33
// example stateless component from
44
// https://hackernoon.com/react-stateless-functional-components-nine-wins-you-might-have-overlooked-997b0d933dbc
55
const HelloWorld = ({name, click}) => {
6-
76
return (
87
<div>
9-
<a href="#"
8+
<a href='#'
109
onClick={click(`Hi ${name}`)}>Say Hi</a>
1110
</div>
1211
)

webpack.config.js

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
var webpack = require('webpack')
2-
var path = require('path')
1+
const path = require('path')
32

4-
var BUILD_DIR = path.resolve(__dirname, 'public')
5-
var APP_DIR = path.resolve(__dirname, 'src')
3+
const BUILD_DIR = path.resolve(__dirname, 'public')
4+
const APP_DIR = path.resolve(__dirname, 'src')
65

7-
var config = {
6+
const config = {
87
entry: APP_DIR + '/index.jsx',
98
output: {
109
path: BUILD_DIR,
11-
filename: 'bundle.js',
10+
filename: 'bundle.js'
1211
},
1312
module: {
1413
loaders: [
1514
{
1615
test: /\.jsx?/,
1716
include: APP_DIR,
18-
loader: 'babel-loader',
19-
},
20-
],
21-
},
17+
loader: 'babel-loader'
18+
}
19+
]
20+
}
2221
}
2322

2423
module.exports = config

0 commit comments

Comments
 (0)