Skip to content

Commit

Permalink
Merge branch 'alpha'
Browse files Browse the repository at this point in the history
  • Loading branch information
mguellsegarra committed Jan 15, 2024
2 parents 7942c98 + f9cca62 commit af405cc
Show file tree
Hide file tree
Showing 54 changed files with 24,878 additions and 48,386 deletions.
93 changes: 93 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"plugin:react/recommended",
"standard-with-typescript",
"plugin:react-hooks/recommended",
"prettier"
],
"overrides": [],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["react"],
"rules": {
"@typescript-eslint/semi": "off",
"@typescript-eslint/member-delimiter-style": "off",
"@typescript-eslint/consistent-type-definitions": ["off"],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/comma-dangle": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/naming-convention": "off",
"react/react-in-jsx-scope": "off",
// These have to be reviewed and turn to on/warn
"no-empty": "warn",
"one-var": "warn",
"react/prop-types": "warn",
"react/display-name": "warn",
"@typescript-eslint/no-unused-vars": "warn",
"prefer-const": "warn",
"import/no-duplicates": "warn",
"@typescript-eslint/array-type": "warn",
"no-prototype-builtins": "warn",
"no-useless-return": "warn",
"array-callback-return": "warn",
"eqeqeq": "warn",
"no-useless-escape": "warn",
"no-irregular-whitespace": "warn",
"no-undef-init": "warn",
"react/jsx-no-target-blank": "warn",
"react/jsx-key": "warn",
"react/no-children-prop": "warn",
"import/first": "warn",
"no-unneeded-ternary": "warn",
"react-hooks/rules-of-hooks": "warn",
"spaced-comment": "warn",
"no-async-promise-executor": "warn",
"@typescript-eslint/return-await": "off",
"@typescript-eslint/no-dynamic-delete": "off",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/consistent-indexed-object-style": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-misused-promise": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/prefer-includes": "off",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/prefer-optional-chain": "off",
"@typescript-eslint/consistent-type-assertions": "off",
"@typescript-eslint/promise-function-async": "off",
"@typescript-eslint/no-extraneous-class": "off",
"@typescript-eslint/no-throw-literal": "off"
},
"settings": {
"react": {
"version": "18.2.0" // React version. "detect" automatically picks the version you have installed.
}
},
"ignorePatterns": [
"vite.config.ts",
"node_modules",
"build",
"report",
"coverage",
"docs",
"public",
"**/*.test.*",
"**/*.stories.*",
"**/*.spec.*",
"src/__tests__",
"src/stories"
]
}
35 changes: 35 additions & 0 deletions .github/workflows/npm_publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Manual NPM publish

on:
workflow_dispatch:
inputs:
version_tag:
description: 'Version tag'
required: true

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20.5.0'
registry-url: 'https://registry.npmjs.org/'

- name: Checkout Repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.version_tag }}

- name: Install Dependencies
run: npm ci

- name: Build
run: npm run build

- name: NPM publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
14 changes: 7 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Release
on:
push:
branches:
# - main
# - develop
- main
- develop
- alpha
workflow_dispatch:

Expand All @@ -13,16 +13,16 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20.5.0'

- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install Dependencies
run: npm ci

Expand Down
29 changes: 26 additions & 3 deletions .github/workflows/update_dependent_projects_alpha.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,51 @@
name: Update dependent projects (ALPHA)
name: Update dependent projects (alpha)

on:
release:
types: [published]
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name'
required: false
prerelease:
description: 'Prerelease'
required: false
default: 'false'

env:
LIBRARY_NAME: "gisce/react-formiga-components"

