-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add configuration files and setup for project environment
- Loading branch information
1 parent
b05b47e
commit e2af981
Showing
264 changed files
with
56,277 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"useBuiltIns": "entry", | ||
"targets": { | ||
"esmodules": true | ||
} | ||
} | ||
], | ||
["@babel/preset-react", { | ||
"runtime": "automatic" | ||
}], | ||
"@babel/preset-typescript" | ||
] | ||
} |
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,7 @@ | ||
{ | ||
"extends": [ | ||
"react-app", | ||
"plugin:storybook/recommended" | ||
], | ||
"ignorePatterns": "stories" | ||
} |
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,21 @@ | ||
[include] | ||
src/.* | ||
stories/.* | ||
|
||
[lints] | ||
all=error | ||
untyped-import=off | ||
unclear-type=off | ||
sketchy-null=off | ||
unsafe-getters-setters=warn | ||
dynamic-export=off | ||
inexact-spread =off | ||
|
||
[options] | ||
include_warnings=false | ||
module.ignore_non_literal_requires=true | ||
|
||
[strict] | ||
|
||
[untyped] | ||
.*/node_modules/**/.* |
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: Bug Report | ||
about: Report a bug encountered while operating core-ui | ||
labels: bug,core-ui | ||
|
||
--- | ||
|
||
**Component**: | ||
|
||
<!-- E.g. 'Layout', 'Table', 'build', 'tests'... --> | ||
|
||
**What happened**: | ||
|
||
**What was expected**: | ||
|
||
**Steps to reproduce** | ||
|
||
**Resolution proposal** (optional): |
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: Improvement | ||
about: Suggest an improvement to the core-ui project | ||
labels: core-ui | ||
|
||
--- | ||
|
||
**Component**: | ||
|
||
<!-- E.g. 'Layout', 'Table', 'build', 'tests'... --> | ||
|
||
**Why this is needed**: | ||
|
||
**What should be done**: | ||
|
||
**Implementation proposal** (strongly recommended): | ||
|
||
**Test plan**: |
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,24 @@ | ||
**Component**: | ||
|
||
<!-- E.g. 'Layout', 'Table', 'build', 'tests'... --> | ||
|
||
**Description**: | ||
|
||
**Design**: | ||
|
||
**Breaking Changes**: | ||
|
||
- [] Breaking Changes | ||
|
||
|
||
--- | ||
|
||
<!-- Declare one or more issues to close once this PR gets merged --> | ||
|
||
Closes: #ISSUE_NUMBER | ||
|
||
<!-- If you want to refer to an issue while not closing it, use: | ||
See: #ISSUE_NUMBER | ||
--> |
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,25 @@ | ||
--- | ||
name: codeQL | ||
|
||
on: | ||
push: | ||
branches: [development/*, stabilization/*, hotfix/*] | ||
pull_request: | ||
branches: [development/*, stabilization/*, hotfix/*] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
analyze: | ||
name: Static analysis with CodeQL | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: typescript, javascript | ||
|
||
- name: Build and analyze | ||
uses: github/codeql-action/analyze@v2 |
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: dependency review | ||
|
||
on: | ||
pull_request: | ||
branches: [development/*, stabilization/*, hotfix/*] | ||
|
||
jobs: | ||
dependency-review: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Dependency Review | ||
uses: actions/dependency-review-action@v3 | ||
with: | ||
fail-on-severity: high |
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,17 @@ | ||
name: Deploy Storybook | ||
|
||
on: | ||
push: | ||
branches: [development/1.0] | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- run: npm ci | ||
- run: npm run storybook:deploy -- --ci | ||
env: | ||
GH_TOKEN: ${{ github.actor }}:${{ 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,52 @@ | ||
on: | ||
release: | ||
types: | ||
- published | ||
workflow_dispatch: | ||
|
||
jobs: | ||
bump-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
- run: echo "nextVersion=$(npm version --no-git-tag minor)" >> $GITHUB_ENV | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
id: cpr | ||
with: | ||
token: ${{ secrets.GIT_ACCESS_TOKEN }} | ||
branch: feature/bump-core-ui-version-to-${{ env.nextVersion }} | ||
commit-message: Bump core-ui version to ${{ env.nextVersion }} | ||
title: Bump core-ui version to ${{ env.nextVersion }} | ||
body: '' | ||
base: ${{ github.event.repository.default_branch }} | ||
- uses: actions/github-script@v5 | ||
if: ${{ steps.cpr.outputs.pull-request-number }} | ||
with: | ||
github-token: ${{secrets.GIT_ACCESS_TOKEN}} | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: '${{ steps.cpr.outputs.pull-request-number }}', | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: '/approve' | ||
}) | ||
publish-npm: | ||
runs-on: ubuntu-latest | ||
environment: npmjs | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# Setup .npmrc file to publish to npmjs.org | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm install | ||
- run: npm run build | ||
- 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,32 @@ | ||
name: basic tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'user/**' | ||
- 'feature/**' | ||
- 'improvement/**' | ||
- 'bugfix/**' | ||
- 'w/**' | ||
- 'q/**' | ||
- 'hotfix/**' | ||
- 'dependabot/**' | ||
pull_request: | ||
types: | ||
- opened | ||
branches: | ||
- 'feature/bump-core-ui-version-to-**' | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- run: npm ci | ||
- run: npm run test | ||
- run: npm run lint |
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,12 @@ | ||
node_modules/ | ||
dist/ | ||
coverage/ | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
.vscode |
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 @@ | ||
legacy-peer-deps=true |
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,5 @@ | ||
{ | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"singleQuote": true | ||
} |
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,55 @@ | ||
import type { StorybookConfig } from '@storybook/react-webpack5'; | ||
const config: StorybookConfig = { | ||
stories: ['../stories/**/*.@(mdx|stories.@(ts|tsx))'], | ||
staticDirs: ['./public'], | ||
|
||
addons: [ | ||
'@storybook/addon-essentials', | ||
'@storybook/addon-storysource', | ||
'@storybook/addon-mdx-gfm', | ||
'@storybook/addon-webpack5-compiler-swc', | ||
'@chromatic-com/storybook', | ||
], | ||
swc: (config, options) => ({ | ||
jsc: { | ||
transform: { | ||
react: { | ||
runtime: 'automatic', | ||
}, | ||
}, | ||
}, | ||
}), | ||
|
||
webpackFinal: async (config, { configType }) => { | ||
// Resolve error when webpack-ing storybook: | ||
// Can't import the named export 'Children' from non EcmaScript module (only | ||
// default export is available) | ||
config.module?.rules?.push({ | ||
test: /\.mjs$/, | ||
include: /node_modules/, | ||
type: 'javascript/auto', | ||
}); | ||
|
||
return config; | ||
}, | ||
|
||
framework: { | ||
name: '@storybook/react-webpack5', | ||
options: {}, | ||
}, | ||
|
||
docs: { | ||
defaultName: 'Stories', | ||
}, | ||
|
||
managerHead: (head) => ` | ||
${head} | ||
<link rel="icon" href="/favicon.ico" /> | ||
`, | ||
|
||
typescript: { | ||
reactDocgen: 'react-docgen-typescript', | ||
}, | ||
}; | ||
|
||
export default config; |
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,6 @@ | ||
import { addons } from '@storybook/manager-api'; | ||
import Theme from './theme.storybook'; | ||
|
||
addons.setConfig({ | ||
theme: Theme, | ||
}); |
Oops, something went wrong.