Skip to content

Commit

Permalink
meta: initial repository structure
Browse files Browse the repository at this point in the history
  • Loading branch information
BethGriggs committed Oct 10, 2024
0 parents commit 687e7a0
Show file tree
Hide file tree
Showing 81 changed files with 44,751 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space

[*.html]
indent_style = space
indent_size = 2

[*.{ts,json,js,tsx,jsx}]
indent_style = space
indent_size = 2

[*.md]
indent_size = 2
indent_style = space

[Dockerfile]
indent_style = space
indent_size = 2

[*.{yml,yaml}]
indent_size = 2
indent_style = space
267 changes: 267 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,267 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

var path = require('path');

module.exports = {
root: true,
plugins: ['@spotify', 'notice', 'react', 'testing-library'],
ignorePatterns: ['.eslintrc.js', '.eslintrc.cjs'],
rules: {
'notice/notice': [
'error',
{
templateFile: path.resolve(
// eslint-disable-next-line no-restricted-syntax
__dirname,
'./scripts/templates/copyright-header.txt',
),
onNonMatchingHeader: 'replace',
},
],
'no-restricted-syntax': [
'error',
{
message:
"Avoid using .toLowerCase(), use .toLocaleLowerCase('en-US') instead. " +
'This rule can sometimes be ignored when converting text to be displayed to the user.',
selector:
"CallExpression[arguments.length=0] > MemberExpression[property.name='toLowerCase']",
},
{
message:
"Avoid using .toUpperCase(), use .toLocaleUpperCase('en-US') instead. " +
'This rule can sometimes be ignored when converting text to be displayed to the user.',
selector:
"CallExpression[arguments.length=0] > MemberExpression[property.name='toUpperCase']",
},
],
'testing-library/await-async-queries': 'error',
'testing-library/await-async-utils': 'error',
'testing-library/no-await-sync-queries': 'error',
'testing-library/no-dom-import': 'error',
'testing-library/no-wait-for-side-effects': 'error',
'testing-library/await-async-events': 'error',
'no-restricted-globals': [
'error',
[
'blur',
'captureEvents',
'chrome',
'clientInformation',
'close',
'closed',
'createImageBitmap',
'crypto',
'customElements',
'defaultstatus',
'defaultStatus',
'devicePixelRatio',
'external',
'find',
'focus',
'frameElement',
'frames',
'getComputedStyle',
'getSelection',
'indexedDB',
'innerHeight',
'innerWidth',
'isSecureContext',
'length',
'location',
'locationbar',
'matchMedia',
'menubar',
'moveBy',
'moveTo',
'name',
'navigator',
'onabort',
'onafterprint',
'onanimationend',
'onanimationiteration',
'onanimationstart',
'onappinstalled',
'onauxclick',
'onbeforeinstallprompt',
'onbeforeprint',
'onbeforeunload',
'onblur',
'oncancel',
'oncanplay',
'oncanplaythrough',
'onchange',
'onclick',
'onclose',
'oncontextmenu',
'oncuechange',
'ondblclick',
'ondevicemotion',
'ondeviceorientation',
'ondeviceorientationabsolute',
'ondrag',
'ondragend',
'ondragenter',
'ondragleave',
'ondragover',
'ondragstart',
'ondrop',
'ondurationchange',
'onemptied',
'onended',
'onerror',
'onfocus',
'ongotpointercapture',
'onhashchange',
'oninput',
'oninvalid',
'onkeydown',
'onkeypress',
'onkeyup',
'onlanguagechange',
'onload',
'onloadeddata',
'onloadedmetadata',
'onloadstart',
'onlostpointercapture',
'onmessage',
'onmessageerror',
'onmousedown',
'onmouseenter',
'onmouseleave',
'onmousemove',
'onmouseout',
'onmouseover',
'onmouseup',
'onmousewheel',
'onoffline',
'ononline',
'onpagehide',
'onpageshow',
'onpause',
'onplay',
'onplaying',
'onpointercancel',
'onpointerdown',
'onpointerenter',
'onpointerleave',
'onpointermove',
'onpointerout',
'onpointerover',
'onpointerup',
'onpopstate',
'onprogress',
'onratechange',
'onrejectionhandled',
'onreset',
'onresize',
'onscroll',
'onsearch',
'onseeked',
'onseeking',
'onselect',
'onstalled',
'onstorage',
'onsubmit',
'onsuspend',
'ontimeupdate',
'ontoggle',
'ontransitionend',
'onunhandledrejection',
'onunload',
'onvolumechange',
'onwaiting',
'onwebkitanimationend',
'onwebkitanimationiteration',
'onwebkitanimationstart',
'onwebkittransitionend',
'onwheel',
'open',
'openDatabase',
'opener',
'origin',
'outerHeight',
'outerWidth',
'pageXOffset',
'pageYOffset',
'parent',
'performance',
'personalbar',
'postMessage',
'print',
'releaseEvents',
'resizeBy',
'resizeTo',
'screen',
'screenLeft',
'screenTop',
'screenX',
'screenY',
'scroll',
'scrollbars',
'scrollBy',
'scrollTo',
'scrollX',
'scrollY',
'self',
'speechSynthesis',
'status',
'statusbar',
'stop',
'styleMedia',
'toolbar',
'top',
'visualViewport',
'webkitRequestFileSystem',
'webkitResolveLocalFileSystemURL',
'webkitStorageInfo',
].map(function f(name) {
return {
name: name,
message:
'Avoid using implicitly global variables. Use e.g. window.' +
name +
' instead if this was your intent.',
};
}),
].flat(),
},
overrides: [
{
files: ['**/*.[jt]s?(x)'],
excludedFiles: '**/*.{test,spec}.[jt]s?(x)',
rules: {
'react/forbid-elements': [
1,
{
forbid: [
{
element: 'button',
message: 'use Material UI <Button> instead',
},
{ element: 'p', message: 'use Material UI <Typography> instead' },
{
element: 'span',
message: 'use a Material UI <Typography> variant instead',
},
],
},
],
},
},
],
};
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file registers ownership for certain parts of the backstage code.
# Review from a member of the corresponding code owner is required to merge pull requests.
#
# The last matching pattern takes precedence.
# https://help.github.com/articles/about-codeowners/

