Skip to content

Commit

Permalink
Merge pull request #1 from squidit/feature/estruturando-o-projeto
Browse files Browse the repository at this point in the history
  • Loading branch information
wandersonsales-dev committed Oct 25, 2023
2 parents 6245409 + 965b6d3 commit 935e037
Show file tree
Hide file tree
Showing 23 changed files with 17,626 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"ts-react-important-stuff",
"plugin:prettier/recommended",
"plugin:react-hooks/recommended"
],
"plugins": ["react-hooks"],
"rules": {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn"
},
"parser": "@babel/eslint-parser",
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"no-throw-literal": "off",
"no-unsafe-optional-chaining": "off",
"no-async-promise-executor": "off",
"jsx-a11y/label-has-associated-control": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/ban-ts-comment": "off",
"semi": [2, "never"],
"quotes": [2, "single"]
}
}
]
}
45 changes: 45 additions & 0 deletions .github/workflows/doc-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy Docs
on:
workflow_run:
workflows: ["Publish on Github"]
types:
- completed
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
- uses: actions/configure-pages@v3
- name: Build
run: |
npm install
npm run deploy-storybook
echo "react-css.squidit.com.br" > CNAME
cd .storybook-static
echo "react-css.squidit.com.br" > CNAME
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ".storybook-static/"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
23 changes: 23 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish on Github

on:
release:
types: [created]

jobs:
build:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: https://npm.pkg.github.com/
scope: "@squidit"
- run: npm install
- run: npm run test
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
dist

#storybook build directory
storybook-static
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
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.gitignore
.prettierignore
yarn.lock
yarn-error.log
package-lock.json
dist
coverage
pnpm-lock.yaml
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"printWidth": 140,
"singleQuote": true,
"useTabs": false,
"tabWidth": 2,
"semi": false,
"bracketSpacing": true,
"endOfLine": "auto"
}
20 changes: 20 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { StorybookConfig } from '@storybook/react-vite'

const config: StorybookConfig = {
stories: ["../src/**/__docs__/*.stories.tsx", "../src/**/__docs__/*.mdx"],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-onboarding',
'@storybook/addon-interactions',
'@storybook/addon-styling-webpack'
],
framework: {
name: '@storybook/react-vite',
options: {},
},
docs: {
autodocs: 'tag',
},
}
export default config
16 changes: 16 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { Preview } from '@storybook/react'
import '../src/styles.scss'

const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
}

export default preview
Loading

0 comments on commit 935e037

Please sign in to comment.