Skip to content

Commit a7ef42a

Browse files
committed
feat: version 1.0.0 with functional component and bounceable latest version
1 parent 069fa14 commit a7ef42a

Some content is hidden

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

72 files changed

+26731
-34529
lines changed

.commitlintrc.json

Lines changed: 23 additions & 0 deletions
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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/**

.eslintrc.js

Lines changed: 108 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,123 @@
11
module.exports = {
22
root: true,
33
extends: [
4+
"eslint:recommended",
5+
"plugin:react/recommended",
6+
"plugin:@typescript-eslint/recommended",
47
"@react-native-community",
5-
"airbnb-typescript",
68
"prettier",
7-
"prettier/@typescript-eslint",
8-
"prettier/react"
99
],
10-
parser: "babel-eslint",
11-
plugins: ["react", "react-native"],
10+
ignorePatterns: [
11+
"**/*/*.js",
12+
"*.js",
13+
"*.svg",
14+
"*.json",
15+
"*.png",
16+
"package.json",
17+
"package-lock.json",
18+
],
19+
parser: "@typescript-eslint/parser",
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+
],
1231
env: {
13-
jest: true,
14-
"react-native/react-native": true
32+
browser: true,
33+
es2021: true,
34+
"jest/globals": true,
35+
"react-native/react-native": true,
36+
},
37+
settings: {
38+
"import/resolver": {
39+
node: {
40+
extensions: [
41+
".js",
42+
".jsx",
43+
".ts",
44+
".tsx",
45+
".d.ts",
46+
".android.js",
47+
".android.jsx",
48+
".android.ts",
49+
".android.tsx",
50+
".ios.js",
51+
".ios.jsx",
52+
".ios.ts",
53+
".ios.tsx",
54+
".web.js",
55+
".web.jsx",
56+
".web.ts",
57+
".web.tsx",
58+
],
59+
},
60+
},
1561
},
1662
rules: {
17-
// allow js file extension
18-
"react/jsx-filename-extension": [
63+
quotes: [
1964
"error",
65+
"double",
2066
{
21-
extensions: [".js", ".jsx", ".tsx", ".ts"]
22-
}
67+
avoidEscape: true,
68+
},
2369
],
24-
// for post defining style object in react-native
25-
"no-use-before-define": ["error", { variables: false }],
26-
// react-native rules
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,
85+
"max-len": ["error", 120],
86+
"@typescript-eslint/ban-ts-comment": 1,
87+
"@typescript-eslint/no-empty-function": 0,
88+
"@typescript-eslint/no-explicit-any": 1,
89+
"@typescript-eslint/explicit-module-boundary-types": 0,
90+
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }],
2791
"react-native/no-unused-styles": 2,
2892
"react-native/split-platform-components": 2,
29-
"react-native/no-inline-styles": 2,
30-
"react-native/no-raw-text": 2
31-
}
93+
"react-native/no-inline-styles": 0,
94+
"react-native/no-color-literals": 0,
95+
"react-native/no-raw-text": 0,
96+
"import/no-extraneous-dependencies": 2,
97+
"import/no-named-as-default-member": 2,
98+
"import/order": 0,
99+
"import/no-duplicates": 2,
100+
"import/no-useless-path-segments": 2,
101+
"import/no-cycle": 2,
102+
"import/prefer-default-export": 0,
103+
"import/no-anonymous-default-export": 0,
104+
"import/named": 0,
105+
"@typescript-eslint/no-empty-interface": 0,
106+
"import/namespace": 0,
107+
"import/default": 0,
108+
"import/no-named-as-default": 0,
109+
"import/no-unused-modules": 0,
110+
"import/no-deprecated": 0,
111+
"@typescript-eslint/indent": 0,
112+
"react-hooks/rules-of-hooks": 2,
113+
camelcase: 2,
114+
"prefer-destructuring": 2,
115+
"no-nested-ternary": 2,
116+
"prettier/prettier": [
117+
"error",
118+
{
119+
endOfLine: "auto",
120+
},
121+
],
122+
},
32123
};

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release npm package
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v2
17+
with:
18+
node-version: "lts/*"
19+
- name: Install dependencies
20+
run: npm install
21+
- name: Install CI dependencies
22+
run: npm ci
23+
- name: Build Library
24+
run: npm run build --if-present
25+
- name: Test Library if possible
26+
run: npm test --if-present
27+
- name: Release
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
31+
run: npx semantic-release

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
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

Lines changed: 5 additions & 0 deletions
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

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/**

.prettierrc

Lines changed: 8 additions & 0 deletions
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

Lines changed: 0 additions & 8 deletions
This file was deleted.

example/.buckconfig

Lines changed: 0 additions & 6 deletions
This file was deleted.

example/.bundle/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUNDLE_PATH: "vendor/bundle"
2+
BUNDLE_FORCE_RUBY_PLATFORM: 1

example/.eslintrc.js

Lines changed: 1 addition & 1 deletion
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

Lines changed: 0 additions & 1 deletion
This file was deleted.

example/.gitignore

Lines changed: 17 additions & 14 deletions
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
#
@@ -28,36 +29,38 @@ build/
2829
.gradle
2930
local.properties
3031
*.iml
31-
32-
# Visual Studio Code
33-
#
34-
.vscode/
32+
*.hprof
33+
.cxx/
34+
*.keystore
35+
!debug.keystore
3536

3637
# node.js
3738
#
3839
node_modules/
3940
npm-debug.log
4041
yarn-error.log
4142

42-
# BUCK
43-
buck-out/
44-
\.buckd/
45-
*.keystore
46-
!debug.keystore
47-
4843
# fastlane
4944
#
5045
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
5146
# screenshots whenever they are needed.
5247
# For more information about the recommended setup visit:
5348
# https://docs.fastlane.tools/best-practices/source-control/
5449

55-
*/fastlane/report.xml
56-
*/fastlane/Preview.html
57-
*/fastlane/screenshots
50+
**/fastlane/report.xml
51+
**/fastlane/Preview.html
52+
**/fastlane/screenshots
53+
**/fastlane/test_output
5854

5955
# Bundle artifact
6056
*.jsbundle
6157

62-
# CocoaPods
58+
# Ruby / CocoaPods
6359
/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

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

example/.watchmanconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{}
1+
{}

0 commit comments

Comments
 (0)