问题标签 [editorconfig]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
11497 浏览

editorconfig - Editorconfig:如何自动修复项目中的所有文件

鉴于我有一个 .editorconfig 文件,该文件指示一致的缩进、行尾、尾随空格等。

作为一名开发人员,我想使用能够理解 .editorconfig 文件的命令行工具一致地修复所有文件。我想避免繁琐的任务,例如手动打开和更改文件。

我想如果有一个命令,例如:

为此目的存在哪些工具?你使用什么脚本?

0 投票
2 回答
1915 浏览

netbeans - 如何安装 EditorConfig NetBeans 插件?

我想按照此链接上的说明安装 EditorConfig NetBeans 插件:https ://github.com/welovecoding/editorconfig-netbeans#readme ,但这对我没有多大帮助。在说明部分,它是这样写的:

我在 cmd 和 git 上运行了这个命令,但是没有用。那么我应该在哪里运行这个命令呢?我应该在哪个目录中保存我的插件文件?

问候。

0 投票
0 回答
688 浏览

phpstorm - 在 PhpStorm 中按字符串长度而不是按字母顺序排列使用导入

我需要在 PhpStorm 中按字符串长度而不是按字母顺序排列使用导入,无论是在 PhpStorm 中还是在.editorconfig文件中。

因此,当我进行自动格式化时,它看起来不会像:

我需要它来做到这一点

0 投票
2 回答
2045 浏览

phpstorm - 如何从 eslintrc 文件中获取 editorconfig 文件?

我正在尝试为我的项目设置标准代码样式,并且我找到了http://editorconfig.org/,这是一个标准。我非常喜欢它,而且 Intellij 支持它(我们使用 Intellij)。

我有一个 .eslintrc 文件(从 airbnb 样式扩展)。

那么,如何从 .eslintrc 文件中获取 .editorconfig 文件?

0 投票
3 回答
11134 浏览

intellij-idea - 如何将 .editorconfig 应用于 intellij 中的现有项目

.editorconfig为intellij创建了一个如下所示的文件

我如何一次将这种代码样式应用于所有文件知道我将打开一个文件并按Ctrl+ Alt+l这将完成这项工作有没有办法将它作为 intellij14 中所有应用程序的配置应用

0 投票
1 回答
955 浏览

visual-studio-2017 - 有没有 .editorconfig GUI 编辑器?

EditorConfig 是一个了不起的工具,我很高兴在 vs2017 中开发人员可以开箱即用地使用它。但是每个项目都需要设置太多的设置。Visual Studio 和 ReSharper 有很棒的语法代码样式编辑器,带有 GUI 和实时预览。但是我还没有为 EditorConfig 找到相同的工具。否则,如果有人知道以 .editorconfig 格式导出 ReSharper 或 VS 设置的方法,那就太好了。我的意思是特定于 csharp 的完整设置。实际上,这里指定的所有设置

0 投票
2 回答
3375 浏览

visual-studio - 如何共享 Visual Studio 2017 代码样式和格式?

我的团队想要分享我们的代码样式和格式。为此,我们一直在使用 Resharper,并希望利用 VS2017 中的新原生功能!做这个的最好方式是什么?

0 投票
3 回答
8826 浏览

visual-studio - Visual Studio 2017 中是否有全局 .editorconfig

在 Visual Studio 2017 中,我们可以在项目中使用 .editorconfig 文件来设置项目的代码样式规则。当项目中没有 editorconfig 时,可能会使用 Visual Studio 本身的设置列表。Visual Studio 中的某个地方是否有默认的 editorconfig,我可以替换它来设置这些设置,而不是单击它们中的每一个?

0 投票
2 回答
3481 浏览

.net - Visual Studio 2017 代码样式“错误”不会阻止构建?

我设置了各种 C# 代码样式规则来生成错误,虽然违规在 IDE 中显示为错误(在错误列表和文本编辑器中),但实际构建仍然成功。

谁能证实这一点?我已经在社区(在家)和企业(在工作)版本下在 VisualStudio/15.0.0+26228.9 上进行了测试。而且由于代码样式违规,我无法破坏任何构建。

我什至尝试过使用.editorconfig,构建仍然通过......

0 投票
2 回答
966 浏览

typescript - When formatting TypeScript in visual studio code, a cast generates tslint whitespace warning

For example, when I have the following TypeScript code const bar = <foo>{ answer: 42 } tslint issues a warning 'missing whitespace' between > and {. So, to fix it, I have to write: const bar = <foo> { answer: 42 } However, every time I format my file in vs code (SHIFT+ALT+F), my formatting is reset to the version at the top, causing a new tslint issue. As I cannot change the formatting rules in vs code, do I need to add a rule to tslint or editorconfig?