vscode 插件、v2-v3代码片段、 eslint配置项

一、自用 vscode插件

DeepSeek VS Code 插件

在这里插入图片描述

console插件

Auto Logger Log

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

二、v2-v3代码片段

v2 代码片段

{
	// Place your 全局 snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and 
	// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope 
	// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is 
	// used to trigger the snippet and the body will be expanded and inserted. Possible variables are: 
	// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. 
	// Placeholders with the same ids are connected.
	// Example:
	// "Print to console": {
	// 	"scope": "javascript,typescript",
	// 	"prefix": "log",
	// 	"body": [
	// 		"console.log('$1');",
	// 		"$2"
	// 	],
	// 	"description": "Log output to console"
	// }
	"Print to console": {
		"scope": "vue",
		"prefix": "vue",
		"body": [
			"<template>",
			"<div class=''>",
			"",
			"</div>",
			"</template>",
			"",
			"<script>",
			"export default {",
			"data() {",
			"return {};",
			"},",
			"mounted() {},",
			"methods: {},",
			"components: {},",
			"computed: {},",
			"};",
			"</script>",
			"",
			"<style lang='scss' scoped>",
			"",
			"</style>",
			""
		],
		"description": "Log output to console"
	}
}

v3代码片段

{
	// Place your snippets for vue here. Each snippet is defined under a snippet name and has a prefix, body and 
	// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
	// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the 
	// same ids are connected.
	// Example:
	// "Print to console": {
	// 	"prefix": "log",
	// 	"body": [
	// 		"console.log('$1');",
	// 		"$2"
	// 	],
	// 	"description": "Log output to console"
	// }
	"Print to console": {
		"scope": "vue",
		"prefix": "vs",
		"body": [
			"<template>",
			" <div class='home'>",
			" ",
			"  </div>",
			"</template>",
			"<script setup>",
			" import { reactive, toRefs, onMounted } from 'vue'",
			"//import { useRoute,useRouter } from 'vue-router'",
			"//const route = useRoute()",
			" //const router = useRouter()",
			"//const id = route.query.id",
			" const data = reactive({",
			"  list: [],",
			" })",
			" const getList = () => {}",
			"  onMounted(() => {",
			"  getList()",
			"  })",
			"const { list } = toRefs(data)",
			"</script>",
			"<style lang='scss' scoped>",
			" .home {",
			"  }",
			"  .flex {",
			"   display: flex;",
			" }",
			" .flex-s {",
			" display: flex;",
			"justify-content: space-between;",
			" }",
			"</style>",
		],
		"description": "Log output to console"
	}
}

eslint配置项

{
  "workbench.colorTheme": "The Ultimate Cool",
  "[vue]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "security.workspace.trust.untrustedFiles": "open",
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[scss]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[css]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "editor.fontLigatures": false,
  "editor.suggestSelection": "first",
  "workbench.colorCustomizations": {
    "editor.selectionBackground": "#e29607f8"
  },
  "workbench.iconTheme": "material-icon-theme",
  "explorer.confirmDragAndDrop": false,
  "explorer.confirmDelete": true, //  启用保存时自动修复,默认只支持.js文件
  "eslint.validate": [
    "javascript", //  用eslint的规则检测js文件
    {
      "language": "vue", // 检测vue文件
      "autoFix": true //  为vue文件开启保存自动修复的功能
    },
    {
      "language": "html",
      "autoFix": true
    }
  ],
  // vscode默认启用了根据文件类型自动设置tabsize的选项
  "editor.detectIndentation": false, // 检测缩进
  "editor.tabSize": 2, // tab 空格
  "editor.formatOnSave": false, // 保存时格式化 于vue中eslint冲突
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[json]": {
    "editor.defaultFormatter": "vscode.json-language-features"
  },
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "fileheader.cursorMode": {
    "description": "",
    "param": "",
    "return": ""
  },
  "fileheader.customMade": {
    "Author": "zhouyx",
    "Date": "Do not edit",
    "LastEditTime": "Do not edit",
    "LastEditors": "zhouyx",
    "FilePath": "Do not edit", // 设置后,默认生成文件相对于项目的路径
    "程序猿": "佛祖保佑     永不宕机     永无BUG"
  },
  "fileheader.configObj": {
    "createFileTime": true,
    "autoAdd": true,
    "language": {
      "languagetest": {
        "head": "/$$",
        "middle": " $ @",
        "end": " $/"
      }
    },
    "autoAddLine": 100,
    "autoAlready": true,
    "annotationStr": {
      "head": "/*",
      "middle": " * @",
      "end": " */",
      "use": true
    },
    "headInsertLine": {
      "php": 2,
      "sh": 2
    },
    "beforeAnnotation": {
      "文件后缀": "该文件后缀的头部注释之前添加某些内容"
    },
    "afterAnnotation": {
      "文件后缀": "该文件后缀的头部注释之后添加某些内容"
    },
    "specialOptions": {
      "特殊字段": "自定义比如LastEditTime/LastEditors"
    },
    "switch": {
      "newlineAddAnnotation": true
    },
    "supportAutoLanguage": [],
    "prohibitAutoAdd": ["json"],
    "folderBlacklist": ["node_modules", "文件夹禁止自动添加头部注释"],
    "prohibitItemAutoAdd": [
      "项目的全称, 整个项目禁止自动添加头部注释, 可以使用快捷键添加"
    ],
    "moveCursor": true,
    "dateFormat": "YYYY-MM-DD HH:mm:ss",
    "atSymbol": ["@", "@"],
    "atSymbolObj": {
      "文件后缀": ["头部注释@符号", "函数注释@符号"]
    },
    "colon": [": ", ": "],
    "colonObj": {
      "文件后缀": ["头部注释冒号", "函数注释冒号"]
    },
    "filePathColon": "路径分隔符替换",
    "showErrorMessage": false,
    "writeLog": false,
    "wideSame": false,
    "wideNum": 13,
    "functionWideNum": 0,
    "CheckFileChange": false,
    "createHeader": true,
    "useWorker": false,
    "designAddHead": false,
    "headDesignName": "random",
    "headDesign": false,
    "cursorModeInternal": false,
    "openFunctionParamsCheck": true,
    "functionParamsShape": "normal",
    "functionBlankSpace": 0
  },
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[vue]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "settingsSync.ignoredExtensions": [],
  "editor.codeActionsOnSave": {
  
    "source.fixAll.eslint": "explicit"
  },
  "eslint.autoFixOnSave": true,
  "workbench.editor.enablePreview": false,
  "files.autoSave": "afterDelay",
  "workbench.colorTheme": "The Ultimate Cool",
  "settingsSync.ignoredSettings": []
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

周亚鑫

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值