Skip to content

Commit

Permalink
feat: using latest react-native-bouncy-checkbox version 4 breaking ch…
Browse files Browse the repository at this point in the history
…ange
  • Loading branch information
WrathChaos committed Apr 19, 2024
1 parent 3c254e4 commit 77dc96e
Show file tree
Hide file tree
Showing 71 changed files with 37,661 additions and 17,140 deletions.
23 changes: 23 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"extends": ["@commitlint/config-conventional"],
"rules": {
"header-max-length": [0, "always", 150],
"subject-case": [0, "always", "sentence-case"],
"type-enum": [
2,
"always",
[
"ci",
"chore",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test"
]
]
}
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/**
70 changes: 58 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,39 @@
module.exports = {
root: true,
extends: "@react-native-community",
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"@react-native-community",
"prettier",
],
ignorePatterns: [
"**/*/*.js",
"*.js",
"*.svg",
"*.json",
"*.png",
"package.json",
"package-lock.json",
],
parser: "@typescript-eslint/parser",
plugins: ["import", "eslint-plugin-import", "@typescript-eslint"],
plugins: [
"import",
"react",
"react-native",
"prettier",
"react-hooks",
"@typescript-eslint",
"promise",
"jest",
"unused-imports",
],
env: {
browser: true,
es2021: true,
"jest/globals": true,
"react-native/react-native": true,
},
settings: {
"import/resolver": {
node: {
Expand Down Expand Up @@ -36,9 +67,25 @@ module.exports = {
avoidEscape: true,
},
],
"import/extensions": [
"error",
"never",
{
svg: "always",
model: "always",
style: "always",
png: "always",
jpg: "always",
json: "always",
constant: "always",
},
],
"no-useless-catch": 0,
"react-hooks/exhaustive-deps": 0,
"max-len": ["error", 120],
"@typescript-eslint/ban-ts-comment": 2,
"@typescript-eslint/no-explicit-any": 2,
"@typescript-eslint/ban-ts-comment": 1,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-explicit-any": 1,
"@typescript-eslint/explicit-module-boundary-types": 0,
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }],
"react-native/no-unused-styles": 2,
Expand All @@ -47,9 +94,8 @@ module.exports = {
"react-native/no-color-literals": 0,
"react-native/no-raw-text": 0,
"import/no-extraneous-dependencies": 2,
"import/extensions": ["error", "never", { svg: "always" }],
"import/no-named-as-default-member": 2,
"import/order": ["error", { "newlines-between": "always" }],
"import/order": 0,
"import/no-duplicates": 2,
"import/no-useless-path-segments": 2,
"import/no-cycle": 2,
Expand All @@ -64,14 +110,14 @@ module.exports = {
"import/no-deprecated": 0,
"@typescript-eslint/indent": 0,
"react-hooks/rules-of-hooks": 2,
"react-hooks/exhaustive-deps": [
"error",
{ additionalHooks: "(useMemoOne)" },
],
"jest/no-identical-title": 2,
"jest/valid-expect": 2,
camelcase: 2,
"prefer-destructuring": 2,
"no-nested-ternary": 2,
"prettier/prettier": [
"error",
{
endOfLine: "auto",
},
],
},
};
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install commitlint --edit
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run prettier
npm run lint
6 changes: 5 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
node_modules
# Example
example
example-manual-state
# Assets
Assets
assets
assets

.husky
.github
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/**
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"bracketSpacing": true,
"jsxBracketSameLine": false,
"singleQuote": false,
"trailingComma": "all",
"tabWidth": 2,
"semi": true
}
8 changes: 0 additions & 8 deletions .prettierrc.js

This file was deleted.

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ npm i react-native-bouncy-checkbox-group
<h5><i>IMPORTANT! You need install them</i></h5>

```js
"react-native-bouncy-checkbox": ">= 2.1.5"
"react-native-bouncy-checkbox": ">= 4.0.0"
```

# Usage
Expand All @@ -37,7 +37,7 @@ npm i react-native-bouncy-checkbox-group

```jsx
import BouncyCheckboxGroup, {
ICheckboxButton,
CheckboxButton,
} from "react-native-bouncy-checkbox-group";
```

Expand All @@ -46,7 +46,7 @@ import BouncyCheckboxGroup, {
```jsx
<BouncyCheckboxGroup
data={staticData}
onChange={(selectedItem: ICheckboxButton) => {
onChange={(selectedItem: CheckboxButton) => {
console.log("SelectedItem: ", JSON.stringify(selectedItem));
}}
/>
Expand All @@ -58,15 +58,15 @@ import BouncyCheckboxGroup, {
<BouncyCheckboxGroup
data={verticalStaticData}
style={{ flexDirection: "column" }}
onChange={(selectedItem: ICheckboxButton) => {
onChange={(selectedItem: CheckboxButton) => {
console.log("SelectedItem: ", JSON.stringify(selectedItem));
}}
/>
```

## Data Format

You MUST follow this data format as `ICheckboxButton`
You MUST follow this data format as `CheckboxButton`

```json
[
Expand Down
6 changes: 0 additions & 6 deletions example/.buckconfig

This file was deleted.

2 changes: 2 additions & 0 deletions example/.bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
3 changes: 0 additions & 3 deletions example/.editorconfig

This file was deleted.

2 changes: 1 addition & 1 deletion example/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
root: true,
extends: '@react-native-community',
extends: '@react-native',
};
3 changes: 0 additions & 3 deletions example/.gitattributes

This file was deleted.

26 changes: 16 additions & 10 deletions example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
ios/.xcode.env.local

# Android/IntelliJ
#
Expand All @@ -29,32 +30,37 @@ build/
local.properties
*.iml
*.hprof
.cxx/
*.keystore
!debug.keystore

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output

# Bundle artifact
*.jsbundle

# CocoaPods
# Ruby / CocoaPods
/ios/Pods/
/vendor/bundle/

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# testing
/coverage
9 changes: 4 additions & 5 deletions example/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
module.exports = {
bracketSpacing: true,
jsxBracketSameLine: false,
singleQuote: false,
arrowParens: 'avoid',
bracketSameLine: true,
bracketSpacing: false,
singleQuote: true,
trailingComma: 'all',
tabWidth: 2,
semi: true,
};
2 changes: 1 addition & 1 deletion example/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{}
{}
Loading

0 comments on commit 77dc96e

Please sign in to comment.