Skip to content

Executable eslint not found #3261

Description

@glenveegee

search you tried in the issue tracker

is:issue is:open "not found" in:title executable in:title

describe your issue

After clearing my local pre-commit cache with pre-commit clean and then checking my code with pre-commit run --all-files...

The eslint dependency as well as the additional eslint dependencies are pulled down from mirrors-eslint

[INFO] Initializing environment for https://github.com/pre-commit/mirrors-eslint.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-eslint:@typescript-eslint/[email protected],@typescript-eslint/[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected].
...
[INFO] Installing environment for https://github.com/pre-commit/mirrors-eslint.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...

and the eslint hook runs but fails with Executable 'eslint' not found as follows:

eslint...................................................................Failed
- hook id: eslint
- exit code: 1

Executable `eslint` not found

This change has happened in the last 3 weeks. It is now failing for completely unchanged code that has been re-run since 21 June 2024 at 17:51:49 BST which is when it last worked without any errors.

pre-commit --version

pre-commit 3.6.2

.pre-commit-config.yaml

default_language_version:
  python: python3

repos:
  - repo: https://github.com/pre-commit/mirrors-eslint
    rev: v8.54.0
    hooks:
      - id: eslint
        additional_dependencies:
          - '@typescript-eslint/[email protected]'
          - '@typescript-eslint/[email protected]'
          - [email protected]
          - [email protected]
          - [email protected]
          - [email protected]
          - [email protected]
          - [email protected]
          - [email protected]
          - [email protected]
          - [email protected] # 1.4.1 breaks eslint, so we have to explicitly pin this version
        files: '^my_frontend\/(.*)\.[jt]sx?$'
        types: [file]
        args: ['--parser-options',  '{ tsconfigRootDir: "my_frontend" }', '--fix']

~/.cache/pre-commit/pre-commit.log (if present)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions