eslint

VSCode格式化报错,一直提示自动修复

◇◆丶佛笑我妖孽 提交于 2020-03-04 05:06:38
原因:ESLint插件更新到2.x之后,可能会和原有格式化插件冲突,导致一直显示自动修复问题。 解决方法:建议开启ESLint插件的format配置,然后禁用原有的格式化插件,并把"source.fixAll.eslint"设置为false 来源: CSDN 作者: 常金 链接: https://blog.csdn.net/weixin_39876634/article/details/104632559

ESLint 命令行

我的未来我决定 提交于 2020-03-03 08:24:49
要在Node.js 上运行 ESLint,必须先安装 npm。 安装好npm后,可以运行下列命令: npm i -g eslint 这表示从npm仓库安装了ESLint CLI。然后继续使用下列命令运行ESLint: eslint [options] [file|dir|glob]* 示例: eslint file1.js file2.js 或者: eslint lib/** 如果想要使用 node 的 glob 语法,需要给参数加上引号,在 windows 系统运行时也可以使用双引号,像下面这样: eslint "lib/**" 命令选项 使用 ESLint 命令时,我们可以通过 eslint -h 命令来查看所有的命令行选项: eslint [options] file.js [file.js] [dir] Basic configuration: --no-eslintrc Disable use of configuration from .eslintrc.* -c, --config path::String Use this configuration, overriding .eslintrc.* config options if present --env [String] Specify environments --ext [String] Specify

Why does vue fail to recognize TS syntax on the first compilation, but works okay on the second one?

只愿长相守 提交于 2020-03-03 07:28:38
问题 I am facing a weird bug where the vue cli fails to recognize TypeScript syntax on the first time it is executed, but works okay on the second one. If you delete node_modules/.cache and then execute the command: yarn build You get this error on the first call: ERROR Failed to compile with 1 errors 3:54:55 PM error in ./src/components/ATSText/TextDate.vue Module Error (from ./node_modules/eslint-loader/index.js): error: Parsing error: Unexpected token : at src\components\ATSText\TextDate.vue:69

python+flask+vue开发(3)--vue创建使用

ぃ、小莉子 提交于 2020-03-01 08:24:43
参见: Vue2.0 新手入门 — 从环境搭建到发布 1、创建项目 在cmd里输入: cd my_projects\flask_vue vue init webpack frontend ? Project name frontend ? Project description A Vue.js project ? Author ? Vue build standalone ? Install vue-router? Yes ? Use ESLint to lint your code? Yes ? Pick an ESLint preset Standard ? Set up unit tests No ? Setup e2e tests with Nightwatch? No ? Should we run `npm install` for you after the project has been created? (recommended) npm 2、安装依赖 在cmd里 1).输入:cd frontend (项目名),回车,进入到具体项目文件夹 2).输入:cnpm install,回车,等待一小会儿,会发现项目结构里,多了一个 node_modules文件夹,这里面都是项目的依赖文件。 3).输入:cnpm run dev ,回车运行项目 4).输入:cnpm

ESLint autofix ignore rule

此生再无相见时 提交于 2020-03-01 03:10:50
问题 I'm using ESLint in vscode with option "eslint.autoFixOnSave": true . Basically, I want: Ignore 1 particular rule for fixing : prefer-const See all the warnings and errors highlighted in editor (including prefer-const ) 回答1: There seems to be a new plugin: eslint-plugin-no-autofix { "plugins": ["no-autofix"], "rules": { "prefer-const": "off", "no-autofix/prefer-const": "warn", } } 来源: https://stackoverflow.com/questions/45443478/eslint-autofix-ignore-rule

ESLint autofix ignore rule

让人想犯罪 __ 提交于 2020-03-01 03:10:49
问题 I'm using ESLint in vscode with option "eslint.autoFixOnSave": true . Basically, I want: Ignore 1 particular rule for fixing : prefer-const See all the warnings and errors highlighted in editor (including prefer-const ) 回答1: There seems to be a new plugin: eslint-plugin-no-autofix { "plugins": ["no-autofix"], "rules": { "prefer-const": "off", "no-autofix/prefer-const": "warn", } } 来源: https://stackoverflow.com/questions/45443478/eslint-autofix-ignore-rule

更新!Adobe Dreamweaver 2020 for Mac(dw 2020) v20.1中文版

给你一囗甜甜゛ 提交于 2020-02-28 05:34:55
[名称]:Adobe Dreamweaver 2020 for Mac [大小]:675.13 MB [语言]:中文 [测试环境]: Mac OS 10.15.x [下载链接]: https://www.macdown.com/mac/6054.html 更新了! dw 2020 中文激活版更新上线了! Dreamweaver 2020 mac版是一款为编码设计师提供了更快,更简单的方法来设计的软件,编写和发布在任何尺寸的屏幕上看起来很棒的网站和网络应用程序,新版本的dw2020下载比以往任何版本都更专注、更高效和快速,具备全新代码编辑器、更直观的用户界面和多种增强功能。强大的功能可以帮助编程人员更轻松、高效的设计网页。 新增功能 dw cc 2020 Mac推出了一些令 Web 设计人员和开发人员激动无比的新增功能。 1、JavaScript 重构 作为 Web 开发人员,您现在可以使用 JavaScript 重构,利用范围感知功能智能地重命名函数和变量。只需一次单击,您就可以将匿名表达式或功能块转换为箭头表达式。在类/构造的上下文中为所选标识符创建 Get/Set 函数。您现在可以在当前范围中将表达式提取为变量,还可选择一段代码并为其创建 Try/Catch 块。 您可以在 HTML、PHP 和 JavaScript 文档类型中重构代码。当您右键单击 Dreamweaver

webStorm和vue 格式化 eslint airbnb冲突设置

天涯浪子 提交于 2020-02-28 04:55:33
缩进2个空格的 这里勾上,自闭合标签,格式化的时候,/前会自动添加空格 设置永远使用单引号 ESLint: Expected indentation of 0 spaces but found 2. (indent) import { Http }自动加空格 ESLint: A space is required after ‘{’. (object-curly-spacing) 来源: CSDN 作者: OuYz12 链接: https://blog.csdn.net/OuYz12/article/details/104537613

推荐VSCode12个比较实用的插件

泪湿孤枕 提交于 2020-02-27 20:31:11
1、Auto Rename Tag ——自动重命名成对的HTML标记。假如你创建了一个<p>标记。现在你想更改它。有了这个软件,你只需要更改一个就行,另一个会自动修改。从理论上来说,使用这个软件可以把你的工作效率提升一倍。 2、HTML CSS Support ——HTML文档的CSS支持工具。该工具在获得一些简洁的语法高亮显示和代码建议方面非常有用。 3、HTML Snippets ——这一工具在代码分段方面非常有用,可以为你节省大量的时间。它能跟Emmet配对,这样一来你甚至都不用再真正键入HTML了。 4、Babel ES6/ES7 ——JavaScript Babel的辅助工具。如果你用的是Babel,这个工具可以让你更容易区分代码。如果你喜欢JavaScript,那务必也不要错过这款软件。 5、Bracket Pair Colorizer ——色彩可视化工具。如果你没有准确地括号,那这个工具对于发现因此导致的许多常见漏洞十分方便。 6、ESLint ——你在编写代码的时候,利用这个软件可以轻易获取有关漏洞的提示,而且在编码过程中,它还可以帮助你养成良好的编码习惯。 7、Guides ——这一工具可以被用来添加额外的指导行代码。这是另一个视觉提示,以确保你正确地括号了。 8、JavaScript Console Utils ——使控制台日志记录变得更为简单可行

vscode

送分小仙女□ 提交于 2020-02-27 10:03:16
工欲善其事,必先利其器 以下就是开发Vue常用插件: Vetur —— 语法高亮、智能感知、Emmet等 Live Server —— 实时预览 EsLint —— 语法纠错 Auto Close Tag —— 自动闭合HTML/XML标签 Auto Rename Tag —— 自动完成另一侧标签的同步修改 JavaScript(ES6) code snippets —— ES6语法智能提示以及快速输入,除js外还支持.ts,.jsx,.tsx,.html,.vue,省去了配置其支持各种包含js代码文件的时间 Path Intellisense —— 自动路径补全 HTML CSS Support —— 让 html 标签上写css 智能提示当前项目所支持的样式 Beautify ——格式化代码,值得注意的是,beautify插件支持自定义格式化代码规则 Bracket Pair Colorizer ——给括号加上不同的颜色,便于区分不同的区块,使用者可以定义不同括号类型和不同颜色 open in browser ——直接右键项目单击启动 来源: oschina 链接: https://my.oschina.net/coderzpw/blog/3168481