From 7561e71b1a45b36d5b769134ac9bdd05c871f057 Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Sat, 11 May 2024 13:58:30 +0300 Subject: [PATCH] fix(linter): rename languageSettings to languageOptions for flat config migration (#22924) --- .../src/generators/convert-to-flat-config/generator.spec.ts | 2 +- packages/eslint/src/generators/utils/flat-config/ast-utils.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/eslint/src/generators/convert-to-flat-config/generator.spec.ts b/packages/eslint/src/generators/convert-to-flat-config/generator.spec.ts index 9278592ef3e8c..dd65e688dea30 100644 --- a/packages/eslint/src/generators/convert-to-flat-config/generator.spec.ts +++ b/packages/eslint/src/generators/convert-to-flat-config/generator.spec.ts @@ -555,7 +555,7 @@ describe('convert-to-flat-config generator', () => { { files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'], rules: {}, - languageSettings: { + languageOptions: { parserOptions: { project: ['apps/dx-assets-ui/tsconfig.*?.json'] }, }, }, diff --git a/packages/eslint/src/generators/utils/flat-config/ast-utils.ts b/packages/eslint/src/generators/utils/flat-config/ast-utils.ts index bc51f42618a4d..53b6cc8ca5a03 100644 --- a/packages/eslint/src/generators/utils/flat-config/ast-utils.ts +++ b/packages/eslint/src/generators/utils/flat-config/ast-utils.ts @@ -768,7 +768,7 @@ export function generateFlatOverride( ) { if (override.parserOptions) { const { parserOptions, ...rest } = override; - return generateAst({ ...rest, languageSettings: { parserOptions } }); + return generateAst({ ...rest, languageOptions: { parserOptions } }); } return generateAst(override); } @@ -800,7 +800,7 @@ export function generateFlatOverride( ); if (parserOptions) { - addTSObjectProperty(objectLiteralElements, 'languageSettings', { + addTSObjectProperty(objectLiteralElements, 'languageOptions', { parserOptions, }); }