简体   繁体   English

来自codacy的Eslint配置文件

[英]Eslint config file from codacy

I'm using codacy to monitor code quality, but it would be nice to see what codacy will catch before a push. 我正在使用codacy来监控代码质量,但是看看在推送之前会遇到什么样的代码会很好。 I see that it uses eslint and several other tools to decide what to catch. 我看到它使用eslint和其他几种工具来决定捕获什么。 Is there a way to generate a .eslintrc config file from codacy? 有没有办法从codacy生成.eslintrc配置文件? That way I can use this config in Webstorm and make any necessary changes before pushing any code. 这样我就可以在Webstorm中使用此配置,并在推送任何代码之前进行任何必要的更改。

2 years later Codacy still doesn't provide an export tool. 2年后,Codacy仍然没有提供出口工具。 So the best approach seems to be mimic Codacy configuration on ESLint demo ( https://eslint.org/demo/ ) then click "Download .eslintrc.json file with this configuration" at the bottom of the page. 因此,最好的方法似乎是在ESLint演示( https://eslint.org/demo/ )上模仿Codacy配置,然后单击页面底部的“使用此配置下载.eslintrc.json文件”。 You will need to check/uncheck rules again, but at least you will get a configuration file for future use. 您需要再次检查/取消选中规则,但至少您将获得一个配置文件以供将来使用。

Unfortunately, it's not possible at this moment to generate a .eslintrc or JHint/JSLint file from Codacy itself. 不幸的是,目前无法从Codacy本身生成.eslintrc或JHint / JSLint文件。 You can import those config files in Codacy but not export them. 您可以在Codacy中导入这些配置文件,但不能导出它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM