Skip to content

Docs: Remove legacy notes about CJS config file extensions and __dirname #11314

Open
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Before You File a Documentation Request Please Confirm You Have Done The Following...

Suggested Changes

Some of the configs docs pages include notes about .mjs vs. .js and/or import.meta.dirname vs. __dirname in CJS vs. ESM config files. For example:

<details>
<summary>Aside on file extensions</summary>
The `.mjs` extension makes the file use the [ES modules (ESM)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) format. Node interprets `.js` files in the [CommonJS (CJS)](https://nodejs.org/api/modules.html) format by default, but if you have `"type": "module"` in your `package.json`, you can also use `eslint.config.js`.
</details>

Now that Node.js 18.x is EOL and >=20.19.0 supports require(ESM), I think this is no longer a common or pressing concern for most users. I don't think it justifies taking up space & user-reading-budget in the docs.

Affected URL(s)

https://typescript-eslint.io/getting-started/#step-2-configuration
https://typescript-eslint.io/getting-started/legacy-eslint-setup#step-2-configuration
https://typescript-eslint.io/getting-started/typed-linting

Additional Info

IMO this goes well alongside #11313. That issue might result in more vertical space added to docs. One step forward, one step back (when it comes to docs simplicity).

💖

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuedocumentationDocumentation ("docs") that needs adding/updating

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions