Skip to content

Commit

Permalink
fix: attempt to fix ci memory leak (#6933)
Browse files Browse the repository at this point in the history
* fix: attempt to fix ci memory leak

* chore: fixed eslint rules
  • Loading branch information
ovflowd authored Jul 18, 2024
1 parent da87326 commit 86d14ad
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 19 deletions.
14 changes: 1 addition & 13 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# Node.js
node_modules

# Next.js & Vercel Directories
.next
.turbo
.swc
build

# We don't want to lint/prettify the Coverage Results
coverage
junit.xml

# We shouldn't lint statically generated Storybook files
storybook-static

# This file naturally might break conventional rules
global.d.ts
18 changes: 18 additions & 0 deletions apps/site/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Node.js
node_modules

# Next.js & Vercel Directories
.next
.turbo
.swc
build

# We don't want to lint/prettify the Coverage Results
coverage
junit.xml

# We shouldn't lint statically generated Storybook files
storybook-static

# This file naturally might break conventional rules
global.d.ts
2 changes: 1 addition & 1 deletion apps/site/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const nextConfig = {
'shiki',
],
// Removes the warning regarding the WebPack Build Worker
webpackBuildWorker: false,
webpackBuildWorker: true,
// Enables Next.js's Instrumentation Hook
instrumentationHook: true,
},
Expand Down
13 changes: 10 additions & 3 deletions apps/site/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"paths": { "@/*": ["./*"] },
"plugins": [{ "name": "next" }],
"paths": {
"@/*": ["./*"]
},
"plugins": [
{
"name": "next"
}
],
"baseUrl": "."
},
"mdx": {
Expand All @@ -28,7 +34,8 @@
"**/*.tsx",
".next/types/**/*.ts",
".storybook/**/*.ts",
".storybook/**/*.tsx"
".storybook/**/*.tsx",
"build/types/**/*.ts"
],
"exclude": ["node_modules", ".next"]
}
4 changes: 2 additions & 2 deletions apps/site/util/getHighlighter.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { getHighlighterCore } from '@shikijs/core';
import { getSingletonHighlighterCore } from '@shikijs/core';
import type { HighlighterCore } from '@shikijs/core';
import { getWasmInstance } from '@shikijs/core/wasm-inlined';

import { LANGUAGES, DEFAULT_THEME } from '@/shiki.config.mjs';

// This creates a memoized minimal Shikiji Syntax Highlighter
export const getShiki = () =>
getHighlighterCore({
getSingletonHighlighterCore({
themes: [DEFAULT_THEME],
langs: LANGUAGES,
loadWasm: getWasmInstance,
Expand Down

0 comments on commit 86d14ad

Please sign in to comment.