Skip to content

Commit

Permalink
feat: version 1.0.0 with functional component and bounceable latest v…
Browse files Browse the repository at this point in the history
…ersion
  • Loading branch information
WrathChaos committed Jul 8, 2023
1 parent 069fa14 commit a7ef42a
Show file tree
Hide file tree
Showing 72 changed files with 26,731 additions and 34,529 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/**
125 changes: 108 additions & 17 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,123 @@
module.exports = {
root: true,
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"@react-native-community",
"airbnb-typescript",
"prettier",
"prettier/@typescript-eslint",
"prettier/react"
],
parser: "babel-eslint",
plugins: ["react", "react-native"],
ignorePatterns: [
"**/*/*.js",
"*.js",
"*.svg",
"*.json",
"*.png",
"package.json",
"package-lock.json",
],
parser: "@typescript-eslint/parser",
plugins: [
"import",
"react",
"react-native",
"prettier",
"react-hooks",
"@typescript-eslint",
"promise",
"jest",
"unused-imports",
],
env: {
jest: true,
"react-native/react-native": true
browser: true,
es2021: true,
"jest/globals": true,
"react-native/react-native": true,
},
settings: {
"import/resolver": {
node: {
extensions: [
".js",
".jsx",
".ts",
".tsx",
".d.ts",
".android.js",
".android.jsx",
".android.ts",
".android.tsx",
".ios.js",
".ios.jsx",
".ios.ts",
".ios.tsx",
".web.js",
".web.jsx",
".web.ts",
".web.tsx",
],
},
},
},
rules: {
// allow js file extension
"react/jsx-filename-extension": [
quotes: [
"error",
"double",
{
extensions: [".js", ".jsx", ".tsx", ".ts"]
}
avoidEscape: true,
},
],
// for post defining style object in react-native
"no-use-before-define": ["error", { variables: false }],
// react-native rules
"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": 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,
"react-native/split-platform-components": 2,
"react-native/no-inline-styles": 2,
"react-native/no-raw-text": 2
}
"react-native/no-inline-styles": 0,
"react-native/no-color-literals": 0,
"react-native/no-raw-text": 0,
"import/no-extraneous-dependencies": 2,
"import/no-named-as-default-member": 2,
"import/order": 0,
"import/no-duplicates": 2,
"import/no-useless-path-segments": 2,
"import/no-cycle": 2,
"import/prefer-default-export": 0,
"import/no-anonymous-default-export": 0,
"import/named": 0,
"@typescript-eslint/no-empty-interface": 0,
"import/namespace": 0,
"import/default": 0,
"import/no-named-as-default": 0,
"import/no-unused-modules": 0,
"import/no-deprecated": 0,
"@typescript-eslint/indent": 0,
"react-hooks/rules-of-hooks": 2,
camelcase: 2,
"prefer-destructuring": 2,
"no-nested-ternary": 2,
"prettier/prettier": [
"error",
{
endOfLine: "auto",
},
],
},
};
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release npm package

on:
pull_request:
branches:
- master

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "lts/*"
- name: Install dependencies
run: npm install
- name: Install CI dependencies
run: npm ci
- name: Build Library
run: npm run build --if-present
- name: Test Library if possible
run: npm test --if-present
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
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
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.

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
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',
};
1 change: 0 additions & 1 deletion example/.gitattributes

This file was deleted.

31 changes: 17 additions & 14 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 @@ -28,36 +29,38 @@ build/
.gradle
local.properties
*.iml

# Visual Studio Code
#
.vscode/
*.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
11 changes: 5 additions & 6 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,
trailingComma: "all",
tabWidth: 2,
semi: true,
arrowParens: 'avoid',
bracketSameLine: true,
bracketSpacing: false,
singleQuote: true,
trailingComma: 'all',
};
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 a7ef42a

Please sign in to comment.