Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions beta/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
{
"extends": ["react-app", "plugin:jsx-a11y/recommended"],
"plugins": ["jsx-a11y"],
"overrides": [
{
"files": ["**/*.ts?(x)"],
"rules": {
"jsx-a11y/anchor-is-valid": 0
}
}
],
"root": true,
"extends": "next",
"env": {
"node": true,
"commonjs": true,
"browser": true,
"es6": true
}
}
}
1 change: 1 addition & 0 deletions beta/.husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
cd beta
yarn generate-ids
git add -u src/pages/**/*.md
yarn lint:fix
6 changes: 4 additions & 2 deletions beta/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"analyze": "ANALYZE=true next build",
"dev": "next",
"build": "next build && node ./scripts/generateRSS.js",
"lint": "eslint 'src/**/*.{js,ts,tsx}'",
"lint": "next lint",
"lint:fix": "next lint --fix",
"format:source": "prettier --config .prettierrc --write \"{plugins,src}/**/*.{js,ts,jsx,tsx}\"",
"nit:source": "prettier --config .prettierrc --list-different \"{plugins,src}/**/*.{js,ts,jsx,tsx}\"",
"prettier": "yarn format:source",
Expand Down Expand Up @@ -52,7 +53,8 @@
"asyncro": "^3.0.0",
"autoprefixer": "^10.3.1",
"babel-eslint": "10.x",
"eslint": "6.x",
"eslint": "7.x",
"eslint-config-next": "12.0.3",
"eslint-config-react-app": "^5.2.1",
"eslint-plugin-flowtype": "4.x",
"eslint-plugin-import": "2.x",
Expand Down
39 changes: 0 additions & 39 deletions beta/src/components/Layout/Nav/NavButtonLink.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions beta/src/components/MDX/CodeBlock/CodeBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface InlineHiglight {
endColumn: number;
}

const CodeBlock = React.forwardRef(
const CodeBlock = React.forwardRef(function CodeBlock
(
{
children,
Expand All @@ -37,7 +37,7 @@ const CodeBlock = React.forwardRef(
noMarkers?: boolean;
},
ref?: React.Ref<HTMLDivElement>
) => {
) {
const getDecoratedLineInfo = () => {
if (!metastring) {
return [];
Expand Down
26 changes: 9 additions & 17 deletions beta/src/components/MDX/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,20 @@ function Link({
return (
<>
{href.startsWith('https://') ? (
<ExternalLink
href={href}
className={cn(classes, className)}
{...props}
children={modifiedChildren}
/>
<ExternalLink href={href} className={cn(classes, className)} {...props}>
{modifiedChildren}
</ExternalLink>
) : href.startsWith('#') ? (
// eslint-disable-next-line jsx-a11y/anchor-has-content
<a
className={cn(classes, className)}
href={href}
{...props}
children={modifiedChildren}
/>
<a className={cn(classes, className)} href={href} {...props}>
{modifiedChildren}
</a>
) : (
<NextLink href={href.replace('.html', '')}>
{/* eslint-disable-next-line jsx-a11y/anchor-has-content */}
<a
className={cn(classes, className)}
{...props}
children={modifiedChildren}
/>
<a className={cn(classes, className)} {...props}>
{modifiedChildren}
</a>
</NextLink>
)}
</>
Expand Down
4 changes: 2 additions & 2 deletions beta/src/components/MDX/MDXComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ function IllustrationBlock({
) : null}
{sequential ? (
<ol className="mdx-illustration-block flex">
{images.map((x: any) => (
<li className="flex-1">{x}</li>
{images.map((x: any, i: number) => (
<li className="flex-1" key={i}>{x}</li>
))}
</ol>
) : (
Expand Down
19 changes: 15 additions & 4 deletions beta/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
Expand All @@ -17,8 +21,15 @@
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"baseUrl": "src"
"baseUrl": "src",
"incremental": true
},
"include": ["next-env.d.ts", "src/**/*.ts", "src/**/*.tsx"],
"exclude": ["node_modules"]
"include": [
"next-env.d.ts",
"src/**/*.ts",
"src/**/*.tsx"
],
"exclude": [
"node_modules"
]
}
Loading