Skip to content

Commit 0f2edf9

Browse files
author
Marek Rozmus
committed
Fix cod review issues - configuration and list component
1 parent 37bcaea commit 0f2edf9

File tree

11 files changed

+309
-1159
lines changed

11 files changed

+309
-1159
lines changed

.babelrc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
{
22
"presets": [
33
[
4-
"@babel/preset-env", {
4+
"@babel/preset-env",
5+
{
56
"targets": {
6-
"browsers": ["last 2 versions", "safari >= 7"]
7+
"browsers": [">0.25%", "not ie 11", "not op_mini all", "safari >= 7"]
78
},
89
"modules": false
910
}
1011
],
1112
"@babel/preset-react"
1213
],
13-
"plugins": [
14-
["@babel/plugin-proposal-class-properties"]
15-
]
14+
"plugins": [["@babel/plugin-proposal-class-properties"]]
1615
}

.eslintrc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,20 @@
33
"browser": true,
44
"node": true
55
},
6-
"extends": ["plugin:prettier/recommended", "plugin:react/recommended"],
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:prettier/recommended",
9+
"plugin:react/recommended"
10+
],
711
"parser": "babel-eslint",
12+
"plugins": ["react-hooks"],
813
"settings": {
914
"react": {
10-
"version": "detect"
15+
"version": "16.8"
1116
}
1217
},
1318
"rules": {
14-
"no-undef": "error"
19+
"react-hooks/rules-of-hooks": "error",
20+
"react-hooks/exhaustive-deps": "warn"
1521
}
1622
}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.DS_Store
2-
node_modules
2+
node_modules/
33
dist

.prettierrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
2-
"tabWidth": 2,
32
"singleQuote": true
43
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 sandstreamdev
3+
Copyright 2019 Sandstream Development Sp. z o. o.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# react-swipeable-list
22

3+
## Installation
4+
5+
```bash
6+
npm install @sandstreamdev/react-swipeable-list
7+
# or via yarn
8+
yarn add @sandstreamdev/react-swipeable-list
9+
```
10+
11+
## Usage
12+
13+
```javascript jsx
14+
<SwipeableList>
15+
<SwipeableListItem
16+
swipeRight={{
17+
background: <div>Left background</div>,
18+
action: () => console.info('swipe action triggered')
19+
}}
20+
>
21+
<div>Item name</div>
22+
</SwipeableListItem>
23+
</SwipeableList>
24+
```
25+
326
## License
427

528
[MIT](LICENSE).

0 commit comments

Comments
 (0)