Syd*_*den 4 eslint eslint-config-airbnb language-server-protocol eslintrc sublimetext4
当使用 Sublime text 3 时,我有SublimeLinter和SublimeLinter-eslint包,以及用于 JS 和 JSX 语法的eslint和babel-eslint全局节点模块。
切换到 Sublime 4 后,我决定尝试一下LSP。我安装了它,还安装了LSP-css(开箱即用)和LSP-eslint,但无法工作。
如果我检查 Sublime 的状态栏,我会看到语言服务器显然正在运行(?)

这是在一个具有自己的eslintrc.js配置文件的项目中,该文件在 VScode 中开箱即用。部分内容如下:
const RulesAirBnb = require("eslint-config-airbnb-base/rules/best-practices");
const RulesCRA = require("eslint-config-react-app");
module.exports = {
root: true,
parser: "babel-eslint",
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
ecmaFeatures: {
jsx: true,
generators: true,
},
},
extends: [
"airbnb", // Baseguide is AirBnB"s
"prettier",
"prettier/react",
],
Run Code Online (Sandbox Code Playgroud)
检查了以下SO问题但没有运气。
安装LSP-typescript就成功了,开箱即用,甚至不需要 lsp-eslint。虚幻。
经过几天的研究后在这里找到了信息(感谢 chrsap!)。
如果您正在运行 ST3,请检查LSP-typescript 的自述文件以获取所需的包。
| 归档时间: |
|
| 查看次数: |
2525 次 |
| 最近记录: |