Skip to content

Commit

Permalink
New alpha version
Browse files Browse the repository at this point in the history
  • Loading branch information
mguellsegarra committed Dec 4, 2023
1 parent 2d93ed7 commit b82485c
Show file tree
Hide file tree
Showing 16 changed files with 10,108 additions and 47,212 deletions.
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
coverage
node_modules
build
docs
report
vite.config.ts
91 changes: 91 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"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": "17.0.2" // React version. "detect" automatically picks the version you have installed.
}
},
"ignorePatterns": [
"node_modules",
"build",
"report",
"coverage",
"public",
"**/*.test.*",
"**/*.stories.*",
"**/*.spec.*",
"src/__tests__",
"src/stories"
]
}
42 changes: 42 additions & 0 deletions .github/workflows/create_dependencies_alpha_pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: ALPHA - Create PR on dependencies of this library

on:
release:
types: [published]
workflow_dispatch:

jobs:
create-pr:
if: github.event.release.prerelease == true && contains(github.event.release.tag_name, '-alpha.')
runs-on: ubuntu-latest

steps:
- name: Checkout webclient repository
uses: actions/checkout@v2
with:
repository: "gisce/react-ooui"
ref: alpha
token: ${{ secrets.GH_PAT }}

- name: Update library version in package.json
run: |
NEW_VERSION=${{ github.event.release.tag_name }}
NEW_VERSION=${NEW_VERSION#v} # Remove the leading 'v'
sed -i 's|"@gisce/react-formiga-table": "[^"]*"|"@gisce/react-formiga-table": "'"$NEW_VERSION"'"|' package.json
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "20.5.0"

- name: Install npm dependencies and generate package-lock.json
run: |
npm install
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GH_PAT }}
commit-message: "fix: Update @gisce/react-formiga-table to ${{ github.event.release.tag_name }}"
title: "Update @gisce/react-formiga-table to ${{ github.event.release.tag_name }}"
branch: "update-react-formiga-table-${{ github.event.release.tag_name }}"
37 changes: 0 additions & 37 deletions .github/workflows/main.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

on:
push:
branches:
# - main
# - develop
- alpha
workflow_dispatch:

jobs:
release:
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: Install Dependencies
run: npm ci

- name: Run tests
run: npm test

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
run: npx semantic-release
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"

npx tsc --noEmit
npx lint-staged
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
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
}
Loading

0 comments on commit b82485c

Please sign in to comment.