Skip to content

Bug: 6.0.0 - cannot use parser with absolute path anymore #7226

@kkmuffme

Description

@kkmuffme

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Relevant Package

parser

Playground Link

No response

Repro Code

eslint --resolve-plugins-relative-to /my/path/to/ --no-eslintrc --config /config/path/to/eslint-config.json example.js

ESLint Config

{
    "plugins": [
        "@typescript-eslint"
    ],
    "parser": "/my/path/to/@typescript-eslint/parser",
    "parserOptions": {
        "ecmaVersion": 13,
        "sourceType": "script",
        "ecmaFeatures": {
            "globalReturn": false,
            "jsx": false
        },
        "project": [
            "/config/path/to/tsconfig.tmp.json"
        ]
    },
    "extends": [
        "plugin:@typescript-eslint/recommended-type-checked"
    ]
}

tsconfig

No response

Expected Result

Should work

Actual Result

Error: Failed to load parser '/my/path/to/@typescript-eslint/parser' declared in '--config': Cannot find module '/my/path/to/@typescript-eslint/parser'

Additional Info

With 5.62.0 (and before) it works perfectly fine.
However with 6.0.0 it fails.

The package @typescript-eslint/parser is there, is accessible (correct permissions) and also shows perfectly fine when checking with npm list.

I spent hours today thinking it was a bug in eslint, but it turns out it's not, and I am stuck at a dead-end.

I'd really appreciate if you could fix this!

Versions

package version
@typescript-eslint/eslint-plugin 6.0.0
@typescript-eslint/parser 6.0.0
TypeScript 5.1.4
ESLint 8.45.0
node 16.19.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfix: user errorissue was fixed by correcting the configuration / correcting the codeworking as intendedIssues that are closed as they are working as intended

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy