SublimeLinter-flow incorrectly handles Flow output in 2025. I get the error AttributeError: 'tuple' object has no attribute 'error_type'.
SublimeLinter: #1 linter.py:1238 flow: output:
[{"flowVersion":"0.295.0","jsonVersion":"1","errors":[{"kind":"infer","level":"error","suppressions":[],"extra":[{"message":[{"context":null,"descr":"References:","type":"Blame","path":"","line":0,"endline":0,"start":1,"end":0}]},{"message":[{"context":" return `${goddessName} is a Goddess!`;","descr":"[1]","type":"Blame","loc":{"source":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","type":"SourceFile","start":{"line":5,"column":12,"offset":107},"end":{"line":5,"column":41,"offset":137}},"path":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","line":5,"endline":5,"start":12,"end":41}]},{"message":[{"context":"whoIsAGoddess = function(goddessName/*: number */)/*: boolean */ {","descr":"[2]","type":"Blame","loc":{"source":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","type":"SourceFile","start":{"line":4,"column":55,"offset":83},"end":{"line":4,"column":61,"offset":90}},"path":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","line":4,"endline":4,"start":55,"end":61}]}],"message":[{"context":" return `${goddessName} is a Goddess!`;","descr":"Cannot return template string because string [1] is incompatible with boolean [2]. [incompatible-type]","type":"Blame","loc":{"source":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","type":"SourceFile","start":{"line":5,"column":12,"offset":107},"end":{"line":5,"column":41,"offset":137}},"path":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","line":5,"endline":5,"start":12,"end":41}],"error_codes":["incompatible-type"]},{"kind":"infer","level":"error","suppressions":[],"extra":[{"message":[{"context":null,"descr":"References:","type":"Blame","path":"","line":0,"endline":0,"start":1,"end":0}]},{"message":[{"context":"console.log(whoIsAGoddess(\"Kira\"));","descr":"[1]","type":"Blame","loc":{"source":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","type":"SourceFile","start":{"line":8,"column":27,"offset":169},"end":{"line":8,"column":32,"offset":175}},"path":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","line":8,"endline":8,"start":27,"end":32}]},{"message":[{"context":"whoIsAGoddess = function(goddessName/*: number */)/*: boolean */ {","descr":"[2]","type":"Blame","loc":{"source":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","type":"SourceFile","start":{"line":4,"column":41,"offset":69},"end":{"line":4,"column":46,"offset":75}},"path":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","line":4,"endline":4,"start":41,"end":46}]}],"message":[{"context":"console.log(whoIsAGoddess(\"Kira\"));","descr":"Cannot call `whoIsAGoddess` with `\"Kira\"` bound to `goddessName` because string [1] is incompatible with number [2]. [incompatible-type]","type":"Blame","loc":{"source":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","type":"SourceFile","start":{"line":8,"column":27,"offset":169},"end":{"line":8,"column":32,"offset":175}},"path":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","line":8,"endline":8,"start":27,"end":32}],"error_codes":["incompatible-type"]}],"passed":false},{}]
SublimeLinter: #1 linter.py:1238 flow: output:
[{"flowVersion":"0.295.0","jsonVersion":"1","errors":[{"kind":"infer","level":"error","suppressions":[],"extra":[{"message":[{"context":null,"descr":"References:","type":"Blame","path":"","line":0,"endline":0,"start":1,"end":0}]},{"message":[{"context":" return `${goddessName} is a Goddess!`;","descr":"[1]","type":"Blame","loc":{"source":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","type":"SourceFile","start":{"line":5,"column":12,"offset":107},"end":{"line":5,"column":41,"offset":137}},"path":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","line":5,"endline":5,"start":12,"end":41}]},{"message":[{"context":"whoIsAGoddess = function(goddessName/*: number */)/*: boolean */ {","descr":"[2]","type":"Blame","loc":{"source":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","type":"SourceFile","start":{"line":4,"column":55,"offset":83},"end":{"line":4,"column":61,"offset":90}},"path":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","line":4,"endline":4,"start":55,"end":61}]}],"message":[{"context":" return `${goddessName} is a Goddess!`;","descr":"Cannot return template string because string [1] is incompatible with boolean [2]. [incompatible-type]","type":"Blame","loc":{"source":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","type":"SourceFile","start":{"line":5,"column":12,"offset":107},"end":{"line":5,"column":41,"offset":137}},"path":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","line":5,"endline":5,"start":12,"end":41}],"error_codes":["incompatible-type"]},{"kind":"infer","level":"error","suppressions":[],"extra":[{"message":[{"context":null,"descr":"References:","type":"Blame","path":"","line":0,"endline":0,"start":1,"end":0}]},{"message":[{"context":"console.log(whoIsAGoddess(\"Kira\"));","descr":"[1]","type":"Blame","loc":{"source":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","type":"SourceFile","start":{"line":8,"column":27,"offset":169},"end":{"line":8,"column":32,"offset":175}},"path":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","line":8,"endline":8,"start":27,"end":32}]},{"message":[{"context":"whoIsAGoddess = function(goddessName/*: number */)/*: boolean */ {","descr":"[2]","type":"Blame","loc":{"source":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","type":"SourceFile","start":{"line":4,"column":41,"offset":69},"end":{"line":4,"column":46,"offset":75}},"path":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","line":4,"endline":4,"start":41,"end":46}]}],"message":[{"context":"console.log(whoIsAGoddess(\"Kira\"));","descr":"Cannot call `whoIsAGoddess` with `\"Kira\"` bound to `goddessName` because string [1] is incompatible with number [2]. [incompatible-type]","type":"Blame","loc":{"source":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","type":"SourceFile","start":{"line":8,"column":27,"offset":169},"end":{"line":8,"column":32,"offset":175}},"path":"D:\\SashaDebugging\\KiraFlow\\kira-example.js","line":8,"endline":8,"start":27,"end":32}],"error_codes":["incompatible-type"]}],"passed":false},{}]
Thanks.
1. Summary
SublimeLinter-flow incorrectly handles Flow output in 2025. I get the error
AttributeError: 'tuple' object has no attribute 'error_type'.2. MCVE
2.1. Files
The file
kira-example.jswith intentionally incorrect type annotations:Flow also requires the file
.flowconfigin the same directory askira-example.js. This file may be empty.2.2. Terminal output
2.3. Steps to reproduce
Launch Sublime Text 4 on Windows in the Safe Mode.
Install Package Control.
Ctrl+Shift+P →
Package Control: Upgrade/Overwrite All Packages.Otherwise, I get the error
Package Control: The dependency 'typing_extensions' is not availablewhen I install SublimeLinter through Package Control.Install SublimeLinter and SublimeLinter-flow using Package Control.
Ctrl+Shift+P →
SublimeLinter: Reload SublimeLinter and its Plugins.Otherwise, SublimeLinter plugins don’t work, and I get the message
SublimeLinter upgrade in progress. Aborting lint.in the status bar.Ctrl+Shift+P →
Preferences: SublimeLinter Settings→ replace the content of the user settings file on the right side with this content:{ "debug": true }Select
Filein the Sublime menu →Open file→ open the filekira-example.js.Install AutomaticPackageReloader using Package Control. Ctrl+Shift+P →
Automatic Package Reloader→ add the textSublimeLinter-flowin the opened input field with the labelPackage:→ Enter.Otherwise, SublimeLinter-flow doesn’t lint files. I get this output in the Sublime Text console:
NOTE: SublimeLinter duplicates messages in the debug mode.
When the file
kira-example.jsis opened in the current view, open the Sublime Text Python console.2.4. Sublime console output
I get this output in the Sublime Text console:
3. Environment
Thanks.