Sublimetext3 ESlint+;升华链接器不使用升华文本3
我跟着导游走了,运气不好, 也请继续阅读类似的问题和运气 我可以在终端上运行eslint,将其用于测试文件并显示错误(在终端上)。然而,我就是不能让它在ST3上工作,似乎我的ST3没有使用eslint。它的边沟上没有红/黄点,当我使用“lint this page”时,它没有显示错误(我故意放了一些错误) 这是我的升华仪设置的设置Sublimetext3 ESlint+;升华链接器不使用升华文本3,sublimetext3,sublimelinter,eslint,Sublimetext3,Sublimelinter,Eslint,我跟着导游走了,运气不好, 也请继续阅读类似的问题和运气 我可以在终端上运行eslint,将其用于测试文件并显示错误(在终端上)。然而,我就是不能让它在ST3上工作,似乎我的ST3没有使用eslint。它的边沟上没有红/黄点,当我使用“lint this page”时,它没有显示错误(我故意放了一些错误) 这是我的升华仪设置的设置 { "user": { "debug": false, "delay": 0.25, "error_color": "D02000",
{
"user": {
"debug": false,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "background",
"linters": {
"eslint": {
"@disable": false,
"args": [],
"excludes": []
}
},
"mark_style": "outline",
"no_column_highlights_line": false,
"passive_warnings": false,
"paths": {
"linux": [],
"osx": [],
"windows": []
},
"python_paths": {
"linux": [],
"osx": [],
"windows": []
},
"rc_search_limit": 3,
"shell_timeout": 10,
"show_errors_on_save": false,
"show_marks_in_minimap": true,
"syntax_map": {
"html (django)": "html",
"html (rails)": "html",
"html 5": "html",
"javascript (babel)": "javascript",
"php": "html",
"python django": "python"
},
"warning_color": "DDB700",
"wrap_find": true
}
}
我在全球安装了eslint(1.7.3),在本地安装了babel eslint。我的项目中存在eslintrc
这是我的
{
"rules": {
"indent": [
2,
"tab"
],
"quotes": [
2,
"single"
],
"linebreak-style": [
2,
"unix"
],
"semi": [
2,
"always"
]
},
"env": {
"es6": true,
"browser": true
},
"extends": "eslint:recommended",
"ecmaFeatures": {
"jsx": true,
"experimentalObjectRestSpread": true
},
"plugins": [
"react"
],
"parser": "babel-eslint"
}
我确实安装了Sublimiter contrib eslint软件包
编辑:
以下是我的控制台输出:
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 304, in on_activated
callback.on_activated(v)
File "/Users/Jim/Library/Application Support/Sublime Text 3/Packages/SublimeLinter/sublimelinter.py", line 279, in on_activated
self.check_syntax(view)
File "/Users/Jim/Library/Application Support/Sublime Text 3/Packages/SublimeLinter/sublimelinter.py", line 206, in check_syntax
Linter.assign(view, reset=True)
File "/Users/Jim/Library/Application Support/Sublime Text 3/Packages/SublimeLinter/lint/linter.py", line 745, in assign
linter = linter_class(view, syntax)
File "/Users/Jim/Library/Application Support/Sublime Text 3/Packages/SublimeLinter/lint/node_linter.py", line 56, in __init__
self.read_manifest(path.getmtime(self.manifest_path))
File "/Users/Jim/Library/Application Support/Sublime Text 3/Packages/SublimeLinter/lint/node_linter.py", line 227, in read_manifest
self.cached_manifest = json.load(codecs.open(self.manifest_path, 'r', 'utf-8'))
File "./json/__init__.py", line 274, in load
File "./json/__init__.py", line 319, in loads
File "./json/decoder.py", line 352, in decode
File "./json/decoder.py", line 368, in raw_decode
File "./json/scanner.py", line 38, in _scan_once
File "./json/decoder.py", line 198, in JSONObject
File "./json/scanner.py", line 38, in _scan_once
File "./json/decoder.py", line 220, in JSONObject
ValueError: Expecting property name enclosed in double quotes: line 11 column 9 (char 284)
我做了一次搜索,似乎它可能导致package.json设置,所以这里是我的package.json,我认为这没有问题:
{
"name": "my-project",
"version": "1.0.0",
"private": "true",
"dependencies": {},
"devDependencies": {
"babel-eslint": "^4.1.3",
"eslint": "^1.7.3",
"eslint-plugin-react": "^3.6.3",
"gulp": "~3.8.8",
"gulp-sass": "~2.0.1",
"gulp-webserver": "~0.9.1"
}
}
感谢您的建议/帮助SublimeLineter有一个“调试模式”,您可以打开它。(工具->升华林特->调试模式)。启用后,打开Mac上的ST控制台(control~),然后打开一个测试文件,看看会显示什么。您应该会看到诸如
sublimeLineter:eslint:blah-blah-blah之类的文本
。希望这能给你更多的信息,因为只要看一下你的配置,我就不会觉得有什么不对了。不过,感谢你的建议,我不知道哪里出了问题/如何解决,因为我只知道项目特定的错误,这意味着它在其他项目上工作,但在某些项目上没有。我想知道这是否与package.json或其他特定于项目的文件有关?有什么建议吗?确保检查.eslintrc
和.eslintignore
文件。当您在项目中打开文件时,调试器会说什么?谢谢,Rob,错误仍然与我在原始问题(编辑部分)中发布的错误相同,并且我没有任何.eslintignore
文件