Skip to content

Commit 145eb0f

Browse files
CHEN HSUCHINGCHEN HSUCHING
authored andcommitted
first commit
0 parents  commit 145eb0f

23 files changed

+17590
-0
lines changed

.DS_Store

8 KB
Binary file not shown.

.babelrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"presets": [
3+
"@babel/preset-env",
4+
"@babel/preset-react"
5+
],
6+
"plugins": [
7+
"@babel/plugin-proposal-export-default-from",
8+
"@babel/plugin-proposal-class-properties"
9+
]
10+
}

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.eslintrc

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
{
2+
"parser": "babel-eslint",
3+
"env": {
4+
"browser": true,
5+
"node": true,
6+
"mocha": true
7+
},
8+
"globals": {
9+
"ENV": false
10+
},
11+
"extends": "airbnb",
12+
"rules": {
13+
"no-nested-ternary": 0,
14+
"object-curly-newline": 0,
15+
"linebreak-style": 0,
16+
"no-debugger": 0,
17+
"no-alert": 0,
18+
"no-console": 0,
19+
"react/forbid-prop-types": 0,
20+
"no-useless-return": 0,
21+
"jsx-a11y/no-static-element-interactions": 0,
22+
"react/jsx-one-expression-per-line": 0,
23+
"no-useless-escape": 0,
24+
"react/no-find-dom-node": 0,
25+
"no-param-reassign": 0,
26+
"max-len": 0,
27+
"react/sort-comp": 0,
28+
"indent": 0,
29+
"quotes": 0,
30+
"comma-dangle": [
31+
"off"
32+
],
33+
"no-unused-vars": [
34+
"warn"
35+
],
36+
"object-curly-spacing": [
37+
"off"
38+
],
39+
"padded-blocks": [
40+
"off"
41+
],
42+
"react/jsx-closing-bracket-location": [
43+
"off"
44+
],
45+
"react/jsx-filename-extension": [
46+
1,
47+
{
48+
"extensions": [
49+
".js",
50+
".jsx"
51+
]
52+
}
53+
],
54+
"react/jsx-space-before-closing": [
55+
"off"
56+
],
57+
"react/prefer-stateless-function": [
58+
"off"
59+
],
60+
"no-underscore-dangle": [
61+
"error",
62+
{
63+
"allowAfterThis": true
64+
}
65+
],
66+
"import/no-unresolved": [
67+
"error",
68+
{
69+
"ignore": [
70+
"components/",
71+
"config/",
72+
"containers/",
73+
"locale",
74+
"redux_flow/",
75+
"static/",
76+
"theme/",
77+
"utils/"
78+
]
79+
}
80+
],
81+
"import/no-extraneous-dependencies": [
82+
"off"
83+
],
84+
"import/extensions": "off",
85+
"global-require": "off"
86+
}
87+
}

.gitignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Logs
2+
logs
3+
*.log
4+
5+
# Runtime data
6+
pids
7+
*.pid
8+
*.seed
9+
10+
# Directory for instrumented libs generated by jscoverage/JSCover
11+
lib-cov
12+
13+
# Coverage directory used by tools like istanbul
14+
coverage
15+
16+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17+
.grunt
18+
19+
# node-waf configuration
20+
.lock-wscript
21+
22+
# Compiled binary addons (http://nodejs.org/api/addons.html)
23+
build/Release
24+
25+
# Dependency directory
26+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
27+
node_modules
28+
29+
# Bower
30+
bower_components/
31+
32+
# Dist folder
33+
dist/
34+
35+
# IDE/Editor data
36+
.idea/
37+
38+
bin/
39+
.docz/

.npmignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
dist/
2+
node_modules/
3+
src/
4+
.vscode/
5+
.docz/
6+
.doc/
7+
screenshoot/

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
language: node_js
2+
node_js:
3+
- "6"
4+
script:
5+
- npm run lint
6+
- npm run dist

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"javascript.validate.enable": false,
3+
"typescript.validate.enable": false
4+
}

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM nginx
2+
COPY ./dist/ /usr/share/nginx/html

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# React Autocorrect Input Component
2+
3+
this is a 8 bit style component
4+
5+
![screenshoot](screenshot/screenshot.gif)
6+
7+
### Doc
8+
https://reactmaker.github.io/react-autocorrect-input/
9+
10+
### requirement
11+
12+
- React 16.4^
13+
14+
### Download from NPM
15+
16+
```
17+
npm install @reactmaker/react-autocorrect-input
18+
```
19+
20+
### How to use
21+
22+
```javascript
23+
import React from 'react';
24+
import { render } from 'react-dom';
25+
import { hot } from 'react-hot-loader';
26+
import Input from './components/Input';
27+
28+
class Demo extends React.Component {
29+
state = {
30+
value: '',
31+
dataSource: ['apple', 'ask', 'applice', 'best', 'book', 'beep', 'cat', 'can', 'car'],
32+
}
33+
34+
onChange = (value) => this.setState({ value })
35+
36+
render() {
37+
const { value, dataSource } = this.state;
38+
return (
39+
<Input onChange={this.onChange} value={value} dataSource={dataSource} />
40+
);
41+
}
42+
}
43+
44+
const Main = hot(module)(Demo);
45+
46+
render(<Main />, document.getElementById('app'));
47+
48+
```

0 commit comments

Comments
 (0)