Skip to content

Commit

Permalink
build: replace eslint-plugin-svelte3 with eslint-plugin-svelte
Browse files Browse the repository at this point in the history
  • Loading branch information
BearToCode committed Nov 7, 2023
1 parent 8f6baef commit 49aeafb
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 25 deletions.
16 changes: 12 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,27 @@
"browser": true,
"es2021": true
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:svelte/recommended"
],
"overrides": [
{
"files": ["*.svelte"],
"processor": "svelte3/svelte3"
"parser": "svelte-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
"sourceType": "module",
"extraFileExtensions": [".svelte"]
},
"plugins": ["@typescript-eslint", "svelte3"],
"plugins": ["@typescript-eslint"],
"rules": {
"no-mixed-spaces-and-tabs": 0
},
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@
"core": "cd packages/carta-md && npm run dev",
"dev": "cd demo && npm run dev",
"check": "cd packages/carta-md && npm run check",
"publish": "node scripts/publish.js",
"build": "node scripts/build.js",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write .",
"prepare": "husky install",
"commit": "cz",
"semantic-release": "npx --no-install semantic-release -e semantic-release-monorepo"
"publish": "npx --no-install semantic-release -e semantic-release-monorepo"
},
"devDependencies": {
"@types/node": "^18.16.3",
Expand All @@ -29,7 +28,7 @@
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.39.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-svelte3": "^4.0.0",
"eslint-plugin-svelte": "^2.35.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.2",
"ora": "^6.3.0",
Expand Down
1 change: 1 addition & 0 deletions packages/carta-md/src/lib/CartaViewer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
</script>

<div bind:this={elem} class="carta-viewer__{theme} markdown-body">
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
{@html rendered}
{#if mounted}
{#each carta.components.filter(({ parent }) => [parent]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
</script>

<div bind:this={elem} on:scroll={handleScroll} class="carta-renderer markdown-body">
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
{@html renderedHtml}
<slot />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<pre
class="shj-lang-md carta-font-code"
bind:this={highlighElem}
aria-hidden="true">{@html highlighted}</pre>
aria-hidden="true"><!-- eslint-disable-line svelte/no-at-html-tags -->{@html highlighted}</pre>

<textarea
name="md"
Expand Down
102 changes: 85 additions & 17 deletions pnpm-lock.yaml

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

0 comments on commit 49aeafb

Please sign in to comment.