Open
Description
opened on Dec 27, 2024
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 .
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.
Metadata
Assignees
Type
Projects
Status
Needs Triage
Activity