Skip to content

Commit f79e83b

Browse files
authored
feat: 2.0.0 (#20)
* [feature/2.0.0] package update, eslint praser plugin changed * [feature/2.0.0] rollup typescript setting add * feat: 2.0.1 done
1 parent 2bfbae9 commit f79e83b

29 files changed

+9713
-513
lines changed

Diff for: .babelrc

+17-13
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
{
2-
"presets": [
3-
["@babel/preset-env", {
4-
"loose": true,
5-
"modules": false,
6-
"targets": "> 0.25%, not dead"
7-
}],
8-
"@babel/preset-react"
2+
"presets": [
3+
[
4+
"@babel/preset-env",
5+
{
6+
"useBuiltIns": "usage",
7+
"modules": false,
8+
"targets": "> 0.25%, not dead"
9+
}
910
],
10-
"plugins": [
11-
"@babel/plugin-transform-runtime",
12-
"@babel/plugin-proposal-class-properties"
13-
]
14-
}
15-
11+
"@babel/preset-react",
12+
"@babel/preset-typescript"
13+
],
14+
"plugins": [
15+
"@babel/plugin-transform-runtime",
16+
"@babel/plugin-proposal-class-properties"
17+
],
18+
"ignore": ["node_modules/**"]
19+
}

Diff for: .editorconfig

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

Diff for: .eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
node_modules/*
22
dist/*
3+
example/index.js
4+
webpack.config.js
5+
rollup.config.js

Diff for: .eslintrc

+16-27
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,19 @@
11
{
2-
"extends": ["airbnb"],
3-
"parser": "babel-eslint",
4-
"plugins": [
5-
"react",
6-
"jsx-a11y",
7-
"import"
8-
],
9-
"env": {
10-
"browser": true
11-
},
12-
"rules": {
13-
"indent": ["error", 4],
14-
"quotes": ["error", "double"],
15-
"max-len": ["error", 350],
16-
"no-unused-vars": ["warn", { "args": "none" }],
17-
"class-methods-use-this": "off",
18-
"jsx-a11y/href-no-hash": "off",
19-
"jsx-a11y/label-has-associated-control": "off",
20-
"camelcase": "error",
21-
"no-return-assign": "off",
22-
"no-noninteractive-element-to-interactive-role": "off",
23-
"no-console": ["error", { "allow": ["log", "error", "warn"] }],
24-
"react/jsx-indent" : ["error", 4],
25-
"react/jsx-indent-props" : ["error", 4],
26-
"import/no-extraneous-dependencies": "off",
27-
"import/prefer-default-export": "off",
28-
"react/destructuring-assignment": "off"
2+
"parser": "@typescript-eslint/parser",
3+
"parserOptions": {
4+
"sourceType": "module"
5+
},
6+
"plugins": ["@typescript-eslint", "prettier"],
7+
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended"],
8+
"rules": {
9+
"prettier/prettier": "error"
10+
},
11+
"env": {
12+
"browser": true
13+
},
14+
"settings": {
15+
"react": {
16+
"version": "detect" // https://github.com/yannickcr/eslint-plugin-react#configuration
2917
}
18+
}
3019
}

Diff for: .npmignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22
.vscode
33
.git*
44

5+
src
56
example
67
node_modules
78
npm-debug.log
89
yarn-debug.log
9-
yarn-error.log
10+
yarn-error.log
11+
demo.gif
12+
rollup.config.js
13+
webpack.config.js
14+
tsconfig.json

Diff for: .prettierignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
dist
2+
src
3+
example
4+
webpack.config.js
5+
*.json
6+
*.md
7+
.babelrc

Diff for: .prettierrc

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"tabWidth": 2,
3+
"singleQuote": true,
4+
"printWidth": 120,
5+
"bracketSpacing": true,
6+
"jsxBracketSameLine": true,
7+
"useTabs": false,
8+
"semi": true,
9+
"requirePragma": false,
10+
"proseWrap": "preserve",
11+
"htmlWhitespaceSensitivity": "ignore",
12+
"endOfLine": "auto",
13+
"trailingComma": "none"
14+
}

Diff for: CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
2.0.0 (November 15, 2020)
4+
- development by typescript
5+
- migration functional component
6+
37
1.0.4 (June 22, 2020)
48
- add 'onClick' props.
59
- can handle callback when image was clicked

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg
1111
[license-url]: https://github.com/kimcoder/react-simple-image-slider/blob/master/LICENSE
1212

13-
Simple ImageSlider Component for ReactJS v16.0<br>
13+
Simple ImageSlider Component for ReactJS v16.13<br>
1414
- Just Two Elements will be used. (for display images)
1515
- Support GPU Render, by default.
1616
- Support Image Preload.
@@ -103,7 +103,7 @@ npm run build:watch // build watch mode
103103
// yarn
104104
yarn example
105105
yarn build
106-
yarn buidl:watch
106+
yarn build:watch
107107
```
108108
If you want to run a test app, should build before do that.<br>
109109

Diff for: example/App.jsx

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import SimpleImageSlider from "..";
1515

1616
class App extends React.Component {
1717
listSubHeader = <ListSubheader><h1>Slider Settings</h1></ListSubheader>;
18-
1918
toggleOptions = ["useGPURender", "showNavs", "showBullets"];
2019

2120
images = [

Diff for: example/index.js

+30-42
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: index.d.ts

-30
This file was deleted.

0 commit comments

Comments
 (0)