Skip to content

Use artifact generation options in plugin-eslint #1068

Closed

Description

@BioPhoton

To leverage parallelisation and caching of external tools like Nx we have to adjust the eslint plugin.

Preparations:

  • Pass persist options to runnerConfig.args and the runnerFunction to be able to know the Persist.outputDir in the runner. This enables to write files under ${persist.outputDir}/${PLUGIN_SLUG}/xy.z, similar as the cache.write option
  • Make runner create eslint-report.<count>.json
    • Use --output-path to create .json file (loosing terminal output so we also write before sending)
  • Add artifice artefact generation logic
    • Accept globs for artificePaths
  • Remove additional bin execution and switch to runnerFunction

Implementation:

  • Update docs
  • add e2e tests
  • Add artifact options to plugin-eslint
  • lint target in projects and nx.json should use formatter
  • Use Nx run-many to generate eslint-report artifacts
    • directly consume artifacts: artifactsPaths: ['packages/**/.eslint/eslint-report.json']

Optional:

  • Add Custom reporter package
    • Add Custom reporter to code
    • lint-formatter target in projects and nx.json
    • Use custom reporter in plugint-eslint CP config artifact command
  • move custom formatter into separate project @code-pushup/eslint-formatter-multi (moved to separate issue)

PoC: #1069

Related:

Activity

  1. added
    🌊 Nx
    🔥 performance
    on Aug 16, 2025
  2. changed the title [-]Use artifact generation options in eslint plugin[/-] [+]Use artifact generation options in `plugin-eslint`[/+] on Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🌊 Nx🔥 performance🛍️ epic🧩 eslint-plugin

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions