Skip to content

Docs: (Mismatch Config) #19283

Open
Open
@devnchill

Description

Docs page(s)

https://eslint.org/docs/latest/use/getting-started

What documentation issue do you want to solve?

Was following steps for getting started with eslint . Followed all the steps in order , yet recieved a different default config than the one mentioned in the doc.

Doc says the default eslint.config.mjs would look like this

// eslint.config.js
export default [
    {
        rules: {
            "no-unused-vars": "error",
            "no-undef": "error"
        }
    }
];

however i got this

import globals from "globals";
import pluginJs from "@eslint/js";

/** @type {import('eslint').Linter.Config[]} */
export default [
  { languageOptions: { globals: globals.browser } },
  pluginJs.configs.recommended,
];

I already had a package.json file present as i did npm init -y earlier

Attaching ss of my terminal when setting up eslint . Image

What do you think is the correct solution?

I'd like ESLint docs to very which one's correct and make changes based on that

Participation

  • I am willing to submit a pull request for this change.

Additional comments

Using ESlint for the first time . So feel free to correct me , if I somehow did the steps not in a proper way.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    documentationRelates to ESLint's documentation

    Type

    No type

    Projects

    • Status

      Needs Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions