run prettier

This commit is contained in:
Patrik Oldsberg
2020-09-05 16:07:04 +02:00
parent 7a7396be55
commit b045b166b6
42 changed files with 150 additions and 139 deletions
+2
View File
@@ -4,7 +4,9 @@
That makes it easier to understand the change so we can :shipit: faster. -->
#### :heavy_check_mark: Checklist
<!--- Put an `x` in all the boxes that apply: -->
- [ ] All tests are passing `yarn test`
- [ ] Screenshots attached (for UI changes)
- [ ] Relevant documentation updated
+2 -4
View File
@@ -38,8 +38,6 @@ jobs:
- name: yarn install
run: yarn install --frozen-lockfile
# End of yarn setup
# Tests are broken on Windows, disabled for now
# - name: test
# run: yarn lerna -- run test
# - name: test
# run: yarn lerna -- run test
+3 -3
View File
@@ -71,9 +71,9 @@ jobs:
# Tags the commit with the version in the core package if the tag doesn't exist
- uses: Klemensas/action-autotag@1.2.3
with:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
package_root: "packages/core"
tag_prefix: "v"
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
package_root: 'packages/core'
tag_prefix: 'v'
- name: Discord notification
if: ${{ failure() }}
+15 -16
View File
@@ -4,12 +4,12 @@ This code of conduct outlines our expectations for participants within the **Spo
Our open source community strives to:
* **Be friendly and patient.**
* **Be welcoming**: We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, colour, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability.
* **Be considerate**: Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we're a world-wide community, so you might not be communicating in someone else's primary language.
* **Be respectful**: Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. Its important to remember that a community where people feel uncomfortable or threatened is not a productive one.
* **Be careful in the words that we choose**: we are a community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren't acceptable.
* **Try to understand why we disagree**: Disagreements, both social and technical, happen all the time. It is important that we resolve disagreements and differing views constructively. Remember that were different. The strength of our community comes from its diversity, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesnt mean that theyre wrong. Dont forget that it is human to err and blaming each other doesnt get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes.
- **Be friendly and patient.**
- **Be welcoming**: We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, colour, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability.
- **Be considerate**: Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we're a world-wide community, so you might not be communicating in someone else's primary language.
- **Be respectful**: Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. Its important to remember that a community where people feel uncomfortable or threatened is not a productive one.
- **Be careful in the words that we choose**: we are a community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren't acceptable.
- **Try to understand why we disagree**: Disagreements, both social and technical, happen all the time. It is important that we resolve disagreements and differing views constructively. Remember that were different. The strength of our community comes from its diversity, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesnt mean that theyre wrong. Dont forget that it is human to err and blaming each other doesnt get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes.
## Definitions
@@ -18,7 +18,7 @@ Harassment includes, but is not limited to:
- Offensive comments related to gender, gender identity and expression, sexual orientation, disability, mental illness, neuro(a)typicality, physical appearance, body size, race, age, regional discrimination, political or religious affiliation
- Unwelcome comments regarding a persons lifestyle choices and practices, including those related to food, health, parenting, drugs, and employment
- Deliberate misgendering. This includes deadnaming or persistently using a pronoun that does not correctly reflect a person's gender identity. You must address people by the name they give you when not addressing them by their username or handle
- Physical contact and simulated physical contact (eg, textual descriptions like “*hug*” or “*backrub*”) without consent or after a request to stop
- Physical contact and simulated physical contact (eg, textual descriptions like “_hug_” or “_backrub_”) without consent or after a request to stop
- Threats of violence, both physical and psychological
- Incitement of violence towards any individual, including encouraging a person to commit suicide or to engage in self-harm
- Deliberate intimidation
@@ -39,7 +39,6 @@ Our open source community prioritizes marginalized peoples safety over privil
- Communicating in a tone you dont find congenial
- Criticizing racist, sexist, cissexist, or otherwise oppressive behavior or assumptions
### Diversity Statement
We encourage everyone to participate and are committed to building a community for all. Although we will fail at times, we seek to treat everyone both as fairly and equally as possible. Whenever a participant has made a mistake, we expect them to take responsibility for it. If someone has been harmed or offended, it is our responsibility to listen carefully and respectfully, and do our best to right the wrong.
@@ -53,18 +52,18 @@ If you experience or witness unacceptable behavior—or have any other concerns
- Your contact information.
- Names (real, nicknames, or pseudonyms) of any individuals involved. If there are additional witnesses, please
include them as well. Your account of what occurred, and if you believe the incident is ongoing. If there is a publicly available record (e.g. a mailing list archive or a public IRC logger), please include a link.
include them as well. Your account of what occurred, and if you believe the incident is ongoing. If there is a publicly available record (e.g. a mailing list archive or a public IRC logger), please include a link.
- Any additional information that may be helpful.
After filing a report, a representative will contact you personally, review the incident, follow up with any additional questions, and make a decision as to how to respond. If the person who is harassing you is part of the response team, they will recuse themselves from handling your incident. If the complaint originates from a member of the response team, it will be handled by a different member of the response team. We will respect confidentiality requests for the purpose of protecting victims of abuse.
### Attribution & Acknowledgements
We all stand on the shoulders of giants across many open source communities. We'd like to thank the communities and projects that established code of conducts and diversity statements as our inspiration:
We all stand on the shoulders of giants across many open source communities. We'd like to thank the communities and projects that established code of conducts and diversity statements as our inspiration:
* [Django](https://www.djangoproject.com/conduct/reporting/)
* [Python](https://www.python.org/community/diversity/)
* [Ubuntu](http://www.ubuntu.com/about/about-ubuntu/conduct)
* [Contributor Covenant](http://contributor-covenant.org/)
* [Geek Feminism](http://geekfeminism.org/about/code-of-conduct/)
* [Citizen Code of Conduct](http://citizencodeofconduct.org/)
- [Django](https://www.djangoproject.com/conduct/reporting/)
- [Python](https://www.python.org/community/diversity/)
- [Ubuntu](http://www.ubuntu.com/about/about-ubuntu/conduct)
- [Contributor Covenant](http://contributor-covenant.org/)
- [Geek Feminism](http://geekfeminism.org/about/code-of-conduct/)
- [Citizen Code of Conduct](http://citizencodeofconduct.org/)
+2 -2
View File
@@ -121,8 +121,8 @@ auth:
$secret:
env: GITLAB_BASE_URL
saml:
entryPoint: "http://localhost:7001/"
issuer: "passport-saml"
entryPoint: 'http://localhost:7001/'
issuer: 'passport-saml'
okta:
development:
clientId:
+2 -3
View File
@@ -71,10 +71,9 @@ import {
AlertApiForwarder,
ErrorApiForwarder,
ErrorAlerter,
ConfigApi
ConfigApi,
} from '@backstage/core';
const apis = (config: ConfigApi) => {
const builder = ApiRegistry.builder();
@@ -84,7 +83,7 @@ const apis = (config: ConfigApi) => {
// The error API uses the alert API to send error notifications to the user.
builder.add(errorApiRef, new ErrorAlerter(alertApi, new ErrorApiForwarder()));
return builder.build();
}
};
const app = createApp({
apis,
+2 -2
View File
@@ -116,8 +116,8 @@ components. If youd like to help build up our design system, you can also add
components weve designed to the Storybook as well.
**[Figma](https://www.figma.com/@backstage)** - we're stoked to be using Figma
Community to share our design assets. You can duplicate our UI Kit
and design your own plugin for Backstage.
Community to share our design assets. You can duplicate our UI Kit and design
your own plugin for Backstage.
**[Discord](https://discord.gg/EBHEGzX)** - all design questions should be
directed to the _#design_ channel.
@@ -7,18 +7,18 @@ Publishers are responsible for pushing and storing the templated skeleton after
the values have been templated by the `Templater`. See
[Create your own templater](./create-your-own-templater.md) for more info.
They receive a directory or location where the templater has sucessfully run
and is now ready to store somewhere. They also are given some other options
which are sent from the frontend, such as the `storePath` which is a string of
where the frontend thinks we should save this templated folder.
They receive a directory or location where the templater has sucessfully run and
is now ready to store somewhere. They also are given some other options which
are sent from the frontend, such as the `storePath` which is a string of where
the frontend thinks we should save this templated folder.
Currently we provide the following `publishers`:
- `github`
This publisher is passed through to the `createRouter` function of the
`@spotify/plugin-scaffolder-backend`. Currently, only one publisher is supported,
but PR's are always welcome.
`@spotify/plugin-scaffolder-backend`. Currently, only one publisher is
supported, but PR's are always welcome.
An full example backend can be found
[here](https://github.com/spotify/backstage/blob/d91c10f654475a60829fa33a5c81018e517a319a/packages/backend/src/plugins/scaffolder.ts),
+1 -1
View File
@@ -4,7 +4,7 @@ title: Software Templates
---
The Software Templates part of Backstage is a tool that can help you create
Components inside Backstage. By default, it has the ability to load skeletons of
Components inside Backstage. By default, it has the ability to load skeletons of
code, template in some variables, and then publish the template to some location
like GitHub.
@@ -30,9 +30,9 @@ the documentation template.
Create an entity from the documentation template and you will get the needed
setup for free.
!!! warning Currently the Backstage Software Templates are limited to create repositories
inside GitHub organizations. You also need to generate an personal access token
and use as an environment variable. Read more about this
!!! warning Currently the Backstage Software Templates are limited to create
repositories inside GitHub organizations. You also need to generate an personal
access token and use as an environment variable. Read more about this
[here](../software-templates/installation.md#runtime-dependencies).
### Manually add documentation setup to already existing repository
+2 -1
View File
@@ -4,7 +4,8 @@ title: Running Backstage Locally
---
First make sure you are using NodeJS with an Active LTS Release, currently v12.
This is made easy with a version manager such as nvm which allows for version switching.
This is made easy with a version manager such as nvm which allows for version
switching.
```bash
# Checking your version
+7 -7
View File
@@ -18,10 +18,10 @@ spec:
component: frontend
spec:
containers:
- name: app
image: spotify/backstage:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
name: app
protocol: TCP
- name: app
image: spotify/backstage:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
name: app
protocol: TCP
+7 -7
View File
@@ -18,10 +18,10 @@ spec:
component: backend
spec:
containers:
- name: backend
image: spotify/backstage-backend:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 7000
name: backend
protocol: TCP
- name: backend
image: spotify/backstage-backend:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 7000
name: backend
protocol: TCP
+1 -1
View File
@@ -1,5 +1,5 @@
apiVersion: v1
appVersion: "1.0"
appVersion: '1.0'
description: A Helm chart for Spotify Backstage
name: backstage
version: 0.1.1-alpha.12
+25 -19
View File
@@ -1,12 +1,12 @@
app:
enabled: true
nameOverride: ""
fullnameOverride: ""
nameOverride: ''
fullnameOverride: ''
replicaCount: 1
serviceAccount:
create: false
Name: ""
image:
Name: ''
image:
repository: spotify/backstage
tag: latest
pullPolicy: Always
@@ -15,20 +15,23 @@ app:
port: 80
ingress:
enabled: false
annotations: {}
annotations:
{}
# kubernetes.io/ingress.class: "nginx"
hosts:
- host: backstage.local
paths:
- /
- host: backstage.local
paths:
- /
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
imagePullSecrets: []
podSecurityContext: {}
podSecurityContext:
{}
# fsGroup: 2000
securityContext: {}
securityContext:
{}
# capabilities:
# drop:
# - ALL
@@ -48,12 +51,12 @@ app:
backend:
enabled: false
nameOverride: ""
fullnameOverride: ""
nameOverride: ''
fullnameOverride: ''
replicaCount: 1
serviceAccount:
create: false
Name: ""
Name: ''
image:
repository: spotify/backstage-backend
tag: latest
@@ -63,20 +66,23 @@ backend:
port: 7000
ingress:
enabled: false
annotations: {}
annotations:
{}
# kubernetes.io/ingress.class: "nginx"
hosts:
- host: backstage.local
paths:
- /backend
- host: backstage.local
paths:
- /backend
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
imagePullSecrets: []
podSecurityContext: {}
podSecurityContext:
{}
# fsGroup: 2000
securityContext: {}
securityContext:
{}
# capabilities:
# drop:
# - ALL
+11 -11
View File
@@ -7,14 +7,14 @@ metadata:
component: ingress
spec:
rules:
- host: <HOSTNAME>
http:
paths:
- backend:
serviceName: backstage
servicePort: frontend
path: /
- backend:
serviceName: backstage-backend
servicePort: backend
path: /backend
- host: <HOSTNAME>
http:
paths:
- backend:
serviceName: backstage
servicePort: frontend
path: /
- backend:
serviceName: backstage-backend
servicePort: backend
path: /backend
+8 -8
View File
@@ -11,10 +11,10 @@ spec:
app: backstage
component: frontend
ports:
- name: frontend
port: 80
protocol: TCP
targetPort: app
- name: frontend
port: 80
protocol: TCP
targetPort: app
---
apiVersion: v1
kind: Service
@@ -29,7 +29,7 @@ spec:
app: backstage
component: backend
ports:
- name: backend
port: 7000
protocol: TCP
targetPort: backend
- name: backend
port: 7000
protocol: TCP
targetPort: backend
@@ -7,4 +7,3 @@ description: View GitHub pull requests for your service in Backstage.
documentation: https://roadie.io/backstage/plugins/github-pull-requests
iconUrl: https://roadie.io/static/7f13bb8d861d8dedc5112fb939d215f9/351f2/GitHub-Mark-Light-120px-plus.png
npmPackageName: '@roadiehq/backstage-plugin-github-pull-requests'
-1
View File
@@ -7,4 +7,3 @@ description: View Rollbar errors for your services in Backstage.
documentation: https://github.com/spotify/backstage/tree/master/plugins/rollbar
iconUrl: https://rollbar.com/assets/media/rollbar-mark-color.png
npmPackageName: '@backstage/plugin-rollbar'
-1
View File
@@ -7,4 +7,3 @@ description: View Travis CI builds for your service in Backstage.
documentation: https://roadie.io/backstage/plugins/travis-ci
iconUrl: https://roadie.io/static/af2941eaf0af675facb281d566f42e14/45f2b/travis-ci-mascot-200x200.png
npmPackageName: '@roadiehq/backstage-plugin-travis-ci'
+5 -1
View File
@@ -92,7 +92,11 @@
{
"type": "subcategory",
"label": "Publishing",
"ids": ["plugins/publishing", "plugins/publish-private", "plugins/add-to-marketplace"]
"ids": [
"plugins/publishing",
"plugins/publish-private",
"plugins/add-to-marketplace"
]
}
],
"Configuration": [
@@ -66,7 +66,7 @@ const createTestPluginFile = async (
fse.copyFileSync(pluginsFilePath, testFilePath);
const pluginNameCapitalized = testPluginName
.split('-')
.map((name) => capitalize(name))
.map(name => capitalize(name))
.join('');
const exportStatement = `export { default as ${pluginNameCapitalized}} from @backstage/plugin-${testPluginName}`;
addExportStatement(testFilePath, exportStatement);
@@ -84,7 +84,7 @@ const removeAllStatementsContainingID = async (file: string, ID: string) => {
const originalContent = await fse.readFile(file, 'utf8');
const contentAfterRemoval = originalContent
.split('\n')
.filter((statement) => !statement.includes(`${ID}`)) // get rid of lines with pluginName
.filter(statement => !statement.includes(`${ID}`)) // get rid of lines with pluginName
.join('\n');
if (originalContent !== contentAfterRemoval) {
await fse.writeFile(file, contentAfterRemoval, 'utf8');
@@ -100,7 +100,7 @@ export const removeReferencesFromPluginsFile = async (
) => {
const pluginNameCapitalized = pluginName
.split('-')
.map((name) => capitalize(name))
.map(name => capitalize(name))
.join('');
await Task.forItem('removing', 'export references', async () => {
@@ -23,7 +23,7 @@ const PREFIX = 'okta.';
describe('OktaAuth', () => {
it('should get refreshed access token', async () => {
const getSession = jest.fn().mockResolvedValue({
providerInfo: { accessToken: 'access-token', expiresAt: theFuture },
providerInfo: { accessToken: 'access-token', expiresAt: theFuture },
});
const oktaAuth = new OktaAuth({ getSession } as any);
@@ -116,7 +116,10 @@ describe('OktaAuth', () => {
['profile email', ['profile', 'email']],
[`${PREFIX}groups.manage`, [`${PREFIX}groups.manage`]],
['groups.read', [`${PREFIX}groups.read`]],
[`${PREFIX}groups.manage groups.read, openid`, [`${PREFIX}groups.manage`, `${PREFIX}groups.read`, 'openid']],
[
`${PREFIX}groups.manage groups.read, openid`,
[`${PREFIX}groups.manage`, `${PREFIX}groups.read`, 'openid'],
],
[`email\t ${PREFIX}groups.read`, ['email', `${PREFIX}groups.read`]],
// Some incorrect scopes that we don't try to fix
@@ -126,4 +129,4 @@ describe('OktaAuth', () => {
])(`should normalize scopes correctly - %p`, (scope, scopes) => {
expect(OktaAuth.normalizeScopes(scope)).toEqual(new Set(scopes));
});
});
});
@@ -15,4 +15,4 @@
*/
export * from './types';
export { default as OktaAuth } from './OktaAuth';
export { default as OktaAuth } from './OktaAuth';
@@ -51,7 +51,7 @@ export const ConditionalButtons = () => {
<TextField
variant="outlined"
placeholder="Required*"
onChange={(e) => setRequired(!!e.target.value)}
onChange={e => setRequired(!!e.target.value)}
/>
</SimpleStepperStep>
<SimpleStepperStep title="Step 2">
@@ -29,9 +29,7 @@ import HomeOutlinedIcon from '@material-ui/icons/HomeOutlined';
import AddCircleOutlineIcon from '@material-ui/icons/AddCircleOutline';
import Star from '@material-ui/icons/Star';
import { MemoryRouter } from 'react-router-dom';
import {
githubAuthApiRef,
} from '@backstage/core-api';
import { githubAuthApiRef } from '@backstage/core-api';
export default {
title: 'Sidebar',
@@ -60,12 +58,14 @@ export const SampleSidebar = () => (
<SidebarIntro />
<SidebarSpace />
<SidebarDivider />
<SidebarUserSettings providerSettings={
<OAuthProviderSettings
title="Github"
apiRef={githubAuthApiRef}
icon={Star}
/>
} />
<SidebarUserSettings
providerSettings={
<OAuthProviderSettings
title="Github"
apiRef={githubAuthApiRef}
icon={Star}
/>
}
/>
</Sidebar>
);
@@ -1,7 +1,7 @@
site_name: 'mock-docs'
site_description: 'mock-docs site description'
nav:
nav:
- Home: index.md
- SubDocs: '!include ./sub-docs/mkdocs.yml'
@@ -1,4 +1,4 @@
site_name: subdocs
nav:
- Home 2: "index.md"
- Home 2: 'index.md'
+2 -2
View File
@@ -85,8 +85,8 @@ Click [here](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMe
- Give the app a name. e.g. `backstage-dev`
- Select `Accounts in this organizational directory only` under supported account types.
- Enter the callback URL for your backstage backend instance:
- For local development, this is likely `http://localhost:7000/auth/microsoft/handler/frame`
- For non-local deployments, this will be `https://{APP_FQDN}:{APP_BACKEND_PORT}/auth/microsoft/handler/frame`
- For local development, this is likely `http://localhost:7000/auth/microsoft/handler/frame`
- For non-local deployments, this will be `https://{APP_FQDN}:{APP_BACKEND_PORT}/auth/microsoft/handler/frame`
- Click `Register`.
We also need to generate a client secret so Backstage can authenticate as this app.
@@ -13,4 +13,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { createOktaProvider } from './provider';
export { createOktaProvider } from './provider';
+1 -3
View File
@@ -14,9 +14,7 @@
* limitations under the License.
*/
declare module 'passport-okta-oauth' {
export class Strategy {
constructor(options: any, verify: any)
constructor(options: any, verify: any);
}
}
+1
View File
@@ -1,4 +1,5 @@
# Title
Welcome to the explore plugin!
## Sub-section 1
@@ -28,7 +28,7 @@ import {
} from '@material-ui/core';
import { BackstageTheme } from '@backstage/theme';
const useStyles = makeStyles<BackstageTheme>((theme) => ({
const useStyles = makeStyles<BackstageTheme>(theme => ({
card: {
display: 'flex',
flexDirection: 'column',
+1 -3
View File
@@ -17,6 +17,4 @@
import { createDevApp } from '@backstage/dev-utils';
import { plugin } from '../src/plugin';
createDevApp()
.registerPlugin(plugin)
.render();
createDevApp().registerPlugin(plugin).render();
@@ -24,7 +24,7 @@ import { BackstageTheme } from '@backstage/theme';
const GraphiQL = React.lazy(() => import('graphiql'));
const useStyles = makeStyles<BackstageTheme>((theme) => ({
const useStyles = makeStyles<BackstageTheme>(theme => ({
root: {
height: '100%',
display: 'flex',
@@ -31,7 +31,7 @@ const columns: TableColumn[] = [
title: 'Website URL',
field: 'websiteUrl',
},
...CATEGORIES.map((category) => ({
...CATEGORIES.map(category => ({
title: CATEGORY_LABELS[category],
field: category,
})),
@@ -56,7 +56,7 @@ export const AuditListTable: FC<{ items: Website[] }> = ({ items }) => {
const lighthouseApi = useApi(lighthouseApiRef);
const runRefresh = (websites: Website[]) => {
websites.forEach(async (website) => {
websites.forEach(async website => {
const response = await lighthouseApi.getWebsiteForAuditId(
website.lastAudit.id,
);
@@ -64,7 +64,7 @@ export const AuditListTable: FC<{ items: Website[] }> = ({ items }) => {
if (auditStatus === 'COMPLETED' || auditStatus === 'FAILED') {
const newWebsiteData = websiteState.slice(0);
newWebsiteData[
newWebsiteData.findIndex((w) => w.url === response.url)
newWebsiteData.findIndex(w => w.url === response.url)
] = response;
setWebsiteState(newWebsiteData);
}
@@ -72,7 +72,7 @@ export const AuditListTable: FC<{ items: Website[] }> = ({ items }) => {
};
const runningWebsiteAudits = websiteState
? websiteState.filter((website) => website.lastAudit.status === 'RUNNING')
? websiteState.filter(website => website.lastAudit.status === 'RUNNING')
: [];
useInterval(
@@ -80,10 +80,10 @@ export const AuditListTable: FC<{ items: Website[] }> = ({ items }) => {
runningWebsiteAudits.length > 0 ? 5000 : null,
);
const data = websiteState.map((website) => {
const data = websiteState.map(website => {
const trendlineData = buildSparklinesDataForItem(website);
const trendlines: any = {};
CATEGORIES.forEach((category) => {
CATEGORIES.forEach(category => {
trendlines[category] = (
<TrendLine
title={`trendline for ${CATEGORY_LABELS[category]} category of ${website.url}`}
@@ -71,7 +71,7 @@ export default builder.build() as ApiHolder;
\`\`\`
`;
const useStyles = makeStyles((theme) => ({
const useStyles = makeStyles(theme => ({
tabs: { marginBottom: -18 },
tab: { minWidth: 72, paddingLeft: 1, paddingRight: 1 },
content: { marginBottom: theme.spacing(2) },
+1
View File
@@ -1,4 +1,5 @@
# Title
Welcome to the scaffolder plugin!
## Sub-section 1
-1
View File
@@ -16,4 +16,3 @@
export * from './scaffolder';
export * from './service/router';
+6 -2
View File
@@ -42,7 +42,9 @@ export class TechDocsStorageApi implements TechDocsStorage {
async getEntityDocs(entityId: ParsedEntityId, path: string) {
const { kind, namespace, name } = entityId;
const url = `${this.apiOrigin}/${kind}/${namespace ? namespace : 'default'}/${name}/${path}`;
const url = `${this.apiOrigin}/${kind}/${
namespace ? namespace : 'default'
}/${name}/${path}`;
const request = await fetch(
`${url.endsWith('/') ? url : `${url}/`}index.html`,
@@ -64,7 +66,9 @@ export class TechDocsStorageApi implements TechDocsStorage {
return new URL(
oldBaseUrl,
`${this.apiOrigin}/${kind}/${namespace ? namespace : 'default'}/${name}/${path}`,
`${this.apiOrigin}/${kind}/${
namespace ? namespace : 'default'
}/${name}/${path}`,
).toString();
}
}
+1
View File
@@ -1,4 +1,5 @@
# Title
Welcome to the welcome plugin!
## Sub-section 1