Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linter: Failed to parse config next/core-web-vitals #9825

Open
j2ghz opened this issue Mar 17, 2025 · 3 comments
Open

linter: Failed to parse config next/core-web-vitals #9825

j2ghz opened this issue Mar 17, 2025 · 3 comments
Labels
A-linter Area - Linter

Comments

@j2ghz
Copy link

j2ghz commented Mar 17, 2025

What version of Oxlint are you using?

Breaks on 0.15.14 & 0.16.0, works on 0.15.13

What command did you run?

oxlint --nextjs-plugin --promise-plugin --import-plugin --config=./.eslintrc.json

What does your .oxlintrc.json config file look like?

Not using .oxlintrc.json

What happened?

The ESLint config looks like this:

{
  "root": true,
  "extends": [
    "next/core-web-vitals",
    "eslint:recommended",
    "plugin:@typescript-eslint/eslint-recommended",
    "plugin:@typescript-eslint/recommended-type-checked",
    "plugin:@typescript-eslint/stylistic-type-checked",
    "plugin:@typescript-eslint/strict-type-checked",
    "prettier",
    "plugin:unicorn/recommended"
  ],
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "projectService": true
  },
  "plugins": ["@typescript-eslint", "unicorn", "eslint-plugin-react-compiler"],
  "reportUnusedDisableDirectives": true,
  "rules": {

It seems that from 0.15.14 onwards oxlint has a problem with handling the extends statements, and fails with:


Failed to parse configuration file.

  × invalid config file <repo>/next/core-web-vitals: Failed to parse config "<repo>/next/core-web-vitals" with error Os { code: 2, kind: NotFound, message: "No such file or directory" }

 ELIFECYCLE  Command failed with exit code 1.
@j2ghz j2ghz added the A-linter Area - Linter label Mar 17, 2025
@Boshen
Copy link
Member

Boshen commented Mar 17, 2025

@camchenry config used to be eslint v8 compatible, should we break that rule or should we do something with extends?

@camchenry
Copy link
Member

@Boshen I don't think we want to support plugin presets currently like plugin:name/config, but maybe we can skip those entries if they don't end with .json, so it'll at least be able to build the config file correctly.

@Boshen
Copy link
Member

Boshen commented Mar 19, 2025

Another option is to not extends if the file starts with eslint 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter
Projects
None yet
Development

No branches or pull requests

3 participants