A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/typescript-eslint/typescript-eslint/issues/6778 below:

flat configuration block options are not independent · Issue #6778 · typescript-eslint/typescript-eslint · GitHub

Before You File a Bug Report Please Confirm You Have Done The Following... Issue Description

First and foremost, this bug relates to the new ESLint flat configuration. I understand that this feature is still in beta and is now in Phase 3 which is to ensure compability with existing plugins. I suspect the error is with the TypeScript parser and not with ESLint.

Expected Behaviour

I should be able to configure options for the TypeScript parser independently when it is used within the TypeScript section of the config, and the Svelte section of the configuration.

Actual Behaviour

The setting of languageOptions in the block of the ESLint config targetting **/*.ts files has side-effects, impacting the use of the TypeScript parser in the Svelte section targettin **/*.svelte files.

In the example repo (below), the ESLint config contains the following segment:

https://github.com/JP-Ellis/eslint-plugin-svelte-mwe/blob/f09107de3dcb59704a4e6d416b26eaa720f25c10/eslint.config.js#L20-L36

I note the following behaviours:

My expectation is that the settings passed in the TypeScript config block should be independent of the settings passed in the Svelte block.

Reproduction Repository Link

https://github.com/JP-Ellis/eslint-plugin-svelte-mwe

Repro Steps
  1. clone the repo
  2. pnpm install
  3. pnpm lint (this should work fine)
  4. Uncomment the TypeScript configuration in eslint.config.js
  5. pnpm lint (this should produce errors)
  6. Add extraFileExtensions: [".svelte"] to the languageOptions in the TypeScript block.
  7. pnpm lint (this should have fixed the previous issue)
Versions package version @typescript-eslint/eslint-plugin 5.56.0 @typescript-eslint/parser 5.56.0 TypeScript 5.0.2 ESLint 8.36.0 node 19.8.1

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4