Linting out-of-the-box not working, am I missing something?

I'm starting to develop a plugin for Kibana and I'm having trouble with the linter. I post this here because the error is so obvious that chances are it's not a bug, but a misconfiguration on my part. Well, I will describe my problem.

Basically I just generated a plugin skeleton with the generate_plugin.js script, and, out of the box, eslint throws an error saying that ESLint configuration is invalid. And of course from there it just doesn't work. I've tried Atom editor and VSCode and it happens with both.

In the contributing guide it just says that I have to install linter-eslint in Atom or ESLint in VSCode. I've also installed EditorConfig just in case, but it doesn't have any effect.

So, is there any step I'm missing?

EDIT: I almost forgot, this may be important. I'm working on Windows, but I was unable to even successfuly run yarn kbn bootstrap (missing dependencies, permissions problems, and all kinds of strange stuff). So, as a workaround, I just created a linux container where I compile, generate code, etc... and after that I've copied the files to windows to actually code. I don't know if that can have an effect.

Good morning! I'm going to reach out to some folks who know more about plugins, but out of the gate, I'm curious if VSCode has any ESLint information in its log? If you're not familiar, you can access it from the actions panel under ESLint: Show Output Channel, or by selecting ESLint from the dropdown in the Output tab:


Sorry for the delay. This is the output of ESLint. Is the same in Atom.

[Info  - 11:33:57] ESLint server stopped.
[Info  - 11:34:00] ESLint server running in node v10.2.0
[Info  - 11:34:00] ESLint server is running.
[Info  - 11:34:07] ESLint library loaded from: <path_to_plugin_folder>\node_modules\eslint\lib\api.js
[Error - 11:34:08] ESLint stack trace:
[Error - 11:34:08] Error: ESLint configuration in @elastic/kibana is invalid:
	- Unexpected top-level property "0".

Referenced from: <path_to_plugin_folder>\.eslintrc
    at validateConfigSchema (<path_to_plugin_folder>\node_modules\eslint\lib\config\config-validator.js:235:15)
    at Object.validate (<path_to_plugin_folder>\node_modules\eslint\lib\config\config-validator.js:261:5)
    at loadFromDisk (<path_to_plugin_folder>\node_modules\eslint\lib\config\config-file.js:544:19)
    at load (<path_to_plugin_folder>\node_modules\eslint\lib\config\config-file.js:587:20)
    at configExtends.reduceRight (<path_to_plugin_folder>\node_modules\eslint\lib\config\config-file.js:453:36)
    at Array.reduceRight (<anonymous>)
    at applyExtends (<path_to_plugin_folder>\node_modules\eslint\lib\config\config-file.js:431:26)
    at loadFromDisk (<path_to_plugin_folder>\node_modules\eslint\lib\config\config-file.js:551:22)
    at Object.load (<path_to_plugin_folder>\node_modules\eslint\lib\config\config-file.js:587:20)
    at Config.getLocalConfigHierarchy (<path_to_plugin_folder>\node_modules\eslint\lib\config.js:240:44)

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.