如何修复括号上的 linting?

How do i fix the linting on brackets?

开始使用方括号作为文本编辑器来编写 javascript 代码,请注意我是初学者,当我编写 unexpected console statement 之类的代码时会遇到奇怪的错误如果我声明一个名为 name 的变量,请使用 console.log()name is not defined。如何禁用该功能或​​编辑其代码以修复这些消息。

编辑:

我写了什么:

var name = "john";
var age = 26;
console.log(age)
var job,ismarried;
ismarried = true;

尽管年龄通常显示在 chrome 中,但我的行附近出现了 xs 标志,所以问题不在于非常简单的代码,而在于文本编辑器,我不知道如何修复它。

我导师的回答:

这些错误可能与 JSLint and/or ESLint 有关。这些是在 Brackets 中用于扫描代码的工具 bugs.You 也可以禁用 JSLint。为此:转到 Brackets > File > Extension Manager > Default > Disable ESLint and JSLint.

括号中的错误如 "unexpected console statement [no-console]"

单击工具栏中的 "Debug"。 在下拉菜单中,单击 "Open Preferences File"。

并在 brackets.json 文件中添加以下行

"language": {
      "javascript": {
          "linting.prefer": ["JSHint"],
          "linting.usePreferredOnly": true
      }
  }

link 同样: https://the-sourceterous.ghost.io/brackets-editor-disable-jslint-and-use-jshint-instead-2/