Skip to content

Commit 02d3e2f

Browse files
author
thisconnect
committed
lint
1 parent 9e83ee5 commit 02d3e2f

File tree

4 files changed

+27
-10
lines changed

4 files changed

+27
-10
lines changed

.eslintrc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "react-app",
3+
"rules": {
4+
"comma-dangle": ["warn", "never"],
5+
"indent": ["warn", 2, { "SwitchCase": 1 }],
6+
"linebreak-style": ["warn", "unix"],
7+
"no-console": "off",
8+
"quotes": ["warn", "single", { "allowTemplateLiterals": true }],
9+
"semi": ["warn", "never"]
10+
}
11+
}

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"concurrently": "^3.4.0",
1414
"electron": "^1.7.1",
1515
"electron-packager": "^8.7.0",
16+
"eslint": "^3.19.0",
1617
"react-scripts": "0.9.5",
1718
"wait-on": "^2.0.2"
1819
},
@@ -25,6 +26,7 @@
2526
"electron-build": "electron-packager ./ --overwrite --out ./dist",
2627
"eject": "react-scripts eject",
2728
"test": "react-scripts test --env=jsdom",
29+
"lint": "eslint src",
2830
"coverage": "npm test -- --coverage"
2931
}
3032
}

src/App.js

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import React, { Component } from 'react';
2-
import logo from './logo.svg';
3-
import './App.css';
1+
import React, { Component } from 'react'
2+
import logo from './logo.svg'
3+
import './App.css'
44

55
class App extends Component {
66
render() {
@@ -17,8 +17,12 @@ class App extends Component {
1717
To get started, edit <code>src/App.js</code> and save to reload.
1818
</p>
1919
</div>
20-
);
20+
)
2121
}
2222
}
2323

24-
export default App;
24+
export default App
25+
26+
asdfef
27+
28+
afeewf

src/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import React from 'react';
2-
import ReactDOM from 'react-dom';
3-
import App from './App';
4-
import './index.css';
1+
import React from 'react'
2+
import ReactDOM from 'react-dom'
3+
import App from './App'
4+
import './index.css'
55

66
//
77

88
ReactDOM.render(
99
<App />,
1010
document.getElementById('root')
11-
);
11+
)

0 commit comments

Comments
 (0)