jobs:
update-dependents:
if: github.event.release.prerelease == true && contains(github.event.release.tag_name, '-alpha.') && !contains(github.event.release.tag_name, '-rc.')
runs-on: ubuntu-latest
strategy:
matrix:
include:
- project: "gisce/react-ooui"
branch: "alpha"
steps:
- name: Set environment variables and check condition
run: |
TAG_NAME="${{ github.event.release.tag_name || github.event.inputs.tag_name }}"
PRERELEASE="${{ github.event.release.prerelease || github.event.inputs.prerelease }}"
if [ "$PRERELEASE" == "true" ] && [[ "$TAG_NAME" != *'-rc.'* ]] && [[ "$TAG_NAME" == *'-alpha.'* ]]; then
SHOULD_RUN="true"
else
SHOULD_RUN="false"
fi
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
echo "SHOULD_RUN=$SHOULD_RUN" >> $GITHUB_ENV
- name: Check Prerelease and Tag Version
if: env.SHOULD_RUN == 'true'
run: echo "Running update for tag ${{ env.TAG_NAME }}"
- name: Call Reusable Workflow for each project
if: env.SHOULD_RUN == 'true'
uses: gisce/[email protected]
with:
dependentProject: ${{ matrix.project }}
tagName: ${{ github.event.release.tag_name }}
tagName: ${{ env.TAG_NAME }}
dependentProjectBranch: ${{ matrix.branch }}
libraryName: ${{ env.LIBRARY_NAME }}
githubToken: ${{ secrets.GH_PAT }}
51 changes: 51 additions & 0 deletions .github/workflows/update_dependent_projects_v2-develop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Update dependent projects (v2-develop)

on:
release:
types: [published]
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name'
required: false
prerelease:
description: 'Prerelease'
required: false
default: 'false'

env:
LIBRARY_NAME: "gisce/react-formiga-components"

jobs:
update-dependents:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- project: "gisce/react-ooui"
branch: "v2-develop"
steps:
- name: Set environment variables and check condition
run: |
TAG_NAME="${{ github.event.release.tag_name || github.event.inputs.tag_name }}"
PRERELEASE="${{ github.event.release.prerelease || github.event.inputs.prerelease }}"
if [ "$PRERELEASE" == "true" ] && [[ "$TAG_NAME" == *'-rc.'* ]] && [[ "$TAG_NAME" != *'-alpha.'* ]]; then
SHOULD_RUN="true"
else
SHOULD_RUN="false"
fi
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
echo "SHOULD_RUN=$SHOULD_RUN" >> $GITHUB_ENV
- name: Check Prerelease and Tag Version
if: env.SHOULD_RUN == 'true'
run: echo "Running update for tag ${{ env.TAG_NAME }}"
- name: Call Reusable Workflow for each project
if: env.SHOULD_RUN == 'true'
uses: gisce/[email protected]
with:
dependentProject: ${{ matrix.project }}
tagName: ${{ env.TAG_NAME }}
dependentProjectBranch: ${{ matrix.branch }}
libraryName: ${{ env.LIBRARY_NAME }}
githubToken: ${{ secrets.GH_PAT }}
51 changes: 51 additions & 0 deletions .github/workflows/update_dependent_projects_v2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Update dependent projects (v2)

on:
release:
types: [published]
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name'
required: false
prerelease:
description: 'Prerelease'
required: false
default: 'false'

env:
LIBRARY_NAME: "gisce/react-formiga-components"

jobs:
update-dependents:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- project: "gisce/react-ooui"
branch: "v2"
steps:
- name: Set environment variables and check condition
run: |
TAG_NAME="${{ github.event.release.tag_name || github.event.inputs.tag_name }}"
PRERELEASE="${{ github.event.release.prerelease || github.event.inputs.prerelease }}"
if [ "$PRERELEASE" != "true" ] then
SHOULD_RUN="true"
else
SHOULD_RUN="false"
fi
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
echo "SHOULD_RUN=$SHOULD_RUN" >> $GITHUB_ENV
- name: Check Prerelease and Tag Version
if: env.SHOULD_RUN == 'true'
run: echo "Running update for tag ${{ env.TAG_NAME }}"
- name: Call Reusable Workflow for each project
if: env.SHOULD_RUN == 'true'
uses: gisce/[email protected]
with:
dependentProject: ${{ matrix.project }}
tagName: ${{ env.TAG_NAME }}
dependentProjectBranch: ${{ matrix.branch }}
libraryName: ${{ env.LIBRARY_NAME }}
githubToken: ${{ secrets.GH_PAT }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json

.eslintcache

Expand Down
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 -- 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 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
5 changes: 1 addition & 4 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
src
coverage
.storybook
storybook-static
package-lock.json
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.5.0
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
build/
dist/
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": false
}
29 changes: 0 additions & 29 deletions .storybook/main.js

This file was deleted.

Loading

0 comments on commit af405cc

Please sign in to comment.