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

Support ESLint flat config #867

Open
alexeyr-ci opened this issue Dec 14, 2023 · 0 comments
Open

Support ESLint flat config #867

alexeyr-ci opened this issue Dec 14, 2023 · 0 comments
Labels

Comments

@alexeyr-ci
Copy link
Contributor

alexeyr-ci commented Dec 14, 2023

Bug Description

ESLint special parser doesn't recognize eslint.config.js as an ESLint flat config file. Mostly it imports and uses packages like any other JS file, but compatibility features still may have dependencies in string literals similar to the old config.

Code snippets

Where the dependency is used:

// in eslint.config.js
const compat = new FlatCompat({
  baseDirectory: __dirname,
  recommendedConfig: js.configs.recommended,
});

const airbnb = compat.extends('airbnb');

Where the dependency is listed in package.json:

// devDependencies
"eslint-config-airbnb": "^19.0.4",

This also applies to import resolvers etc. See https://github.com/eslint/eslintrc?tab=readme-ov-file#usage-esm for details on FlatCompat.

Versions

  • node -v: v18.17.0
  • npm -v: 9.6.7
  • depcheck --version: 1.4.7

Extra info

Sorry for filing quite a few bugs! But I hope this will be the last one for now.

BONUS POINTS: If you wish to help us debug further, the depcheck --json option will show more information. Check here in the README for documentation on json output.

@alexeyr-ci alexeyr-ci added the bug label Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant