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.

0 commit comments

Comments
 (0)