Skip to content

Commit b08eef9

Browse files
committed
update structure
1 parent 4c525c5 commit b08eef9

File tree

7 files changed

+74
-2
lines changed

7 files changed

+74
-2
lines changed

.editorconfig

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false
14+
15+
[Makefile]
16+
indent_style = tab

.eslintrc

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"extends": "eslint-config-airbnb",
3+
"parser": "babel-eslint",
4+
"rules": {
5+
"spaced-comment": [0],
6+
"no-unused-vars": [0],
7+
"no-empty": [0],
8+
"react/wrap-multilines": [0],
9+
"react/no-multi-comp": [0],
10+
"no-constant-condition": [0],
11+
"react/jsx-no-bind": [0],
12+
"react/prop-types": [0],
13+
"arrow-body-style": [0],
14+
"react/prefer-stateless-function": [0],
15+
"semi": [0]
16+
},
17+
"ecmaFeatures": {
18+
"experimentalObjectRestSpread": true
19+
}
20+
}

.stylelintrc

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"extends": "stylelint-config-standard",
3+
"rules": {
4+
"string-quotes": "single",
5+
"selector-pseudo-class-no-unknown": [
6+
true,
7+
{
8+
"ignorePseudoClasses": [
9+
"global",
10+
"local"
11+
]
12+
}
13+
]
14+
}
15+
}

docs/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# 项目文档
2+

package.json

+15-1
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,40 @@
33
"version": "0.0.1",
44
"description": "react+babel+webpack",
55
"author": "jiangxiyang",
6+
"engines": {
7+
"node": ">=5.0 <7",
8+
"npm": ">=3.3 <4"
9+
},
610
"devDependencies": {
11+
"antd": "^1.6.2",
712
"babel-core": "^6.4.5",
13+
"babel-eslint": "^6.0.0",
814
"babel-loader": "^6.2.1",
915
"babel-preset-es2015": "^6.3.13",
1016
"babel-preset-react": "^6.3.13",
1117
"css-loader": "^0.23.1",
18+
"eslint": "^2.7.0",
19+
"eslint-config-airbnb": "6.x",
20+
"eslint-plugin-react": "4.x",
1221
"file-loader": "^0.9.0",
1322
"less": "^2.7.1",
1423
"less-loader": "^2.2.3",
1524
"react": "^15.0.2",
1625
"react-dom": "^15.0.2",
1726
"react-router": "^2.0.1",
1827
"style-loader": "^0.13.1",
28+
"stylelint": "^6.6.0",
29+
"stylelint-config-standard": "^9.0.0",
1930
"url-loader": "^0.5.7",
2031
"webpack": "^1.12.12",
2132
"webpack-dev-server": "^1.14.1"
2233
},
2334
"dependencies": {},
2435
"scripts": {
2536
"build": "webpack",
26-
"dev": "webpack-dev-server --devtool eval --progress --colors --content-base dist --hot --inline"
37+
"dev": "webpack-dev-server --devtool eval --progress --colors --content-base dist --hot --inline",
38+
"eslint": "eslint --ext .js,.jsx src",
39+
"stylelint": "stylelint \"src/**/*.css\"",
40+
"lint": "npm run eslint && npm run stylelint"
2741
}
2842
}

src/components/Hello/index.css

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.testStyle {
2+
color: yellow;
3+
}

src/components/Hello/index.jsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import React from 'react';
2+
import { DatePicker } from 'antd';
23
import './index.less'
4+
import 'antd/dist/antd.min.css'
35

46
class Hello extends React.Component {
57
render() {
6-
return <h1 className="testStyle">Hello, world</h1>;
8+
return <div><h1 className="testStyle">Hello, world</h1><DatePicker/></div>;
79
}
810
}
911

0 commit comments

Comments
 (0)