[Help]The 'Test Regex' button in scaffold always return 'false'.

[Environment]
zotero verison: 6.0.18
scaffold version: installed with zotero installer
Brower: Microsoft Edge(version nubmer: 107.0.1418.42)
zotero connector verison: 5.0.100

[What did I do]
1.Open scaffold from "Tools → Developer → Translator Editor" in Zotero.
2.Set a directory with tranlators
3.Install Node.js,
4.then install Eslint,
5.use command "npx eslint .\app.js" to test whether the eslint can work, It show three error in the test file 'app.js'. So, I think should be OK.
6.In scaffold, open a web tranlator, such as 'CiteSeer.js'.
7.Here is the 1st problem, even I test eslint work OK in step5. It's still pop a warning window with the message:
"""
Zotero uses ESLint to enable code suggestions and error checking, but it wasn't found in the selected translators directory.
You can install it from the command line:
"""
8.I select "Cancel" button, because I do't need scaffold check syntactic error.
9.Open "https://citeseerx.ist.psu.edu/" in EDGE brower.
10. Click "Test Regex" button in scaffold, It returns:
"""
01:34:07 ===>false<=== (boolean)
"""

[Question]
Can anybody figure out what is wrong in the upper process?
Or which place is better to ask this question?

Any help would be appreciatted, Thank you guys.
  • If there is any information which I missed, please tell me.
  • edited November 16, 2022
    The regex check is against the browser built into Scaffold/the translator editor: it has no idea what you have open in which browser. (That's also the instance against which you test other functions).
    Can't help with ESLint (though it works for me ootb), that's probably a better question for zotero-dev https://groups.google.com/g/zotero-dev/
  • @adamsmith
    Thank you very much. You answer remind me to use the "browser" tab in scaffold. I was misled by the document in "https://www.zotero.org/support/dev/translators/scaffold", which says
    """
    When the “Test Regex” button in the “Metadata” tab is clicked, the regular expression in the target field is applied to the site loaded in the most recently selected Firefox tab.
    """
  • (I've updated the documentation, which was still talking about Zotero for Firefox from many years ago.)
Sign In or Register to comment.