Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
baku89 committed Nov 30, 2023
1 parent c75138d commit c196912
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 72 deletions.
55 changes: 55 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"root": true,
"parser": "vue-eslint-parser",
"env": {
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:vue/vue3-recommended",
"plugin:prettier-vue/recommended",
"prettier"
],
"parserOptions": {
"parser": "@typescript-eslint/parser",
"ecmaVersion": 2022,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"simple-import-sort",
"unused-imports",
"jest"
],
"rules": {
"no-console": "warn",
"no-debugger": "warn",
"eqeqeq": "error",
"prefer-const": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"unused-imports/no-unused-imports-ts": "error",
"@typescript-eslint/no-namespace": "off",
"vue/require-default-prop": "off",
"vue/no-multiple-template-root": "off",
"vue/multi-word-component-names": "off",
"vue/no-v-model-argument": "off",
"vue/attribute-hyphenation": "off"
},
"overrides": [
{
"files": ["docs/examples/*.js"],
"globals": {
"Path": "readonly",
"scalar": "readonly",
"vec2": "readonly",
"mat2d": "readonly",
"stroke": "readonly",
"context": "readonly"
}
}
]
}
54 changes: 0 additions & 54 deletions .eslintrc.js

This file was deleted.

4 changes: 2 additions & 2 deletions docs/.vuepress/components/Example.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<script lang="ts" setup>
import {ref, onMounted, watch, watchEffect} from 'vue'
import {mat2d, scalar, vec2} from 'linearly'
import {type Path} from '../../../src'
import {type Path} from 'pathed'
import saferEval from 'safer-eval'
import Editor from './Editor.vue'
Expand All @@ -35,7 +35,7 @@ const context = ref<null | CanvasRenderingContext2D>(null)
onMounted(async () => {
context.value = canvas.value?.getContext('2d') ?? null
const {Path} = await import('../../../src')
const {Path} = await import('pathed')
watch(
() => [editingCode.value, canvas.value, context.value] as const,
Expand Down
4 changes: 4 additions & 0 deletions docs/.vuepress/components/modules.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module 'safer-eval' {
function saferEval(code: string, context?: object): void
export default saferEval
}
9 changes: 9 additions & 0 deletions docs/.vuepress/components/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"paths": {
"pathed": ["./src/index.ts"]
}
},
"include": ["**/*.vue"]
}
4 changes: 4 additions & 0 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import palettePlugin from '@vuepress/plugin-palette'
import {defineUserConfig, defaultTheme} from 'vuepress'
import {path} from '@vuepress/utils'

// @ts-ignore
import {typedocPlugin} from 'vuepress-plugin-typedoc/next'

module.exports = defineUserConfig({
title: 'Pathed',
base: '/pathed/',
alias: {
pathed: path.resolve(__dirname, '../../src'),
},
head: [
['link', {rel: 'preconnect', href: 'https://fonts.googleapis.com'}],
[
Expand Down
5 changes: 0 additions & 5 deletions docs/modules.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
declare module 'safer-eval' {
function saferEval(code: string, context?: object): void
export default saferEval
}

declare module '*?raw' {
const content: string
export default content
Expand Down
9 changes: 0 additions & 9 deletions docs/tsconfig.json

This file was deleted.

5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
"declarationMap": true,
"lib": ["esnext", "DOM"],
"skipLibCheck": true,
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"allowJs": true
},
"include": ["src/**/*.ts", "docs/**/*.ts", "docs/**/*.vue"],
"include": ["src/**/*.ts"],
"exclude": ["node_modules", "src/**/*.test.ts"]
}

0 comments on commit c196912

Please sign in to comment.