CoffeeLint:禁用警告消息:行超出最大允许长度 [英] CoffeeLint: Disable Warning message: Line exceeds maximum allowed length

查看:318
本文介绍了CoffeeLint:禁用警告消息:行超出最大允许长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Visual Studio代码中禁用来自CoffeLint的警告消息。
我已将用户文件夹中的coffeelint.json更改为以下内容:

I'm trying to disable the warning message from CoffeLint in visual studio code. I've changed the coffeelint.json in my user folder to have the following:

    "max_line_length": {
    "name": "max_line_length",
    "level": "ignore"
},

但这无效,仍然显示错误消息。任何人都可以建议出什么问题了?

But this has had no effect, the error message is still shown. Anyone can suggest whats wrong?

推荐答案

解决方案:

要配置一旦安装了coffeescript,C:\Users\ [用户名] \.vscode\extensions文件夹中将存在默认的coffeelint.json。这完全是没用的,更改此处的配置没有任何效果(就我而言)。

To configure coffeescript once installed there will be a default coffeelint.json in the C:\Users\ [username] \.vscode\extensions folder. This was entirly useless and changing configuration here has no effect (atleast in my case).

要解决此问题,请在项目的根目录中创建一个新的coffeelint.json或在package.json中添加一个coffeelintConfig部分。无论哪种方式,配置都是完全相同的。如果CoffeeLint在当前项目中找不到任何配置,它将检查要使用的$ HOME / coffeelint.json。

To solve this problem create a new coffeelint.json in the root of your project or add a coffeelintConfig section to your package.json. Either way, the configuration is exactly the same. If CoffeeLint doesn't find any configuration for the current project, it will check for a $HOME/coffeelint.json to use.

下面是一个示例配置:

Following this an example configuration is below:

package.json

package.json

{
  "name": "your-project",
  "version": "0.0.0",
  "coffeelintConfig": {
    "indentation" : {
        "level" : "error",
        "value" : 4
    },
    "line_endings" : {
        "value" : "unix",
        "level" : "error"
    }
  }
}

coffeelint.json

coffeelint.json

{
  "indentation" : {
    "level" : "error",
    "value" : 4
  },
  "line_endings" : {
    "value" : "unix",
    "level" : "error"
  }
}

现在,您只需编辑此配置即可Lint your CoffeeScript:)

Now you can just edit this config to Lint your CoffeeScript :)

这篇关于CoffeeLint:禁用警告消息:行超出最大允许长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