File tree 7 files changed +74
-2
lines changed
7 files changed +74
-2
lines changed Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
1
+ # 项目文档
2
+
Original file line number Diff line number Diff line change 3
3
"version" : " 0.0.1" ,
4
4
"description" : " react+babel+webpack" ,
5
5
"author" : " jiangxiyang" ,
6
+ "engines" : {
7
+ "node" : " >=5.0 <7" ,
8
+ "npm" : " >=3.3 <4"
9
+ },
6
10
"devDependencies" : {
11
+ "antd" : " ^1.6.2" ,
7
12
"babel-core" : " ^6.4.5" ,
13
+ "babel-eslint" : " ^6.0.0" ,
8
14
"babel-loader" : " ^6.2.1" ,
9
15
"babel-preset-es2015" : " ^6.3.13" ,
10
16
"babel-preset-react" : " ^6.3.13" ,
11
17
"css-loader" : " ^0.23.1" ,
18
+ "eslint" : " ^2.7.0" ,
19
+ "eslint-config-airbnb" : " 6.x" ,
20
+ "eslint-plugin-react" : " 4.x" ,
12
21
"file-loader" : " ^0.9.0" ,
13
22
"less" : " ^2.7.1" ,
14
23
"less-loader" : " ^2.2.3" ,
15
24
"react" : " ^15.0.2" ,
16
25
"react-dom" : " ^15.0.2" ,
17
26
"react-router" : " ^2.0.1" ,
18
27
"style-loader" : " ^0.13.1" ,
28
+ "stylelint" : " ^6.6.0" ,
29
+ "stylelint-config-standard" : " ^9.0.0" ,
19
30
"url-loader" : " ^0.5.7" ,
20
31
"webpack" : " ^1.12.12" ,
21
32
"webpack-dev-server" : " ^1.14.1"
22
33
},
23
34
"dependencies" : {},
24
35
"scripts" : {
25
36
"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"
27
41
}
28
42
}
Original file line number Diff line number Diff line change
1
+ .testStyle {
2
+ color : yellow;
3
+ }
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
+ import { DatePicker } from 'antd' ;
2
3
import './index.less'
4
+ import 'antd/dist/antd.min.css'
3
5
4
6
class Hello extends React . Component {
5
7
render ( ) {
6
- return < h1 className = "testStyle" > Hello, world</ h1 > ;
8
+ return < div > < h1 className = "testStyle" > Hello, world</ h1 > < DatePicker /> </ div > ;
7
9
}
8
10
}
9
11
You can’t perform that action at this time.
0 commit comments