From 65942c23fdd661260fd2423151a1e711285db542 Mon Sep 17 00:00:00 2001 From: Abhijeet Singh Date: Wed, 18 Jun 2025 13:00:10 +0530 Subject: [PATCH] docs: remove legacy notes about CJS extensions and __dirname --- docs/getting-started/Legacy_ESLint_Setup.mdx | 4 ---- docs/getting-started/Quickstart.mdx | 7 ------- docs/getting-started/Typed_Linting.mdx | 5 ----- 3 files changed, 16 deletions(-) diff --git a/docs/getting-started/Legacy_ESLint_Setup.mdx b/docs/getting-started/Legacy_ESLint_Setup.mdx index e1fba92b698b..e99c35f02b8f 100644 --- a/docs/getting-started/Legacy_ESLint_Setup.mdx +++ b/docs/getting-started/Legacy_ESLint_Setup.mdx @@ -37,10 +37,6 @@ module.exports = { }; ``` -:::info -If your project doesn't use ESM, naming the file as `.eslintrc.js` is fine. See [ESLint's Configuration Files docs](https://eslint.org/docs/user-guide/configuring/configuration-files) for more info. -::: - ### Step 3: Running ESLint Open a terminal to the root of your project and run the following command: diff --git a/docs/getting-started/Quickstart.mdx b/docs/getting-started/Quickstart.mdx index 79e65c2b9915..a31ffdd7bc7b 100644 --- a/docs/getting-started/Quickstart.mdx +++ b/docs/getting-started/Quickstart.mdx @@ -45,13 +45,6 @@ export default tseslint.config( This code will enable our [recommended configuration](../users/Shared_Configurations.mdx) for linting. -
-Aside on file extensions - -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 - `tseslint.config(...)` is an **_optional_** helper function — see [`typescript-eslint`'s `config(...)`](../packages/TypeScript_ESLint.mdx#config). diff --git a/docs/getting-started/Typed_Linting.mdx b/docs/getting-started/Typed_Linting.mdx index 56d02afed969..95f225038dd3 100644 --- a/docs/getting-started/Typed_Linting.mdx +++ b/docs/getting-started/Typed_Linting.mdx @@ -40,11 +40,6 @@ export default tseslint.config( ); ``` -:::note -[`import.meta.dirname`](https://nodejs.org/api/esm.html#importmetadirname) is only present for ESM files in Node.js >=20.11.0 / >= 21.2.0.
-For CommonJS modules and/or older versions of Node.js, [use `__dirname` or an alternative](https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules). -::: - In more detail: - `tseslint.configs.recommendedTypeChecked` is a [shared configuration](../users/Shared_Configurations.mdx). It contains recommended rules that additionally require type information.