-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
working on higher order component package
- Loading branch information
0 parents
commit d7beaf0
Showing
95 changed files
with
9,064 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
|
||
const path = require("path") | ||
|
||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
}, | ||
extends: [ | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react/recommended", | ||
"plugin:jest/recommended", | ||
"plugin:promise/recommended", | ||
"prettier", | ||
], | ||
plugins: [ | ||
"@stylexjs", | ||
"@typescript-eslint", | ||
"react", | ||
"react-hooks", | ||
|
||
"react-native", | ||
"import", | ||
"jest", | ||
"testing-library", | ||
"prettier", | ||
"unused-imports", | ||
], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
|
||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
project: path.join(__dirname, "tsconfig.eslint.json"), | ||
}, | ||
ignorePatterns: [ | ||
"*.d.ts", | ||
"package-type-helper.cjs", | ||
"package-type-helper.js", | ||
"rollup-config/*/**", | ||
"rollup-config/rollup-config.ts", | ||
"rollup.config.mjs", | ||
], | ||
rules: { | ||
"@stylexjs/valid-styles": "error", | ||
|
||
"prettier/prettier": [ | ||
"warn", | ||
{ | ||
semi: false, | ||
}, | ||
{ | ||
usePrettierrc: false, | ||
}, | ||
], | ||
// ... your existing rules ... | ||
"react-hooks/exhaustive-deps": [ | ||
"error", | ||
{ | ||
additionalHooks: "(useAnimatedStyle|useDerivedValue|useAnimatedProps)", | ||
}, | ||
], | ||
"@typescript-eslint/no-unused-vars": ["warn"], | ||
"arrow-body-style": "off", | ||
"prefer-arrow-callback": "off", | ||
"prefer-const": "warn", | ||
"no-var": "warn", | ||
"no-throw-literal": "off", | ||
"no-unreachable": "warn", | ||
"import/no-anonymous-default-export": "off", | ||
"no-eq-null": "warn", | ||
"react/no-unescaped-entities": "off", | ||
"no-prototype-builtins": "off", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"promise/always-return": "warn", | ||
"promise/no-return-wrap": "warn", | ||
"promise/param-names": "warn", | ||
"promise/catch-or-return": ["warn", { allowFinally: true }], | ||
"promise/no-native": "off", | ||
"promise/no-nesting": "warn", | ||
"promise/no-promise-in-callback": "warn", | ||
"promise/no-callback-in-promise": "warn", | ||
"promise/avoid-new": "off", | ||
"promise/no-new-statics": "warn", | ||
"promise/no-return-in-finally": "warn", | ||
"promise/valid-params": "warn", | ||
"jest/no-disabled-tests": "off", | ||
"react-native/no-inline-styles": "off", | ||
"jest/no-commented-out-tests": "off", | ||
indent: ["off", 2], | ||
"@typescript-eslint/no-explicit-any": ["off"], | ||
semi: ["off"], | ||
"next/no-html-link-for-pages": "off", | ||
"import/no-default-export": "off", | ||
"@typescript-eslint/consistent-type-imports": [ | ||
"error", | ||
{ | ||
prefer: "type-imports", | ||
}, | ||
], | ||
"react-native/no-color-literals": "off", | ||
"linebreak-style": ["error", "unix"], | ||
quotes: ["off", "double", { allowTemplateLiterals: true }], | ||
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }], | ||
|
||
"react/react-in-jsx-scope": "off", | ||
// Use the custom rule 'react-in-scope' defined via require at the beginning | ||
}, | ||
settings: { | ||
react: { | ||
pragma: "React", | ||
version: "detect", | ||
}, | ||
"import/resolver": { | ||
// If you're using custom module resolution, configure it here | ||
}, | ||
}, | ||
overrides: [ | ||
{ | ||
files: ["*.component.tsx"], | ||
|
||
rules: { | ||
"@typescript-eslint/naming-convention": [ | ||
"error", | ||
{ selector: "variable", format: ["camelCase", "PascalCase"] }, | ||
{ selector: "interface", format: ["PascalCase"] }, | ||
], | ||
}, | ||
}, | ||
{ | ||
files: ["*.hook.tsx"], | ||
rules: { | ||
"import/no-default-export": "error", | ||
}, | ||
}, | ||
], | ||
globals: { | ||
SwaggerEditor: true, | ||
JSX: true, | ||
React: true, | ||
window: true, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# These are supported funding model platforms | ||
|
||
github: # landonwjohnson | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
name: Bug Report | ||
about: Create a report to help us improve | ||
labels: bug | ||
--- | ||
|
||
## Description | ||
Briefly describe the bug encountered. | ||
|
||
## Steps to Reproduce | ||
1. Step 1 | ||
2. Step 2 | ||
3. ... | ||
4. See error | ||
|
||
## Expected Behavior | ||
What did you expect to happen? | ||
|
||
## Actual Behavior | ||
What actually happened? | ||
|
||
## Screenshots | ||
If applicable, add screenshots to help explain the problem. | ||
|
||
## Environment | ||
- **OS:** [e.g. iOS, Windows, Linux] | ||
- **Browser (if relevant):** [e.g. Chrome, Safari] | ||
- **Version:** [e.g. 1.0.0] | ||
|
||
## Additional Context | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: Feature Request | ||
about: Suggest a new feature or enhancement for the project | ||
labels: enhancement | ||
--- | ||
|
||
## Description | ||
Provide a brief description of the feature or enhancement. | ||
|
||
## Motivation | ||
Why is this feature needed? How will it benefit the project? | ||
|
||
## Possible Implementation | ||
How can this feature be added? Do you have any suggestions or ideas? | ||
|
||
## Additional Context | ||
Add any other context, like screenshots or mock-ups, related to the feature request. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
## Description | ||
Briefly describe the changes made. | ||
|
||
## Related Issues | ||
Link any related issues or tasks. | ||
|
||
## Testing | ||
Describe how the changes were tested. | ||
|
||
## Screenshots (if appropriate) | ||
Include any relevant screenshots that demonstrate the changes. | ||
|
||
## Types of Changes | ||
- [ ] Bug fix | ||
- [ ] New feature | ||
- [ ] Breaking change | ||
|
||
## Checklist | ||
- [ ] I have read the CONTRIBUTING document. | ||
- [ ] My code follows the code style of this project. | ||
- [ ] I have updated the documentation accordingly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Release Notes for [Project Name] - v[Version Number] | ||
|
||
## New Features | ||
|
||
|
||
## Bug Fixes | ||
|
||
|
||
## Enhancements | ||
|
||
|
||
## Breaking Changes | ||
|
||
## Known Issues | ||
|
||
## Thanks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Yarn Install and Publish | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' | ||
registry-url: 'https://registry.npmjs.org/' | ||
|
||
- name: Load .env file if exists | ||
run: | | ||
if [ -f .env ]; then | ||
set -a | ||
source .env | ||
set +a | ||
fi | ||
- name: Set Environment Variables with fallback to .env | ||
run: | | ||
echo "NPM_READ_TOKEN=${{ secrets.NPM_READ_TOKEN || env.NPM_READ_TOKEN }}" >> $GITHUB_ENV | ||
echo "NPM_PUBLISH_TOKEN=${{ secrets.NPM_PUBLISH_TOKEN || env.NPM_PUBLISH_TOKEN }}" >> $GITHUB_ENV | ||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Check and bump version if needed | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
CURRENT_VERSION=$(npm view $(node -p "require('./package.json').name") version) | ||
LOCAL_VERSION=$(node -p "require('./package.json').version") | ||
if [ "$CURRENT_VERSION" == "$LOCAL_VERSION" ]; then | ||
npm version patch | ||
fi | ||
- name: Set up .npmrc for authentication | ||
run: | | ||
echo "@devlander:registry=https://registry.npmjs.org/" > ~/.npmrc | ||
echo "//registry.npmjs.org/:_authToken=${NPM_PUBLISH_TOKEN}" >> ~/.npmrc | ||
- name: Debug - Display .npmrc | ||
run: cat ~/.npmrc | ||
continue-on-error: true | ||
|
||
- name: Publish to npm | ||
run: npm publish --access public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Node modules | ||
node_modules/ | ||
|
||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# IDEs and editors | ||
/.idea/ | ||
.vscode/ | ||
*.swp | ||
*.swo | ||
*.swn | ||
*.sublime-project | ||
*.sublime-workspace | ||
|
||
# OS generated | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
ehthumbs.db | ||
Thumbs.db | ||
|
||
dist | ||
.env | ||
|
||
|
||
.yarn/* |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
legacy-peer-deps=true | ||
engine-strict=true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"plugins": ["prettier-plugin-stylex-key-sort"], | ||
"singleQuote": false, | ||
"quoteProps": "as-needed", | ||
"semi": false, | ||
"bracketSpacing": true, | ||
"useTabs": false, | ||
"bracketSameLine": false, | ||
"arrowParens": "always", | ||
"trailingComma": "all", | ||
"endOfLine": "auto" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
nodeLinker: node-modules | ||
|
||
npmPublishAccess: public | ||
|
||
npmRegistries: | ||
"https://registry.npmjs.org": | ||
npmAuthToken: $NPM_PUBLISH_TOKEN | ||
|
||
npmScopes: | ||
your-scope: | ||
npmAuthToken: $NPM_READ_TOKEN | ||
npmRegistryServer: "https://registry.npmjs.org" | ||
|
||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs | ||
spec: "@yarnpkg/plugin-version" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Devlander-Software | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.