Skip to content

Commit 70abea9

Browse files
committed
whitespace to spaces
1 parent 62deb57 commit 70abea9

File tree

5 files changed

+114
-118
lines changed

5 files changed

+114
-118
lines changed

.editorconfig

-4
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,5 @@ end_of_line = lf
99
charset = utf-8
1010
trim_trailing_whitespace = true
1111
insert_final_newline = true
12-
indent_style = tab
13-
indent_size = 2
14-
15-
[*.yml]
1612
indent_style = space
1713
indent_size = 2

Gulpfile.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
var gulp = require('gulp'),
2-
lintspaces = require('gulp-lintspaces');
2+
lintspaces = require('gulp-lintspaces');
33

44
gulp.task('lintspaces', function() {
5-
return gulp.src(['**/*', '!node_modules/**/*'])
6-
.pipe(lintspaces({
7-
editorconfig: '.editorconfig'
8-
}))
9-
.pipe(lintspaces.reporter());
5+
return gulp.src(['**/*', '!node_modules/**/*'])
6+
.pipe(lintspaces({
7+
editorconfig: '.editorconfig'
8+
}))
9+
.pipe(lintspaces.reporter());
1010
});
1111

1212
gulp.task('default', ['lintspaces']);

snippets/Flux.cson

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
".source.js":
3-
"Flux Action":
4-
prefix: "_fa"
5-
body: "'use strict';\nimport ${1:AppDispatcher} from '../dispatcher/${1:AppDispatcher}';\nimport ${2:constants} from '../constants/${2:constants}';\nimport ${3:utils} from '../utils/${3:utils};'\n\nexport default {\n\t${4}\n};"
3+
"Flux Action":
4+
prefix: "_fa"
5+
body: "'use strict';\nimport ${1:AppDispatcher} from '../dispatcher/${1:AppDispatcher}';\nimport ${2:constants} from '../constants/${2:constants}';\nimport ${3:utils} from '../utils/${3:utils};'\n\nexport default {\n\t${4}\n};"
66

7-
"Flux: AppDispatcher":
8-
prefix: "_fd"
9-
body: "'use strict';\nimport { Dispatcher } from 'flux';\n\nlet AppDispatcher = new Dispatcher();\n\nAppDispatcher.handleAction = function(action) {\n\tthis.dispatch({\n\t\tsource: 'VIEW_ACTION',\n\t\taction: action\n\t});};\n\nexport default AppDispatcher;"
7+
"Flux: AppDispatcher":
8+
prefix: "_fd"
9+
body: "'use strict';\nimport { Dispatcher } from 'flux';\n\nlet AppDispatcher = new Dispatcher();\n\nAppDispatcher.handleAction = function(action) {\n\tthis.dispatch({\n\t\tsource: 'VIEW_ACTION',\n\t\taction: action\n\t});};\n\nexport default AppDispatcher;"
1010

11-
"Flux: Store":
12-
prefix: "_fs"
13-
body: "'use strict';\nimport ${1:AppDispatcher} from '../dispatcher/${1:AppDispatcher}';\nimport ${2:appConstants} from '../constants/${2:appConstants}';\nimport { EventEmitter } from 'event';\nimport assign from 'react/lib/Object.assign';\n\nlet _state = {};\n\nlet ${3:store} = assign({}, EventEmitter.prototype, {\n\t${4}\n});\n\nAppDispatcher.register((payload) => {\n\tlet { action } = payload;\n\n\t switch(action.actionType) {\n\n\t\tdefault:\n\t\t\treturn true;\n\t}\n});\n\nexport default ${3:store};"
11+
"Flux: Store":
12+
prefix: "_fs"
13+
body: "'use strict';\nimport ${1:AppDispatcher} from '../dispatcher/${1:AppDispatcher}';\nimport ${2:appConstants} from '../constants/${2:appConstants}';\nimport { EventEmitter } from 'event';\nimport assign from 'react/lib/Object.assign';\n\nlet _state = {};\n\nlet ${3:store} = assign({}, EventEmitter.prototype, {\n\t${4}\n});\n\nAppDispatcher.register((payload) => {\n\tlet { action } = payload;\n\n\t switch(action.actionType) {\n\n\t\tdefault:\n\t\t\treturn true;\n\t}\n});\n\nexport default ${3:store};"
1414
}

