-
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.
- Loading branch information
0 parents
commit ec008ec
Showing
47 changed files
with
10,520 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,6 @@ | ||
node_modules | ||
dist | ||
|
||
docs/.vitepress/.temp/ | ||
docs/.vitepress/.cache/ | ||
docs/.vitepress/dist/ |
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,60 @@ | ||
module.exports = { | ||
root: true, | ||
parserOptions: { | ||
parser: '@typescript-eslint/parser', | ||
ecmaVersion: 2020, | ||
}, | ||
env: { | ||
node: true, | ||
}, | ||
plugins: ['vue', 'import', '@typescript-eslint'], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:vue/vue3-recommended', | ||
'standard', | ||
], | ||
rules: { | ||
quotes: ['error', 'single', { | ||
avoidEscape: true, | ||
}], | ||
'no-multi-spaces': 'error', | ||
'no-trailing-spaces': 'error', | ||
'no-empty': 'off', | ||
'padded-blocks': 'off', | ||
'comma-dangle': ['error', 'always-multiline'], | ||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
'max-len': [process.env.NODE_ENV === 'production' ? 'warn' : 'off', { | ||
code: 120, | ||
ignoreTrailingComments: true, | ||
ignoreUrls: true, | ||
ignoreStrings: true, | ||
ignoreTemplateLiterals: true, | ||
ignoreRegExpLiterals: true, | ||
}], | ||
'space-before-function-paren': 'off', | ||
'vue/attributes-order': ['error', { | ||
alphabetical: true, | ||
}], | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
// Avoids false errors like “'NodeListOf' is not defined”. | ||
'no-undef': 'off', | ||
// Turns off some non-TypeScript rules in favor of their specific TypeScript rules to avoid false negatives: | ||
indent: 'off', | ||
'@typescript-eslint/indent': ['error', 2], | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/no-unused-vars': 'error', | ||
'@typescript-eslint/space-before-function-paren': ['error', { | ||
anonymous: 'never', | ||
named: 'never', | ||
asyncArrow: 'always', | ||
}], | ||
// Ensures ESLint understands that `defineEmits<{ ... }>()` does _not_ fail this rule. | ||
'func-call-spacing': 'off', | ||
'@typescript-eslint/func-call-spacing': 'error', | ||
'@typescript-eslint/consistent-type-imports': ['error', { | ||
prefer: 'type-imports', | ||
fixStyle: 'separate-type-imports', | ||
}], | ||
}, | ||
} |
Validating CODEOWNERS rules …
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 @@ | ||
# These owners will be the default owners for everything in | ||
# the repo. They will be requested for review whenever someone | ||
# opens a PR, unless a later match takes precedence. | ||
* @adamdehaven @jillztom @Kong/team-core-ui | ||
|
||
# Workflows & CI | ||
/.github/ @adamdehaven @jillztom | ||
/lefthook.yaml @adamdehaven @jillztom | ||
|
||
# ================================================ | ||
# Renovate Bot approvals | ||
# Allow Kongponents BOT to approve dependency updates | ||
# These rules MUST remain at the bottom as the last entry | ||
package.json @kongponents-bot @Kong/team-core-ui @adamdehaven @jillztom | ||
yarn.lock @kongponents-bot @Kong/team-core-ui @adamdehaven @jillztom |
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 @@ | ||
# Summary | ||
|
||
<!-- | ||
Be sure your Pull Request includes: | ||
- JIRA ticket number in the title, and link in the summary | ||
- An accurate summary of what is being added/edited/removed | ||
- Tests (unit, component, regression) | ||
- Updated documentation and commented code | ||
- Link to Figma, if applicable | ||
- Conventional Commits | ||
--> |
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,20 @@ | ||
--- | ||
name: Renovate Bot dependency updates auto-merge | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
on: pull_request_target | ||
|
||
jobs: | ||
renovate-autoapprove: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor == 'renovate[bot]' }} | ||
steps: | ||
- name: Approve a PR | ||
run: gh pr review --approve "$PR_URL" | ||
env: | ||
PR_URL: ${{ github.event.pull_request.html_url }} | ||
# Use the bot account PAT to allow auto-approve and merge the PRs | ||
GITHUB_TOKEN: ${{ secrets.KONGPONENTS_BOT_PAT }} |
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,34 @@ | ||
name: Cleanup PR preview packages | ||
on: | ||
workflow_dispatch: | ||
|
||
schedule: | ||
- cron: '0 2/6 * * 6,0' | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
cleanup: | ||
name: Cleanup PR Previews | ||
runs-on: ubuntu-latest | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN_PUBLIC_PUBLISH }} | ||
GITHUB_TOKEN: ${{ secrets.KONGPONENTS_BOT_PAT }} | ||
|
||
steps: | ||
- name: Checkout Source Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Prepare cleanup | ||
id: prepare | ||
run: | | ||
echo "openPRs=$(gh pr list --state open --json number|jq -cM 'map(.number|tostring)')" >> $GITHUB_OUTPUT | ||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc | ||
- name: Cleanup PR preview | ||
uses: Kong/public-shared-actions/pr-previews/cleanup@main | ||
with: | ||
package: "@kong/markdown" | ||
openPRs: ${{ steps.prepare.outputs.openPRs }} |
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 @@ | ||
name: Lint Commit Messages | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
commitlint: | ||
if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# See https://github.com/wagoid/commitlint-github-action/issues/560 | ||
- name: Remove tsconfig | ||
run: rm tsconfig.json | ||
|
||
- uses: wagoid/[email protected] | ||
with: | ||
configFile: commitlint.config.cjs |
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,61 @@ | ||
# name: Deploy Sandbox to GitHub Pages | ||
|
||
# on: | ||
# push: | ||
# branches: | ||
# - main | ||
|
||
# # Allows you to run this workflow manually from the Actions tab | ||
# workflow_dispatch: | ||
|
||
# # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
# permissions: | ||
# contents: read | ||
# pages: write | ||
# id-token: write | ||
|
||
# # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
# concurrency: | ||
# group: 'pages' | ||
# cancel-in-progress: false | ||
|
||
# jobs: | ||
# # Single deploy job since we're just deploying | ||
# deploy: | ||
# environment: | ||
# name: github-pages | ||
# url: ${{ steps.deployment.outputs.page_url }} | ||
# runs-on: ubuntu-latest | ||
# timeout-minutes: 10 | ||
|
||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
|
||
# - name: Use Node.js | ||
# uses: actions/setup-node@v4 | ||
# with: | ||
# node-version-file: '.nvmrc' | ||
|
||
# - name: Install dependencies | ||
# run: pnpm install | ||
|
||
# - name: Build Sandbox | ||
# env: | ||
# # Tell the script to use the sandbox directory | ||
# USE_SANDBOX: true | ||
# run: pnpm run build:sandbox | ||
|
||
# - name: Setup Pages | ||
# uses: actions/configure-pages@v3 | ||
|
||
# - name: Upload artifact | ||
# uses: actions/upload-pages-artifact@v2 | ||
# with: | ||
# # Upload sandbox/dist directory | ||
# path: './sandbox/dist' | ||
|
||
# - name: Deploy to GitHub Pages | ||
# id: deployment | ||
# uses: actions/deploy-pages@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,22 @@ | ||
name: On closing PR | ||
on: | ||
pull_request_target: | ||
types: | ||
- closed | ||
|
||
jobs: | ||
remove-pr-preview-comment: | ||
name: Remove PR preview comment from PR | ||
runs-on: ubuntu-latest | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN_PUBLIC_PUBLISH }} | ||
steps: | ||
- name: Checkout Source Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Remove preview consumption comment | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: pr_preview_consumption | ||
delete: true | ||
GITHUB_TOKEN: ${{ secrets.KONGPONENTS_BOT_PAT }} |
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,54 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
run-tests: | ||
name: Tests | ||
uses: ./.github/workflows/test.yaml | ||
|
||
publish: | ||
name: Build and Publish | ||
needs: | ||
- run-tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.KONGPONENTS_BOT_PAT }} | ||
|
||
- name: setup git | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "Kong UI Bot" | ||
- name: Create .npmrc | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN_PUBLIC_PUBLISH }} | ||
# Reference the env variable NPM_TOKEN here, not the secret | ||
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build | ||
# Since we lint in the Tests job, we can just build here | ||
run: pnpm run build | ||
|
||
# - name: Semantic Release | ||
# uses: cycjimmy/semantic-release-action@v3 | ||
# env: | ||
# # Since branch protections are on (pushing commits) you need to use a bot PAT | ||
# GITHUB_TOKEN: ${{ secrets.KONGPONENTS_BOT_PAT }} | ||
# NPM_TOKEN: ${{ secrets.NPM_TOKEN_PUBLIC_PUBLISH }} | ||
|
Oops, something went wrong.