Skip to content

Commit 77dc96e

Browse files
committed
feat: using latest react-native-bouncy-checkbox version 4 breaking change
1 parent 3c254e4 commit 77dc96e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+37661
-17140
lines changed

.commitlintrc.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"],
3+
"rules": {
4+
"header-max-length": [0, "always", 150],
5+
"subject-case": [0, "always", "sentence-case"],
6+
"type-enum": [
7+
2,
8+
"always",
9+
[
10+
"ci",
11+
"chore",
12+
"docs",
13+
"feat",
14+
"fix",
15+
"perf",
16+
"refactor",
17+
"revert",
18+
"style",
19+
"test"
20+
]
21+
]
22+
}
23+
}

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/**

.eslintrc.js

+58-12
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,39 @@
11
module.exports = {
22
root: true,
3-
extends: "@react-native-community",
3+
extends: [
4+
"eslint:recommended",
5+
"plugin:react/recommended",
6+
"plugin:@typescript-eslint/recommended",
7+
"@react-native-community",
8+
"prettier",
9+
],
10+
ignorePatterns: [
11+
"**/*/*.js",
12+
"*.js",
13+
"*.svg",
14+
"*.json",
15+
"*.png",
16+
"package.json",
17+
"package-lock.json",
18+
],
419
parser: "@typescript-eslint/parser",
5-
plugins: ["import", "eslint-plugin-import", "@typescript-eslint"],
20+
plugins: [
21+
"import",
22+
"react",
23+
"react-native",
24+
"prettier",
25+
"react-hooks",
26+
"@typescript-eslint",
27+
"promise",
28+
"jest",
29+
"unused-imports",
30+
],
31+
env: {
32+
browser: true,
33+
es2021: true,
34+
"jest/globals": true,
35+
"react-native/react-native": true,
36+
},
637
settings: {
738
"import/resolver": {
839
node: {
@@ -36,9 +67,25 @@ module.exports = {
3667
avoidEscape: true,
3768
},
3869
],
70+
"import/extensions": [
71+
"error",
72+
"never",
73+
{
74+
svg: "always",
75+
model: "always",
76+
style: "always",
77+
png: "always",
78+
jpg: "always",
79+
json: "always",
80+
constant: "always",
81+
},
82+
],
83+
"no-useless-catch": 0,
84+
"react-hooks/exhaustive-deps": 0,
3985
"max-len": ["error", 120],
40-
"@typescript-eslint/ban-ts-comment": 2,
41-
"@typescript-eslint/no-explicit-any": 2,
86+
"@typescript-eslint/ban-ts-comment": 1,
87+
"@typescript-eslint/no-empty-function": 0,
88+
"@typescript-eslint/no-explicit-any": 1,
4289
"@typescript-eslint/explicit-module-boundary-types": 0,
4390
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }],
4491
"react-native/no-unused-styles": 2,
@@ -47,9 +94,8 @@ module.exports = {
4794
"react-native/no-color-literals": 0,
4895
"react-native/no-raw-text": 0,
4996
"import/no-extraneous-dependencies": 2,
50-
"import/extensions": ["error", "never", { svg: "always" }],
5197
"import/no-named-as-default-member": 2,
52-
"import/order": ["error", { "newlines-between": "always" }],
98+
"import/order": 0,
5399
"import/no-duplicates": 2,
54100
"import/no-useless-path-segments": 2,
55101
"import/no-cycle": 2,
@@ -64,14 +110,14 @@ module.exports = {
64110
"import/no-deprecated": 0,
65111
"@typescript-eslint/indent": 0,
66112
"react-hooks/rules-of-hooks": 2,
67-
"react-hooks/exhaustive-deps": [
68-
"error",
69-
{ additionalHooks: "(useMemoOne)" },
70-
],
71-
"jest/no-identical-title": 2,
72-
"jest/valid-expect": 2,
73113
camelcase: 2,
74114
"prefer-destructuring": 2,
75115
"no-nested-ternary": 2,
116+
"prettier/prettier": [
117+
"error",
118+
{
119+
endOfLine: "auto",
120+
},
121+
],
76122
},
77123
};

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit

.husky/pre-commit

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm run prettier
5+
npm run lint

.npmignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
node_modules
44
# Example
55
example
6+
example-manual-state
67
# Assets
78
Assets
8-
assets
9+
assets
10+
11+
.husky
12+
.github

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/**

.prettierrc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"bracketSpacing": true,
3+
"jsxBracketSameLine": false,
4+
"singleQuote": false,
5+
"trailingComma": "all",
6+
"tabWidth": 2,
7+
"semi": true
8+
}

.prettierrc.js

-8
This file was deleted.

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ npm i react-native-bouncy-checkbox-group
2828
<h5><i>IMPORTANT! You need install them</i></h5>
2929

3030
```js
31-
"react-native-bouncy-checkbox": ">= 2.1.5"
31+
"react-native-bouncy-checkbox": ">= 4.0.0"
3232
```
3333

3434
# Usage
@@ -37,7 +37,7 @@ npm i react-native-bouncy-checkbox-group
3737

3838
```jsx
3939
import BouncyCheckboxGroup, {
40-
ICheckboxButton,
40+
CheckboxButton,
4141
} from "react-native-bouncy-checkbox-group";
4242
```
4343

@@ -46,7 +46,7 @@ import BouncyCheckboxGroup, {
4646
```jsx
4747
<BouncyCheckboxGroup
4848
data={staticData}
49-
onChange={(selectedItem: ICheckboxButton) => {
49+
onChange={(selectedItem: CheckboxButton) => {
5050
console.log("SelectedItem: ", JSON.stringify(selectedItem));
5151
}}
5252
/>
@@ -58,15 +58,15 @@ import BouncyCheckboxGroup, {
5858
<BouncyCheckboxGroup
5959
data={verticalStaticData}
6060
style={{ flexDirection: "column" }}
61-
onChange={(selectedItem: ICheckboxButton) => {
61+
onChange={(selectedItem: CheckboxButton) => {
6262
console.log("SelectedItem: ", JSON.stringify(selectedItem));
6363
}}
6464
/>
6565
```
6666

6767
## Data Format
6868

69-
You MUST follow this data format as `ICheckboxButton`
69+
You MUST follow this data format as `CheckboxButton`
7070

7171
```json
7272
[

example/.buckconfig

-6
This file was deleted.

example/.bundle/config

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUNDLE_PATH: "vendor/bundle"
2+
BUNDLE_FORCE_RUBY_PLATFORM: 1

example/.editorconfig

-3
This file was deleted.

example/.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
22
root: true,
3-
extends: '@react-native-community',
3+
extends: '@react-native',
44
};

example/.gitattributes

-3
This file was deleted.

example/.gitignore

+16-10
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23+
ios/.xcode.env.local
2324

2425
# Android/IntelliJ
2526
#
@@ -29,32 +30,37 @@ build/
2930
local.properties
3031
*.iml
3132
*.hprof
33+
.cxx/
34+
*.keystore
35+
!debug.keystore
3236

3337
# node.js
3438
#
3539
node_modules/
3640
npm-debug.log
3741
yarn-error.log
3842

39-
# BUCK
40-
buck-out/
41-
\.buckd/
42-
*.keystore
43-
!debug.keystore
44-
4543
# fastlane
4644
#
4745
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
4846
# screenshots whenever they are needed.
4947
# For more information about the recommended setup visit:
5048
# https://docs.fastlane.tools/best-practices/source-control/
5149

52-
*/fastlane/report.xml
53-
*/fastlane/Preview.html
54-
*/fastlane/screenshots
50+
**/fastlane/report.xml
51+
**/fastlane/Preview.html
52+
**/fastlane/screenshots
53+
**/fastlane/test_output
5554

5655
# Bundle artifact
5756
*.jsbundle
5857

59-
# CocoaPods
58+
# Ruby / CocoaPods
6059
/ios/Pods/
60+
/vendor/bundle/
61+
62+
# Temporary files created by Metro to check the health of the file watcher
63+
.metro-health-check*
64+
65+
# testing
66+
/coverage

example/.prettierrc.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
module.exports = {
2-
bracketSpacing: true,
3-
jsxBracketSameLine: false,
4-
singleQuote: false,
2+
arrowParens: 'avoid',
3+
bracketSameLine: true,
4+
bracketSpacing: false,
5+
singleQuote: true,
56
trailingComma: 'all',
6-
tabWidth: 2,
7-
semi: true,
87
};

example/.watchmanconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{}
1+
{}

0 commit comments

Comments
 (0)