Skip to content

Commit

Permalink
chore: update dependencies (#125)
Browse files Browse the repository at this point in the history
* replaces eslint svelte
* fix lint errors
  • Loading branch information
VaiTon authored Oct 25, 2023
1 parent 36c67fc commit a55d906
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 48 deletions.
22 changes: 16 additions & 6 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
plugins: ['svelte3', '@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:svelte/recommended'
],
plugins: ['@typescript-eslint'],
ignorePatterns: ['*.cjs'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
settings: {
'svelte3/typescript': () => require('typescript')
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
}
}
],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"@types/dompurify": "^3.0.4",
"@types/jsdom": "^21.1.4",
"@types/katex": "^0.16.5",
"@types/marked": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"autoprefixer": "^10.4.16",
Expand All @@ -36,7 +35,7 @@
"dompurify": "^3.0.6",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-svelte3": "^4.0.0",
"eslint-plugin-svelte": "^2.34.0",
"fuse.js": "^6.6.2",
"katex": "^0.16.9",
"marked": "^9.1.2",
Expand Down
125 changes: 99 additions & 26 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion src/config
1 change: 1 addition & 0 deletions src/routes/[...dir]/[file=markdown]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
</button>
</div>
<section class="prose md:mx-auto mt-10 mx-6" id="markdown" bind:this={markdown} role="document">
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
{@html data.markdown}

<div class="my-4 prose prose-slate italic max-w-none text-center mx-10">
Expand Down
13 changes: 0 additions & 13 deletions src/routes/[...dir]/[zfile=dir]/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { onDestroy } from 'svelte';
import Fuse from 'fuse.js';
import { page } from '$app/stores';
Expand All @@ -17,14 +16,6 @@
let searchInput: HTMLInputElement;
let resultList: HTMLUListElement;
let parentPath = '/';
const pageUnsubscribe = page.subscribe((page) => {
const path = page.params.dir.split('/');
path.push(page.params.file);
path.pop();
parentPath = base + '/' + path.join('/');
});
let searchQuery = '';
let fuse: Fuse<FuzzyFile> = new Fuse(data.fuzzy, {
keys: ['name']
Expand Down Expand Up @@ -52,10 +43,6 @@
.slice(0, $page.url.pathname.split('/').indexOf(part) + 1)
.join('/');
onDestroy(() => {
pageUnsubscribe();
});
function keydown(e: KeyboardEvent) {
if (e.key === 'Escape') {
if (searchActive) searchActive = false;
Expand Down

1 comment on commit a55d906

@vercel
Copy link

@vercel vercel bot commented on a55d906 Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

dynamik – ./

dynamik.vercel.app
dynamik-csunibo.vercel.app
dynamik-git-main-csunibo.vercel.app

Please sign in to comment.