-
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.
Fix storybook, ts config and vite config
- Loading branch information
1 parent
6d424f5
commit db1a5c3
Showing
36 changed files
with
23,171 additions
and
12,069 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 |
---|---|---|
@@ -1,8 +1,6 @@ | ||
build/ | ||
dist/ | ||
node_modules/ | ||
storybook-static/ | ||
gh-pages-dist/ | ||
.snapshots/ | ||
*.min.js | ||
# See https://github.com/eslint/eslint/issues/12348#issuecomment-536946429 | ||
!.storybook |
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 |
---|---|---|
@@ -1,57 +1,56 @@ | ||
{ | ||
"extends": [ | ||
"collaborne", | ||
"plugin:storybook/recommended" | ||
], | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"**/*.ts", | ||
"**/*.tsx" | ||
], | ||
"extends": [ | ||
"standard-react", | ||
"plugin:prettier/recommended", | ||
"collaborne" | ||
], | ||
"env": { | ||
"node": false | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "17" | ||
} | ||
}, | ||
"plugins": [ | ||
"react-hooks" | ||
], | ||
"rules": { | ||
"react/prop-types": "off", | ||
"react/jsx-handler-names": "off", | ||
"react/jsx-fragments": "off", | ||
"react/no-unused-prop-types": "off", | ||
"react/jsx-uses-react": "off", | ||
"react/react-in-jsx-scope": "off", | ||
"react-hooks/rules-of-hooks": "error", | ||
"react-hooks/exhaustive-deps": "warn", | ||
"camelcase": "warn" | ||
} | ||
}, | ||
{ | ||
"files": "src/**/*.spec.ts", | ||
"extends": [ | ||
"plugin:jest/recommended" | ||
] | ||
}, | ||
{ | ||
"files": [ | ||
".storybook/**/*.ts", | ||
".storybook/**/*.tsx" | ||
], | ||
"parserOptions": { | ||
"project": "tsconfig.test.json" | ||
} | ||
} | ||
] | ||
} | ||
|
||
"extends": "collaborne", | ||
|
||
"overrides": [ | ||
{ | ||
"files": ["**/*.ts", "**/*.tsx"], | ||
|
||
"extends": [ | ||
"standard-react", | ||
"plugin:prettier/recommended", | ||
"collaborne" | ||
], | ||
|
||
"env": { | ||
"node": false | ||
}, | ||
|
||
"settings": { | ||
"react": { | ||
"version": "17" | ||
} | ||
}, | ||
"plugins": ["react-hooks"], | ||
"rules": { | ||
"react/prop-types": "off", | ||
"react/jsx-handler-names": "off", | ||
"react/jsx-fragments": "off", | ||
"react/no-unused-prop-types": "off", | ||
"react/jsx-uses-react": "off", | ||
"react/react-in-jsx-scope": "off", | ||
"react-hooks/rules-of-hooks": "error", | ||
"react-hooks/exhaustive-deps": "warn", | ||
"camelcase": "warn", | ||
"@typescript-eslint/naming-convention": [ | ||
"error", | ||
{ | ||
"selector": "function", | ||
"format": ["PascalCase", "camelCase"] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": "src/**/*.spec.ts", | ||
|
||
"extends": ["plugin:jest/recommended"] | ||
}, | ||
{ | ||
"files": [".storybook/**/*.ts", ".storybook/**/*.tsx"], | ||
|
||
"parserOptions": { | ||
"project": "tsconfig.test.json" | ||
} | ||
} | ||
] | ||
} |
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,18 @@ | ||
name: 'Chromatic' | ||
|
||
on: push | ||
|
||
jobs: | ||
chromatic: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # 👈 Required to retrieve git history | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install dependencies | ||
run: npm ci --unsafe-perm | ||
- name: Run tests | ||
run: npm run test |
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,15 @@ | ||
name: CI | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- run: npm ci --unsafe-perm | ||
- run: npm run build | ||
- run: npm test |
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,23 @@ | ||
name: Publish to NPM | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
publish-npm: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
registry-url: https://registry.npmjs.org/ | ||
- run: npm ci --unsafe-perm | ||
- run: npm run build | ||
- run: npm test | ||
- name: Publish to NPM | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |
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,27 @@ | ||
name: StoryBook and Typedoc Deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy-storybook: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- run: npm ci --unsafe-perm | ||
- run: npm run build | ||
- run: npm test | ||
- run: npm run predeploy | ||
- run: git config --global user.email "storybook@nextapp.co" | ||
- run: git config --global user.name "StoryBook" | ||
- name: Deploy with gh-pages | ||
run: | | ||
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | ||
npm run deploy | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 @@ | ||
DEBUG=* |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.