我有一个现有的 React/Redux 项目,并且我已经开始在我的项目中使用 typescript。我已经为扩展airbnbeslint 配置的项目设置了我的eslint 配置。我的 eslint 如下:
module.exports = {
"parser": "babel-eslint",
"extends": [
"airbnb",
"plugin:flowtype/recommended"
],
"plugins": [
"react",
"jsx-a11y",
"flowtype"
],
"env": {
"browser": true,
"node": true,
"es6": true
},
"globals": {
"__DEV__": true,
"__SERVER__": true,
"__": true,
"define": true,
"describe": true,
"expect": true,
"require": true,
"test": true,
},
"ecmaFeatures": {
"arrowFunctions": true,
"binaryLiterals": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,
"destructuring": true,
"forOf": true,
"generators": true,
"modules": true,
"objectLiteralComputedProperties": true,
"objectLiteralDuplicateProperties": true,
"objectLiteralShorthandMethods": true, …Run Code Online (Sandbox Code Playgroud) 我在 Visual Studio Code 中安装了一些扩展以在 Django 中进行开发。我唯一的问题是当我尝试这样做时;
从my_app_name导入视图
我收到了来自 Visual Studio Code 的警告。
如果这样打字;
从. 导入视图
我没有收到任何警告!但是 a 更喜欢上面的另一种形式。
注意:我的项目运行良好,因为这只是一个警告,但我希望该警告消失。
我的快速解决方案:
打开项目文件夹 只需打开一个项目目录。
我已经在谷歌上搜索了半天了。
当我在 Google Chrome 中下载某些内容时,我想转到包含文件的文件夹。但是当我按“在文件夹中显示”时,会启动 Visual Studio Code 而不是我的 Thunar。我怎样才能解决这个问题?
Firefox 可以打开文件夹,但 Chromium、Google-Chrome 和 Opera 会打开 Visual Studio Code。
我的系统是 Linux Mint Tara。我已经尝试了一些东西。喜欢添加
[Default Applications]
inode/directory=Thunar.desktop
Run Code Online (Sandbox Code Playgroud)
到 /home/[user]/.config/mimeapps.list
code.desktop从 /usr/share/applications/mimeinfo.cache 中完全删除
跑xdg-mime default Thunar.desktop inode/directory了,输出的xdg-mime query default inode/directory是Thunar.desktop!!!
甚至从文件系统中完全删除了 code.desktop。没有任何效果!
请帮忙,这让我很恼火。
google-chrome file-management chromium linux-mint visual-studio-code
标题说明了一切。我打开一个测试文件。键入$package.。什么都没有出现。这不是延迟问题。这不是一个空包。如何让智能感知开启?
Update: I've open a bug ticket with the VSCode-Golang team. As we find more information, I'll report back here. https://github.com/Microsoft/vscode-go/issues/2278
For those down voting: please follow the community standard and explain why.
许多插件可以通过未公开的API SetContext设置自己特定的“上下文” 。由于文档没有列出这些自定义上下文,我不能只查看文档以了解如何以正确的方式配置我自己的键绑定。是否有可能知道当前的上下文数组?
例如:我想使用键盘快捷键(无鼠标)导航到“git lens”面板(已经有这个),然后通过键盘导航将一些文件标记为暂存,然后调用提交编辑器,只需'提交' 我的东西。
我正在尝试在 vscode 中自定义我的集成终端 shell 提示,并且成功地能够更改主题(以便我可以看到我当前的工作目录和我所在的分支),但是现在我想删除第一部分' anhlucci@Anhs-MacBook-Pro'。我怎么做?
我正在为 vscode 设置一个“cppcheck”任务。它有效,但问题匹配器无法捕获问题。
我尝试过“$gcc”问题匹配器以及一些自定义配置。
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "cppcheck",
"type": "shell",
"command": "cppcheck --template=gcc --enable=style --project=${workspaceFolder}/build/compile_commands.json",
"problemMatcher": "$gcc",
}
]
}
Run Code Online (Sandbox Code Playgroud)
或这个:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "cppcheck",
"type": "shell",
"command": "cppcheck --template=gcc --enable=warning src/jc_certreq.cpp",
"problemMatcher": {
"owner": "cpp",
"fileLocation": "absolute",
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4, …Run Code Online (Sandbox Code Playgroud) 我想弄清楚为什么我的设置没有在<template>code</template>. 设置舞台。我一直在使用 Vue cli 3,模板 eslint + 标准,我使用 VS Code,我得到了 Vetur 和 eslint 作为插件。
我想使用@vue/essential配置,但如前所述它没有在模板中格式化,只有 js。现在切换到@vue/recommended模板中的格式。有什么区别?
工作配置
'extends': [
'plugin:vue/essential',
'standard'
],
Run Code Online (Sandbox Code Playgroud)
不工作
.eslintrc.js
'extends': [
'plugin:vue/essential',
'standard'
],
Run Code Online (Sandbox Code Playgroud)
其他配置
vscode
"eslint.workingDirectories": [
".eslintrc.js"
],
"eslint.enable": true,
"eslint.run": "onSave",
"eslint.validate": [
{
"language": "vue",
"autoFix": true
},
{
"language": "html",
"autoFix": true
},
{
"language": "javascript",
"autoFix": true
}
],
"eslint.options": {
"extensions": [
".js",
".vue"
]
},
"eslint.alwaysShowStatus": true,
"eslint.autoFixOnSave": true,
"editor.formatOnSave": false, …Run Code Online (Sandbox Code Playgroud) eslint ×2
asp.net ×1
chromium ×1
cppcheck ×1
django ×1
go ×1
linux-mint ×1
prettier ×1
python ×1
terminal ×1
typescript ×1
ubuntu ×1
vetur ×1
vscode-tasks ×1
vue.js ×1