Skip to content

Commit

Permalink
Merge pull request #16 from SimformSolutionsPvtLtd/develop
Browse files Browse the repository at this point in the history
Release 1.0.0
  • Loading branch information
mukesh-simform authored Apr 2, 2024
2 parents 53e853c + b97fe2f commit 6fba218
Show file tree
Hide file tree
Showing 145 changed files with 7,609 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/node_modules
example/
lib/
130 changes: 130 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
const OFF = 0;
const WARN = 1;
const ERROR = 2;

module.exports = {
extends: ['@react-native-community', 'prettier'],
plugins: ['prettier'],
root: true,
ignorePatterns: ['.eslintrc.js'],
rules: {
'prettier/prettier': [
'error',
{},
{
usePrettierrc: true,
},
],
'prefer-const': 'warn',
'no-console': ['error', { allow: ['warn', 'error'] }],
// General
indent: [
OFF,
2,
{
SwitchCase: 1,
VariableDeclarator: 1,
outerIIFEBody: 1,
FunctionDeclaration: {
parameters: 1,
body: 1,
},
FunctionExpression: {
parameters: 1,
body: 1,
},
flatTernaryExpressions: true,
offsetTernaryExpressions: true,
},
],
'global-require': OFF,
'no-plusplus': OFF,
'no-cond-assign': OFF,
'max-classes-per-file': [ERROR, 10],
'no-shadow': OFF,
'no-undef': OFF,
'no-bitwise': OFF,
'no-param-reassign': OFF,
'no-use-before-define': OFF,
'linebreak-style': [ERROR, 'unix'],
semi: [ERROR, 'always'],
'object-curly-spacing': [ERROR, 'always'],
'eol-last': [ERROR, 'always'],
'no-console': OFF,
'no-restricted-syntax': [
WARN,
{
selector:
"CallExpression[callee.object.name='console'][callee.property.name!=/^(warn|error|info|trace|disableYellowBox|tron)$/]",
message: 'Unexpected property on console object was called',
},
],
eqeqeq: [WARN, 'always'],
quotes: [
ERROR,
'single',
{ avoidEscape: true, allowTemplateLiterals: false },
],
// typescript
'@typescript-eslint/no-shadow': [ERROR],
'@typescript-eslint/no-use-before-define': [ERROR],
'@typescript-eslint/no-unused-vars': ERROR,
'@typescript-eslint/consistent-type-definitions': [ERROR, 'interface'],
'@typescript-eslint/indent': [
OFF,
2,
{
SwitchCase: 1,
VariableDeclarator: 1,
outerIIFEBody: 1,
FunctionDeclaration: {
parameters: 1,
body: 1,
},
FunctionExpression: {
parameters: 1,
body: 1,
},
flatTernaryExpressions: true,
offsetTernaryExpressions: true,
},
],
// react
'react/jsx-props-no-spreading': OFF,
'react/jsx-filename-extension': [
ERROR,
{ extensions: ['.js', '.jsx', '.ts', '.tsx'] },
],
'react/no-unescaped-entities': [ERROR, { forbid: ['>', '"', '}'] }],
'react/prop-types': [
ERROR,
{ ignore: ['action', 'dispatch', 'nav', 'navigation'] },
],
'react/display-name': OFF,
'react/jsx-boolean-value': ERROR,
'react/jsx-no-undef': ERROR,
'react/jsx-uses-react': ERROR,
'react/jsx-sort-props': [
ERROR,
{
callbacksLast: true,
shorthandFirst: true,
ignoreCase: true,
noSortAlphabetically: true,
},
],
'react/jsx-pascal-case': ERROR,
'react/no-children-prop': OFF,
// react-native specific rules
'react-native/no-unused-styles': ERROR,
'react-native/no-inline-styles': ERROR,
'react-native/no-color-literals': ERROR,
'react-native/no-raw-text': ERROR,
},
globals: {
JSX: 'readonly',
},
env: {
jest: true,
},
};
23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "🚀 Publish"

on:
push:
branches:
- master

jobs:
release:
name: 🚀 Publish
runs-on: macos-11
steps:
- name: 📚 checkout
uses: actions/[email protected]
- name: 🟢 node
uses: actions/[email protected]
with:
node-version: 16
registry-url: https://registry.npmjs.org
- name: 🚀 Build & Publish
run: yarn install && yarn build && yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
64 changes: 64 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml

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

# 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

# Bundle artifact
*.jsbundle

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

# generated
lib
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

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

npx lint-staged
5 changes: 5 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# npx build
# npx test
10 changes: 10 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.github/
example/
assets/
.eslintignore
.eslintrc
CONTRIBUTING.md
babel.config.js
.buckconfig
jest-setup.js
.husky
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
arrowParens: 'avoid',
bracketSameLine: true,
bracketSpacing: true,
singleQuote: true,
trailingComma: 'es5'
};
35 changes: 35 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Contributing

We welcome code changes that improve this library or fix a problem, and please make sure to follow all best practices and test all the changes/fixes before committing and creating a pull request. 🚀 🚀

### Committing and Pushing Changes

Commit messages should be formatted as:

```
<type>[optional scope]: <description>
[optional body]
[optional footer]
```

Where type can be one of the following:

- feat
- fix
- docs
- chore
- style
- refactor
- test

and an optional scope can be a component

```
docs: update contributing guide
```

```
fix(TicketId/Component): layout flicker issue
```
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Simform Solutions
Copyright (c) 2024 Simform Solutions

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 6fba218

Please sign in to comment.