Skip to content

Commit

Permalink
chore: migrate library
Browse files Browse the repository at this point in the history
  • Loading branch information
arturosdg committed Nov 21, 2024
1 parent 8a8cbce commit fc17939
Show file tree
Hide file tree
Showing 50 changed files with 7,322 additions and 11,657 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
53 changes: 35 additions & 18 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
{
"extends": ["eslint:recommended", "plugin:react/recommended", "react-app"],

"plugins": ["prettier"],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"react-app",
"plugin:prettier/recommended"
],
"env": { "node": true, "es6": true, "jest": true },
"rules": {
"prettier/prettier": "error",
"arrow-body-style": "off",
"prefer-arrow-callback": "off",
"no-var": "error",
"no-empty": "error",
"block-scoped-var": "error",
Expand All @@ -11,27 +20,35 @@
"no-empty-function": "error",
"semi": ["error", "never"],
"comma-dangle": ["error", "always-multiline"],
"keyword-spacing": ["error", {
"after": true,
"before": true
}],
"keyword-spacing": [
"error",
{
"after": true,
"before": true
}
],
"object-curly-spacing": ["error", "always"],
"template-curly-spacing": ["error", "always"],
"space-before-function-paren": ["error", {
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}],
"object-curly-newline": ["error", {
"ObjectExpression": { "consistent": true },
"ObjectPattern": { "multiline": true }
}],
"template-curly-spacing": ["error", "never"],
"space-before-function-paren": [
"error",
{
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}
],
"object-curly-newline": [
"error",
{
"ObjectExpression": { "consistent": true },
"ObjectPattern": { "multiline": true }
}
],
"max-len": ["error", { "code": 120 }],
"indent": ["error", 2],
"complexity": ["warn", 8],

"react/jsx-curly-spacing": ["error", "always"],
"react/jsx-equals-spacing": ["error", "never"],
"react/jsx-equals-spacing": ["error", "never"]
},
"settings": {
"react": {
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
# This workflow will run tests using node and then publish a package to NPM when a tag is pushed

name: Publish wrapito to npm
name: Publish wrapito-vitest to npm
on:
push:
tags:
- 'v*.*.*'
- 'v*.*.*-beta*'

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run test
- run: npm version --no-git-tag-version ${GITHUB_REF##*/}
- run: npm run publish-package
- name: Publish package
run: |
if [[ ${{ github.ref }} == *-beta* ]]; then
npm run publish-package:beta
else
npm run publish-package
fi
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- name: Build Changelog
Expand All @@ -35,5 +42,4 @@ jobs:
release_name: Release ${{ github.ref }}
body: ${{steps.github_release.outputs.changelog}}
draft: false
prerelease: false

prerelease: ${{ contains(github.ref, '-beta') }}
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.17.1
nodejs 18.18.0
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"tabWidth": 2,
"semi": false,
"trailingComma": "all",
"arrowParens": "avoid",
Expand Down
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 18.18.0
Loading

0 comments on commit fc17939

Please sign in to comment.