snippets/React (JSX).cson

+57-57
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,78 @@
11
{
22
".source.js":
3-
"React: componentDidMount() { ... }":
4-
prefix: "_cdm"
5-
body: "componentDidMount() {\n\t${1}\n},"
3+
"React: componentDidMount() { ... }":
4+
prefix: "_cdm"
5+
body: "componentDidMount() {\n\t${1}\n},"
66

7-
"React: componentDidUpdate(pp, ps) { ... }":
8-
prefix: "_cdup"
9-
body: "componentDidUpdate(prevProps, prevState) {\n\t${1}\n},"
7+
"React: componentDidUpdate(pp, ps) { ... }":
8+
prefix: "_cdup"
9+
body: "componentDidUpdate(prevProps, prevState) {\n\t${1}\n},"
1010

11-
"React: componentWillMount() { ... }":
12-
prefix: "_cwm"
13-
body: "componentWillMount() {\n\t${1}\n},"
11+
"React: componentWillMount() { ... }":
12+
prefix: "_cwm"
13+
body: "componentWillMount() {\n\t${1}\n},"
1414

15-
"React: componentWillReceiveProps(np) { ... }":
16-
prefix: "_cwr"
17-
body: "componentWillReceiveProps(nextProps) {\n\t${1}\n},"
15+
"React: componentWillReceiveProps(np) { ... }":
16+
prefix: "_cwr"
17+
body: "componentWillReceiveProps(nextProps) {\n\t${1}\n},"
1818

19-
"React: componentWillUnmount() { ... }":
20-
prefix: "_cwun"
21-
body: "componentWillUnmount() {\n\t${1}\n},"
19+
"React: componentWillUnmount() { ... }":
20+
prefix: "_cwun"
21+
body: "componentWillUnmount() {\n\t${1}\n},"
2222

23-
"React: componentWillUpdate(np, ns) { ... }":
24-
prefix: "_cwu"
25-
body: "componentWillUpdate(nextProps, nextState) {\n\t${1}\n},"
23+
"React: componentWillUpdate(np, ns) { ... }":
24+
prefix: "_cwu"
25+
body: "componentWillUpdate(nextProps, nextState) {\n\t${1}\n},"
2626

27-
"React: cx({ ... })":
28-
prefix: "_cx"
29-
body: "cx({\n\t$1: $2\n});"
27+
"React: cx({ ... })":
28+
prefix: "_cx"
29+
body: "cx({\n\t$1: $2\n});"
3030

31-
"React: forceUpdate(...)":
32-
prefix: "_fup"
33-
body: "forceUpdate(${1:callback});"
31+
"React: forceUpdate(...)":
32+
prefix: "_fup"
33+
body: "forceUpdate(${1:callback});"
3434

35-
"React: getDefaultProps() { return {...} } ":
36-
prefix: "_gdp"
37-
body: "getDefaultProps() {\n\treturn {\n\t\t${1}\n\t};\n},"
35+
"React: getDefaultProps() { return {...} } ":
36+
prefix: "_gdp"
37+
body: "getDefaultProps() {\n\treturn {\n\t\t${1}\n\t};\n},"
3838

39-
"React: getInitialState() { return {...} } ":
40-
prefix: "_gis"
41-
body: "getInitialState() {\n\treturn {\n\t\t${1}: ${2}\n\t};\n},"
39+
"React: getInitialState() { return {...} } ":
40+
prefix: "_gis"
41+
body: "getInitialState() {\n\treturn {\n\t\t${1}: ${2}\n\t};\n},"
4242

43-
"React: isMounted()":
44-
prefix: "_ism"
45-
body: "isMounted()"
43+
"React: isMounted()":
44+
prefix: "_ism"
45+
body: "isMounted()"
4646

47-
"React: propTypes { ... }":
48-
prefix: "_pt"
49-
body: "propTypes: {\n\t${1}: React.PropTypes.${2:string}\n},"
47+
"React: propTypes { ... }":
48+
prefix: "_pt"
49+
body: "propTypes: {\n\t${1}: React.PropTypes.${2:string}\n},"
5050

51-
"React: component skeleton":
52-
prefix: "_rcc"
53-
body: "import React from 'react';\n\nexport default React.createClass({\n\n\trender() {\n\t\treturn (\n\t\t\t${1:<div />}\n\t\t);\n\t}\n\n});"
51+
"React: component skeleton":
52+
prefix: "_rcc"
53+
body: "import React from 'react';\n\nexport default React.createClass({\n\n\trender() {\n\t\treturn (\n\t\t\t${1:<div />}\n\t\t);\n\t}\n\n});"
5454

55-
"React: render() { return ... }":
56-
prefix: "_ren"
57-
body: "render() {\n\treturn (\n\t\t${1:<div />}\n\t);\n}"
55+
"React: render() { return ... }":
56+
prefix: "_ren"
57+
body: "render() {\n\treturn (\n\t\t${1:<div />}\n\t);\n}"
5858

59-
"React: setState({ ... })":
60-
prefix: "_sst"
61-
body: "setState({\n\t${1}: ${2}\n});"
59+
"React: setState({ ... })":
60+
prefix: "_sst"
61+
body: "setState({\n\t${1}: ${2}\n});"
6262

63-
"React: shouldComponentUpdate(np, ns) { ... }":
64-
prefix: "_scu"
65-
body: "shouldComponentUpdate(nextProps, nextState) {\n\t${1}\n},"
63+
"React: shouldComponentUpdate(np, ns) { ... }":
64+
prefix: "_scu"
65+
body: "shouldComponentUpdate(nextProps, nextState) {\n\t${1}\n},"
6666

67-
"React: this.props.":
68-
prefix: "_props"
69-
body: "this.props.${1}"
67+
"React: this.props.":
68+
prefix: "_props"
69+
body: "this.props.${1}"
7070

71-
"React: this.state.":
72-
prefix: "_state"
73-
body: "this.state.${1}"
71+
"React: this.state.":
72+
prefix: "_state"
73+
body: "this.state.${1}"
7474

75-
"React: render(component, container, [callback])":
76-
prefix: "_rrc"
77-
body: "React.render(${1:<$2 />}, ${3:document.body}${4:, ${5:callback}});"
75+
"React: render(component, container, [callback])":
76+
prefix: "_rrc"
77+
body: "React.render(${1:<$2 />}, ${3:document.body}${4:, ${5:callback}});"
7878
}

