chore: codeowners

This commit is contained in:
Oprysk Vyacheslav 2022-04-18 23:46:08 +03:00 committed by GitHub
parent 8f7e56c747
commit 8240404a55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 12 deletions

2
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1,2 @@
* @Redocly/keyboard-warriors
/docs/ @Redocly/technical-writers

View File

@ -33,7 +33,7 @@
"start": "webpack serve --mode=development --env playground --hot --config demo/webpack.config.ts",
"start:prod": "webpack serve --env playground --mode=production --config demo/webpack.config.ts",
"start:benchmark": "webpack serve --mode=production --env.bench --config demo/webpack.config.ts",
"test": "npm run lint && npm run unit && npm run license-check",
"test": "npm run unit && npm run license-check",
"unit": "jest --coverage",
"e2e": "cypress run",
"e2e-ci": "cypress run --record",
@ -49,7 +49,7 @@
"stats": "webpack --env production --env standalone --json --profile --mode=production > stats.json",
"prettier": "prettier --write \"cli/index.ts\" \"src/**/*.{ts,tsx}\"",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
"lint": "eslint 'src/**/*.{js,ts,tsx}' --cache",
"lint": "eslint --fix 'src/**/*.{js,ts,tsx}' --cache",
"benchmark": "node ./benchmark/benchmark.js",
"start:demo": "webpack serve --hot --config demo/webpack.config.ts --mode=development",
"compile:cli": "tsc custom.d.ts cli/index.ts --target es6 --module commonjs --types yargs",

View File

@ -26,9 +26,10 @@ export const RedocStandalone = function (props: RedocStandaloneProps) {
const normalizedOpts = new RedocNormalizedOptions(options);
if (normalizedOpts.nonce !== undefined) {
try {
__webpack_nonce__ = normalizedOpts.nonce;
} catch { } // If we have exception, Webpack was not used to run this.
try {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
__webpack_nonce__ = normalizedOpts.nonce;
} catch {} // If we have exception, Webpack was not used to run this.
}
return (

View File

@ -66,8 +66,11 @@ export const OperationBadge = styled.span.attrs((props: { type: string }) => ({
}
`;
function menuItemActive(depth, { theme }: { theme: ResolvedThemeInterface }, option: string): string {
function menuItemActive(
depth,
{ theme }: { theme: ResolvedThemeInterface },
option: string,
): string {
if (depth > 1) {
return theme.sidebar.level1Items[option];
} else if (depth === 1) {
@ -125,7 +128,9 @@ export const MenuItemLabel = styled.label.attrs((props: MenuItemLabelType) => ({
}))<MenuItemLabelType>`
cursor: pointer;
color: ${props =>
props.active ? menuItemActive(props.depth, props, 'activeTextColor') : props.theme.sidebar.textColor};
props.active
? menuItemActive(props.depth, props, 'activeTextColor')
: props.theme.sidebar.textColor};
margin: 0;
padding: 12.5px ${props => props.theme.spacing.unit * 4}px;
${({ depth, type, theme }) =>
@ -135,7 +140,9 @@ export const MenuItemLabel = styled.label.attrs((props: MenuItemLabelType) => ({
font-family: ${props => props.theme.typography.headings.fontFamily};
${props => menuItemDepth[props.depth]};
background-color: ${props =>
props.active ? menuItemActive(props.depth, props, 'activeBackgroundColor') : props.theme.sidebar.backgroundColor};
props.active
? menuItemActive(props.depth, props, 'activeBackgroundColor')
: props.theme.sidebar.backgroundColor};
${props => (props.deprecated && deprecatedCss) || ''};

View File

@ -124,7 +124,7 @@ export class OperationModel implements IMenuItem {
// TODO: update getting pathInfo for overriding servers on path level
this.servers = normalizeServers('', operationSpec.servers || operationSpec.pathServers || []);
} else {
this.operationHash = operationSpec.operationId && 'operation/' + operationSpec.operationId
this.operationHash = operationSpec.operationId && 'operation/' + operationSpec.operationId;
this.id =
operationSpec.operationId !== undefined
? (parent ? parent.id + '/' : '') + this.operationHash

View File

@ -25,7 +25,7 @@ export class SecurityRequirementModel {
return undefined;
}
const displayName = scheme['x-displayName'] || id;
return {
...scheme,
id,

View File

@ -141,7 +141,7 @@ const defaultTheme: ThemeInterface = {
groupItems: {
activeBackgroundColor: theme => darken(0.1, theme.sidebar.backgroundColor),
activeTextColor: theme => theme.sidebar.activeTextColor,
textTransform: 'uppercase'
textTransform: 'uppercase',
},
level1Items: {
activeBackgroundColor: theme => darken(0.05, theme.sidebar.backgroundColor),