Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
o2sh committed Mar 23, 2024
1 parent 0c4e8aa commit fac2b23
Show file tree
Hide file tree
Showing 12 changed files with 84 additions and 41 deletions.
22 changes: 22 additions & 0 deletions docs/vercel/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
parser: '@typescript-eslint/parser',
extraFileExtensions: ['.svelte'],
},
plugins: ['@typescript-eslint', 'unused-imports'],
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
},
],
};
25 changes: 0 additions & 25 deletions docs/vercel/.eslintrc.json

This file was deleted.

4 changes: 3 additions & 1 deletion docs/vercel/.prettierrc.json → docs/vercel/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@
"bracketSameLine": true,
"singleAttributePerLine": false,
"quoteProps": "consistent",
"plugins": ["prettier-plugin-svelte"]
"plugins": ["prettier-plugin-svelte"],
"svelteSortOrder": "scripts-options-markup-styles",
"svelteIndentScriptAndStyle": true
}
46 changes: 46 additions & 0 deletions docs/vercel/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/vercel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "vite build",
"format": "prettier -w .",
"preview": "vite preview",
"check": "check:svelte && check:prettier && check:lint",
"check": "npm run check:svelte && npm run check:prettier && npm run check:lint",
"check:svelte": "svelte-check",
"check:prettier": "prettier --check **/*.{ts,js,svelte,css,html,json}",
"check:lint": "eslint src/**/*.{ts,js,svelte}"
Expand Down
2 changes: 1 addition & 1 deletion docs/vercel/src/Index.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import AsciiPreview from './lib/AsciiPreview.svelte';
import AsciiPreview from './components/AsciiPreview.svelte';
import data from '../../../languages.yaml';
import type { Languages, Language } from '../../../languages.yaml';
import { onMount } from 'svelte';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import { mapToDefaultTerminalFgColor } from '../lib/utils';
import Chip from './Chip.svelte';
import TitleLink from './TitleLink.svelte';
Expand Down Expand Up @@ -27,10 +28,6 @@
return `${htmlLine}${'</span>'.repeat(spanCount)}`;
})
.join('\n');
function mapToDefaultTerminalFgColor(color: string, dark: boolean): string {
return color === 'white' && !dark ? 'black' : color;
}
</script>

<div class="title-row">
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions docs/vercel/src/lib/utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export function mapToDefaultTerminalFgColor(
color: string,
dark: boolean
): string {
return color === 'white' && !dark ? 'black' : color;
}
File renamed without changes.
13 changes: 4 additions & 9 deletions docs/vercel/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
{
"extends": "@tsconfig/svelte/tsconfig.json",
"compilerOptions": {
"target": "ESNext",
"target": "esnext",
"useDefineForClassFields": true,
"module": "ESNext",
"module": "esnext",
"resolveJsonModule": true,
"moduleResolution": "node",
"baseUrl": ".",
/**
* Typecheck JS in `.svelte` and `.js` files by default.
* Disable checkJs if you'd like to use dynamic types in JS.
* Note that setting allowJs false does not prevent the use
* of JS in `.svelte` files.
*/
"allowJs": true,
"checkJs": true
},
Expand All @@ -20,6 +15,6 @@
"src/**/*.ts",
"src/**/*.js",
"src/**/*.svelte",
"typings/**/*.d.ts"
"src/**/*.d.ts"
]
}

0 comments on commit fac2b23

Please sign in to comment.