snippets/React Router.cson

+42-42
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
{
22
".source.js":
3-
"Router: router skeleton":
4-
prefix: "_rr"
5-
body: "'use strict';\nimport React from 'react';\nimport Router from 'react-router';\nlet { Route, DefaultRoute, NotFoundRoute } = Router;\n\n// -- Import components\nimport ${1:App} from '${2}';\n\nexport default (\n\t<Route handler={${1:App}} path='/'>\n\t\t${3}\n\t</Route>\n);"
3+
"Router: router skeleton":
4+
prefix: "_rr"
5+
body: "'use strict';\nimport React from 'react';\nimport Router from 'react-router';\nlet { Route, DefaultRoute, NotFoundRoute } = Router;\n\n// -- Import components\nimport ${1:App} from '${2}';\n\nexport default (\n\t<Route handler={${1:App}} path='/'>\n\t\t${3}\n\t</Route>\n);"
66

7-
"Router: Router.run( ... )":
8-
prefix: "_run"
9-
body: "Router.run(${1:routes},${2: Router.HistoryLocaion}, (Handler) => {\n\tReact.render(<Handler />, document.${3:getElementById('${4:app}')});\n});"
7+
"Router: Router.run( ... )":
8+
prefix: "_run"
9+
body: "Router.run(${1:routes},${2: Router.HistoryLocaion}, (Handler) => {\n\tReact.render(<Handler />, document.${3:getElementById('${4:app}')});\n});"
1010

11-
"Router: Router.create({ ... })":
12-
prefix: "_rc"
13-
body: "var router = Router.create({\n\troutes: ${1:routes},\n\tlocation: Router.HistoryLocatio\n});\nrouter.run((Handler) => {\n\tReact.render(<Handler />, document.${3:getElementById('${4:app}')});\n});"
11+
"Router: Router.create({ ... })":
12+
prefix: "_rc"
13+
body: "var router = Router.create({\n\troutes: ${1:routes},\n\tlocation: Router.HistoryLocatio\n});\nrouter.run((Handler) => {\n\tReact.render(<Handler />, document.${3:getElementById('${4:app}')});\n});"
1414

15-
"Router: <Route />":
16-
prefix: "_rt"
17-
body: "<Route name='${1}' handler={${2}} ${3:path='${4}'} />"
15+
"Router: <Route />":
16+
prefix: "_rt"
17+
body: "<Route name='${1}' handler={${2}} ${3:path='${4}'} />"
1818

19-
"Router: Nested <Route></Route>":
20-
prefix: "_nrt"
21-
body: "<Route name='${1}' handler={${2}} ${3:path='${4}'}>\n\t${5}\n</Route>"
19+
"Router: Nested <Route></Route>":
20+
prefix: "_nrt"
21+
body: "<Route name='${1}' handler={${2}} ${3:path='${4}'}>\n\t${5}\n</Route>"
2222

23-
"Router: <Redirect />":
24-
prefix: "_rrt"
25-
body: "<Redirect from='${1}' to=${2} />"
23+
"Router: <Redirect />":
24+
prefix: "_rrt"
25+
body: "<Redirect from='${1}' to=${2} />"
2626

27-
"Router: <NotFoundRoute />":
28-
prefix: "_nfrt"
29-
body: "<NotFoundRoute handler={${1}}/>"
27+
"Router: <NotFoundRoute />":
28+
prefix: "_nfrt"
29+
body: "<NotFoundRoute handler={${1}}/>"
3030

31-
"Router: <DefaultRoute />":
32-
prefix: "_drt"
33-
body: "<DefaultRoute handler={${1}} />"
31+
"Router: <DefaultRoute />":
32+
prefix: "_drt"
33+
body: "<DefaultRoute handler={${1}} />"
3434

35-
"Router: <Link />":
36-
prefix: "_ln"
37-
body: "<Link to={${1}} params={${2}} ${3:query={${4}}}/>"
35+
"Router: <Link />":
36+
prefix: "_ln"
37+
body: "<Link to={${1}} params={${2}} ${3:query={${4}}}/>"
3838

39-
"Router: willTransitionTo(t, p) { ... }":
40-
prefix: "_wtt"
41-
body: "willTransitionTo(transition, params) {\n\t${1}\n},"
39+
"Router: willTransitionTo(t, p) { ... }":
40+
prefix: "_wtt"
41+
body: "willTransitionTo(transition, params) {\n\t${1}\n},"
4242

43-
"Router: willTransitionFrom(t, c) { ... }":
44-
prefix: "_wtf"
45-
body: "willTransitionFrom(transition, component) {\n\t${1}\n},"
43+
"Router: willTransitionFrom(t, c) { ... }":
44+
prefix: "_wtf"
45+
body: "willTransitionFrom(transition, component) {\n\t${1}\n},"
4646

47-
"Router: transition.abort()":
48-
prefix: "_ta"
49-
body: "transition.abort();"
47+
"Router: transition.abort()":
48+
prefix: "_ta"
49+
body: "transition.abort();"
5050

51-
"Router: transition.retry()":
52-
prefix: "_tr"
53-
body: "transition.retry();"
51+
"Router: transition.retry()":
52+
prefix: "_tr"
53+
body: "transition.retry();"
5454

55-
"Router: transition.redirect()":
56-
prefix: "_trd"
57-
body: "transition.redirect(${1:to}, ${2:params}, ${3:query});"
55+
"Router: transition.redirect()":
56+
prefix: "_trd"
57+
body: "transition.redirect(${1:to}, ${2:params}, ${3:query});"
5858
}

0 commit comments

Comments
 (0)