8000 Change Request: add back `name` property to recommended configs · Issue #19864 · eslint/eslint · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ 8000
Skip to content
Change Request: add back name property to recommended configs #19864
Open
@kirkwaiblinger

Description

@kirkwaiblinger

ESLint version

9.29.0

What problem do you want to solve?

Right now, if I open up the config inspector, plugins conspicuously identify their shared configs, but eslint's shared config ("eslint:recommended") does not.

For example, this config

import { defineConfig } from 'eslint/config';
import eslintJsPlugin from '@eslint/js';
import unicorn from 'eslint-plugin-unicorn';
import tseslint from 'typescript-eslint';

export default defineConfig(
    eslintJsPlugin.configs.recommended,
    tseslint.configs.recommended,
    unicorn.configs.recommended,
);

shows as the following in the config inspector:

Image

What do you think is the correct solution?

Add name to eslint's own flat configs.

Participation

  • I am willing to submit a pull request for this change.

Additional comments

I have come across #18368. I don't think this is a blocker. Presumably, there are the following possible solutions:

  • Export separate flat and eslintrc configs. This is something plugins generally have to do in order to solve this exact problem, so it doesn't seem like a stretch for eslint core to do so as well. For example,
  • Declare clearly what the supported eslint versions for the @eslint/js package are (right now, none is specified in package.json), modify eslint's parsing to allow a no-op name field in the eslintrc config parsing, and update the @eslint/js's eslint version requirement.

Metadata

Metadata

Labels

coreRelates to ESLint's core APIs and featuresenhancementThis change enhances an existing feature of ESLint

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0