mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 23:27:28 +02:00
chore: clean up ESLint config, enable a few rules (#6514)
* chore: clean up ESLint config, enable a few rules * enable max-len for comments * fix build
This commit is contained in:
parent
b8ccb869f1
commit
aa446b7a9c
167 changed files with 1157 additions and 960 deletions
|
@ -10,7 +10,9 @@ import type {HandlerEvent, HandlerResponse} from '@netlify/functions';
|
|||
const CookieName = 'DocusaurusPlaygroundName';
|
||||
|
||||
const PlaygroundConfigs = {
|
||||
// codesandbox: 'https://codesandbox.io/s/docusaurus', // Do not use this one, see https://github.com/codesandbox/codesandbox-client/issues/5683#issuecomment-1023252459
|
||||
// Do not use this one, see
|
||||
// https://github.com/codesandbox/codesandbox-client/issues/5683#issuecomment-1023252459
|
||||
// codesandbox: 'https://codesandbox.io/s/docusaurus',
|
||||
codesandbox:
|
||||
'https://codesandbox.io/s/github/facebook/docusaurus/tree/main/examples/classic',
|
||||
|
||||
|
@ -69,14 +71,11 @@ export function readPlaygroundName(
|
|||
: {};
|
||||
const playgroundName: string | undefined = parsedCookie[CookieName];
|
||||
|
||||
if (playgroundName) {
|
||||
if (isValidPlaygroundName(playgroundName)) {
|
||||
return playgroundName;
|
||||
} else {
|
||||
console.error(
|
||||
`playgroundName found in cookie was invalid: ${playgroundName}`,
|
||||
);
|
||||
}
|
||||
if (!isValidPlaygroundName(playgroundName)) {
|
||||
console.error(
|
||||
`playgroundName found in cookie was invalid: ${playgroundName}`,
|
||||
);
|
||||
return undefined;
|
||||
}
|
||||
return undefined;
|
||||
return playgroundName;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue