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 9 Flat Config Format #65

Open
gtbuchanan opened this issue Apr 17, 2024 · 1 comment
Open

Support ESLint 9 Flat Config Format #65

gtbuchanan opened this issue Apr 17, 2024 · 1 comment

Comments

@gtbuchanan
Copy link

gtbuchanan commented Apr 17, 2024

Here's what I did

Upgrade to ESLint 9 and import eslint-config-semistandard

import globals from 'globals';
import semistandard from 'eslint-config-semistandard';

export default [
  semistandard,
  {
    ignores: ["dist/**"],
    languageOptions: {
      globals: {
        ...globals.browser,
        ...globals.es2021,
        ...globals.node
      }
    }
  }
];

What I expected to happen

I should be able to import semistandard in eslint.config.js and use it as a default ruleset (see eslint-config-standard usage).

standard/eslint-config-standard@3d1284c

What seems to have happened

ESLint reports the following error:

Oops! Something went wrong! :(

ESLint: 9.0.0

A config object is using the "extends" key, which is not supported in flat config system.

Instead of "extends", you can include config objects that you'd like to extend from directly in the flat config array.

Please see the following page for more information:
https://eslint.org/docs/latest/use/configure/migration-guide#predefined-and-shareable-configs
@gtbuchanan
Copy link
Author

Looks like eslint-config-standard doesn't work either even though they added support for the flat config format. There were breaking changes to the format in ESLint 9.

standard/eslint-config-standard#410

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant