diff --git a/packages/eslint-plugin/src/configs/eslint-recommended.ts b/packages/eslint-plugin/src/configs/eslint-recommended.ts index 283cd46aa2f2..39e8379b56b0 100644 --- a/packages/eslint-plugin/src/configs/eslint-recommended.ts +++ b/packages/eslint-plugin/src/configs/eslint-recommended.ts @@ -1,19 +1,12 @@ /** - * The goal of this ruleset is to update the eslint:recommended config to better - * suit Typescript. There are two main reasons to change the configuration: - * 1. The Typescript compiler natively checks some things that therefore don't - * need extra rules anymore. - * 2. Typescript allows for more modern Javascript code that can thus be - * enabled. + * This is a compatibility ruleset that disables rules from eslint:recommended + * which are already handled by TypeScript. */ export default { overrides: [ { files: ['*.ts', '*.tsx'], rules: { - /** - * 1. Disable things that are checked by Typescript - */ //Checked by Typescript - ts(2378) 'getter-return': 'off', // Checked by Typescript - ts(2300) @@ -36,15 +29,6 @@ export default { 'no-dupe-class-members': 'off', // This is already checked by Typescript. 'no-redeclare': 'off', - /** - * 2. Enable more ideomatic code - */ - // Typescript allows const and let instead of var. - 'no-var': 'error', - 'prefer-const': 'error', - // The spread operator/rest parameters should be prefered in Typescript. - 'prefer-rest-params': 'error', - 'prefer-spread': 'error', }, }, ], diff --git a/packages/eslint-plugin/src/configs/recommended.json b/packages/eslint-plugin/src/configs/recommended.json index d26fd25d01c1..35bf8d0de0d3 100644 --- a/packages/eslint-plugin/src/configs/recommended.json +++ b/packages/eslint-plugin/src/configs/recommended.json @@ -1,6 +1,10 @@ { "extends": "./configs/base.json", "rules": { + "no-var": "error", + "prefer-const": "error", + "prefer-rest-params": "error", + "prefer-spread": "error", "@typescript-eslint/adjacent-overload-signatures": "error", "@typescript-eslint/array-type": "error", "@typescript-eslint/ban-types": "error", pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy