X Tutup
Skip to content

npm run lint fails inside Docker container due to missing ESLint configuration #3987

@Jatin24062005

Description

@Jatin24062005

p5.js version

No response

What is your operating system?

None

Web browser and version

No response

Actual Behavior

While testing the Docker container for the p5.js Web Editor, running:

npm run lint

fails with:

ESLint couldn't find a configuration file.

However the same command works correctly when run locally.

Inside the container ESLint searches in:

/usr/src/app/client/mocks

but does not detect the project's ESLint configuration.

This suggests the ESLint configuration files (.eslintrc.js / .eslintignore) may not be copied
ESLint cannot locate configuration file.

Image

Expected Behavior

Lint runs successfully.

Steps to reproduce

Steps:

  1. Build the Docker image
  2. Run the container
  3. Run npm run lint

###Possible Cause
It appears that the ESLint configuration files (such as .eslintrc.js or other related config files) may not be copied into the Docker container during the build process

###Proposed Solution
Ensure that ESLint configuration files are included when building the Docker image. For example, the Dockerfile could copy the full project directory so that configuration files are available inside the container:

COPY . .

Alternatively, explicitly include the ESLint config files during the build process.

If this approach looks correct, I would be happy to submit a PR to fix the Docker configuration so that npm run lint works inside the container as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting Maintainer ApprovalNeeds review from a maintainer before moving forwardBugError or unexpected behaviors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup