Skip to content

Commit

Permalink
feat: update deps & eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
wearzdk committed Oct 27, 2023
1 parent f60b02e commit 9adfc89
Show file tree
Hide file tree
Showing 9 changed files with 1,918 additions and 800 deletions.
43 changes: 36 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,44 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.tsc.autoDetect": "off",
"css.validate": false,
"less.validate": false,
// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,

// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,

// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"files.associations": {
"*.css": "postcss"
"source.fixAll": "explicit",
"source.organizeImports": "never"
},
"editor.formatOnSave": false,

// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "style/*", "severity": "off" },
{ "rule": "*-indent", "severity": "off" },
{ "rule": "*-spacing", "severity": "off" },
{ "rule": "*-spaces", "severity": "off" },
{ "rule": "*-order", "severity": "off" },
{ "rule": "*-dangle", "severity": "off" },
{ "rule": "*-newline", "severity": "off" },
{ "rule": "*quotes", "severity": "off" },
{ "rule": "*semi", "severity": "off" }
],

// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml"
],
"cSpell.words": ["tampermonkey"]
}
7 changes: 7 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import antfu from '@antfu/eslint-config'

export default antfu({
rules: {
'no-console': 'off',
},
})
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "content-script-vue",
"type": "module",
"version": "1.0.0",
"packageManager": "pnpm@8.9.2",
"description": "一个浏览器脚本",
"author": "wear工程师 <1225186748@qq.com>",
"version": "1.0.0",
"type": "module",
"license": "MIT",
"packageManager": "pnpm@8.6.12",
"scripts": {
"dev": "vite",
"build": " vite build",
Expand All @@ -14,32 +14,32 @@
"typecheck": "vue-tsc --noEmit --skipLibCheck "
},
"dependencies": {
"jquery": "^3.7.0",
"vue": "^3.3.4"
"jquery": "^3.7.1",
"vue": "^3.3.6"
},
"devDependencies": {
"@antfu/eslint-config": "^0.40.2",
"@antfu/eslint-config": "^1.0.0-beta.28",
"@iconify-json/ic": "^1.1.14",
"@iconify-json/mdi": "^1.1.54",
"@types/jquery": "^3.5.16",
"@types/webextension-polyfill": "^0.10.1",
"@unocss/preset-icons": "^0.55.2",
"@unocss/reset": "^0.55.2",
"@unocss/transformer-directives": "^0.55.2",
"@vitejs/plugin-vue": "^4.3.2",
"@vueuse/core": "^10.3.0",
"@types/jquery": "^3.5.25",
"@types/webextension-polyfill": "^0.10.5",
"@unocss/preset-icons": "^0.57.1",
"@unocss/reset": "^0.57.1",
"@unocss/transformer-directives": "^0.57.1",
"@vitejs/plugin-vue": "^4.4.0",
"@vueuse/core": "^10.5.0",
"esno": "^0.17.0",
"less": "^4.2.0",
"naive-ui": "^2.34.4",
"naive-ui": "^2.35.0",
"postcss-prefix-selector": "^1.16.0",
"typescript": "^5.1.6",
"unocss": "^0.55.2",
"unocss-preset-theme": "^0.9.1",
"typescript": "^5.2.2",
"unocss": "^0.56.5",
"unocss-preset-theme": "^0.10.1",
"unplugin-auto-import": "^0.16.6",
"vite": "^4.4.9",
"vite": "^4.5.0",
"vite-plugin-css-injected-by-js": "^3.3.0",
"vite-plugin-web-extension": "^3.2.0",
"vue-tsc": "^1.8.8",
"vue-tsc": "^1.8.20",
"webextension-polyfill": "^0.10.0"
}
}
2,599 changes: 1,838 additions & 761 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions src/Content.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script setup lang="ts">
// import $ from 'jquery' // 你可以使用jquery来进行dom操作
import { NButton } from 'naive-ui'
import { NConfigProvider, darkTheme } from 'naive-ui'
import { NButton, NConfigProvider, darkTheme } from 'naive-ui'
import Logs from './components/Logs.vue'
import Window from './components/Window.vue'
Expand Down
6 changes: 6 additions & 0 deletions src/auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ declare global {
const h: typeof import('vue')['h']
const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
const inject: typeof import('vue')['inject']
const injectLocal: typeof import('@vueuse/core')['injectLocal']
const isDefined: typeof import('@vueuse/core')['isDefined']
const isProxy: typeof import('vue')['isProxy']
const isReactive: typeof import('vue')['isReactive']
Expand Down Expand Up @@ -67,6 +68,7 @@ declare global {
const onUpdated: typeof import('vue')['onUpdated']
const pausableWatch: typeof import('@vueuse/core')['pausableWatch']
const provide: typeof import('vue')['provide']
const provideLocal: typeof import('@vueuse/core')['provideLocal']
const reactify: typeof import('@vueuse/core')['reactify']
const reactifyObject: typeof import('@vueuse/core')['reactifyObject']
const reactive: typeof import('vue')['reactive']
Expand Down Expand Up @@ -323,6 +325,7 @@ declare module 'vue' {
readonly h: UnwrapRef<typeof import('vue')['h']>
readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']>
readonly inject: UnwrapRef<typeof import('vue')['inject']>
readonly injectLocal: UnwrapRef<typeof import('@vueuse/core')['injectLocal']>
readonly isDefined: UnwrapRef<typeof import('@vueuse/core')['isDefined']>
readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
Expand Down Expand Up @@ -350,6 +353,7 @@ declare module 'vue' {
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
readonly pausableWatch: UnwrapRef<typeof import('@vueuse/core')['pausableWatch']>
readonly provide: UnwrapRef<typeof import('vue')['provide']>
readonly provideLocal: UnwrapRef<typeof import('@vueuse/core')['provideLocal']>
readonly reactify: UnwrapRef<typeof import('@vueuse/core')['reactify']>
readonly reactifyObject: UnwrapRef<typeof import('@vueuse/core')['reactifyObject']>
readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
Expand Down Expand Up @@ -600,6 +604,7 @@ declare module '@vue/runtime-core' {
readonly h: UnwrapRef<typeof import('vue')['h']>
readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']>
readonly inject: UnwrapRef<typeof import('vue')['inject']>
readonly injectLocal: UnwrapRef<typeof import('@vueuse/core')['injectLocal']>
readonly isDefined: UnwrapRef<typeof import('@vueuse/core')['isDefined']>
readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
Expand Down Expand Up @@ -627,6 +632,7 @@ declare module '@vue/runtime-core' {
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
readonly pausableWatch: UnwrapRef<typeof import('@vueuse/core')['pausableWatch']>
readonly provide: UnwrapRef<typeof import('vue')['provide']>
readonly provideLocal: UnwrapRef<typeof import('@vueuse/core')['provideLocal']>
readonly reactify: UnwrapRef<typeof import('@vueuse/core')['reactify']>
readonly reactifyObject: UnwrapRef<typeof import('@vueuse/core')['reactifyObject']>
readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
Expand Down
2 changes: 1 addition & 1 deletion src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/// <reference types="vite/client" />


declare module '*.vue' {
import type { DefineComponent } from 'vue'

// eslint-disable-next-line ts/ban-types
const component: DefineComponent<{}, {}, any>
export default component
}
Expand Down
18 changes: 9 additions & 9 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"compilerOptions": {
"target": "ESNext",
"jsx": "preserve",
"lib": ["ESNext", "DOM"],
"useDefineForClassFields": true,
"module": "ESNext",
"moduleResolution": "Node",
"strict": true,
"jsx": "preserve",
"resolveJsonModule": true,
"isolatedModules": true,
"esModuleInterop": true,
"lib": ["ESNext", "DOM"],
"skipLibCheck": true,
"types": ["naive-ui/volar"],
"noEmit": true
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"isolatedModules": true,
"skipLibCheck": true
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"references": [{ "path": "./tsconfig.node.json" }]
"references": [{ "path": "./tsconfig.node.json" }],
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
}
2 changes: 1 addition & 1 deletion tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"composite": true,
"module": "ESNext",
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts", "header", "package.json", "src/manifest.json"]
}

0 comments on commit 9adfc89

Please sign in to comment.