【发布时间】:2021-02-02 04:23:02
【问题描述】:
我在 Ubuntu 20.04 上使用 VSCode 在 JS(Node.js) 中编写代码。 我配置了我的 ESlint settings.json
{
"todo-tree.tree.showScanModeButton": false,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": ["javascript"]
}
还有.eslinterc.js
module.exports = {
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"react"
],
"rules" : {
"no-console": "off",
"quotes": [
"error",
"double"
]
}
};
我的第一部分代码是在保存时格式化的
passport.use("register", new LocalStrategy(
{
usernameField: "username",
passwordField: "password",
passReqToCallback: true,
session: false,
},
午休后,我加了新台词
passport.use(
'login',
new LocalStrategy(
{
usernameField: 'username',
passwordField: 'password',
session: false,
},
但什么也没发生。
问题
表示服务器正在运行
[Info - 1:24:15 PM] ESLint server is starting
[Info - 1:24:15 PM] ESLint server running in node v12.14.1
[Info - 1:24:15 PM] ESLint server is running.
[Info - 1:24:16 PM] ESLint library loaded from: /home/milenko/myblog/backend/node_modules/eslint/lib/api.js
如何控制我的 ESLinter?
【问题讨论】:
标签: javascript visual-studio-code eslint eslintrc