bmish / eslint-doc-generator

Automatic documentation generator for ESLint plugins and rules.
91 stars 5 forks source link

Documentation for Shared Configuration #434

Open ProfessorManhattan opened 1 year ago

ProfessorManhattan commented 1 year ago

Hey, I would like to use this CLI to generate documentation for a shared configuration that I am using with NPM. However, when I run the CLI, I get the following:

❯ eslint-doc-generator
Unable to determine plugin entry point.

The configuration works with ESLint and other ESLint tools. I have the ESLint configuration stored in my package.json like this:

"eslintConfig": {
    "extends": "eslint-config-strict-mode",
    "rules": {
      "import/no-extraneous-dependencies": "warn"
    }
  },

When I edit the shared configuration and try to point eslint-doc-generator directly to the .js entrypoint for the shared configuration, I get the following:

❯ eslint-doc-generator dist/main.js
Could not find package.json of ESLint plugin.

Any idea on how I can use this plugin to generate sweet documentation for my shared config?

ljharb commented 1 year ago

eslintConfig is only for your own project. Does your package.json have a main field?