* @bethgriggs @nickbolt
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Hey, I just made a Pull Request!

<!-- Please describe what you added, and add a screenshot if possible.
That makes it easier to understand the change so we can :shipit: faster. -->

#### :heavy_check_mark: Checklist

<!--- Please include the following in your Pull Request when applicable: -->

- [ ] A changeset describing the change and affected packages. ([more info](https://github.com/backstage/community-plugins/blob/master/CONTRIBUTING.md#creating-changesets))
6 changes: 6 additions & 0 deletions .github/renovate-action.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"platform": "github",
"includeForks": false,
"repositories": ["redhat-developer/rhdh-plugins"],
"gitAuthor": "Renovate Bot <[email protected]>"
}
40 changes: 40 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"extends": [
"config:best-practices",
":gitSignOff",
":rebaseStalePrs",
"group:linters",
"group:test",
":preserveSemverRanges"
],
"ignorePresets": [":pinDevDependencies", ":pinDigest", "docker:pinDigests"],
"labels": ["dependencies"],
"postUpdateOptions": ["yarnDedupeHighest"],
"osvVulnerabilityAlerts": true,
"vulnerabilityAlerts": {
"enabled": true,
"labels": ["dependencies", "security"]
},
"npm": {
"minimumReleaseAge": "3 days"
},
"packageRules": [
{
"matchManagers": ["github-actions"],
"groupName": "GitHub Actions"
},
{
"matchPackageNames": ["node-fetch"],
"allowedVersions": "<3.0.0"
},
{
"matchPackageNames": ["typescript"],
"allowedVersions": "~5.3.0"
},
{
"matchPackageNames": ["yn"],
"allowedVersions": "<5.0.0"
}
],
"ignorePaths": ["**/dist-dynamic/**"]
}
25 changes: 25 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# CI/CD Workflows

## [ci.yml](./ci.yml)

Triggered on pull requests, this workflow runs tests on the target branch, focusing only on workspaces that have changes. Once all checks pass successfully, the pull request can be merged.

## [release_workspace.yml](./release_workspace.yml)

Handles the release process for a specific workspace from a specified branch (default: `main`). It either creates a "Version Packages" pull request if changesets are present or releases the packages within the workspace if they haven't been published yet. For more details on how changesets work, refer to the [Changesets documentation](https://github.com/changesets/changesets).

## [release.yml](./release.yml)

Responsible for releasing all workspaces in parallel by invoking the `release_workspace.yml` workflow for each workspace. It runs on the main branch whenever new changes are pushed. The workflow relies on `release_workspace.yml` to determine if a workspace requires publishing.

## [automate_changeset_feedback.yml](./automate_changeset_feedback.yml)

Generates feedback for changesets on pull requests.

## [automate_renovate_changeset.yml](./automate_renovate_changeset.yml)

Automates the generation of changesets for Renovate pull requests.

## [version_bump.yml](./version_bump.yml)

Handles version bumping for specific workspaces. It creates a new branch for the version bump, updates the necessary files, commits the changes, and creates a pull request to merge the updates into the main branch.
Loading

0 comments on commit 687e7a0

Please sign in to comment.