Change Request: Move tseslint config to initial custom config
- Dominant language
- JavaScript
- Stars
- 103
- Forks
- 31
- Avg merge
- 1h 34m
- Merged PRs (30d)
- 3
Description
### What problem do you want to solve?
env:
- pnpm v11.15.0
- node v25.9.0
- @eslint/create-config@latest (v2.0.0)
- command run: `pnpm create @eslint/config@latest`
- options selected: `Javascript, to check syntax and fix problems, javascript modules, None of these, Yes, Node, Typescript, Yes`
---
Running the command: `pnpm create @eslint/config` adds the `tseslint.configs.recommended` plugin **after** the initial configuration?
Here's what running `@eslint/config` generate:
```ts
// eslint.config.ts
import js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
import { defineConfig } from "eslint/config";
export default defineConfig([
{ files: ["**/*.{js,mjs,cjs,ts,mts,cts}"], plugins: { js }, extends: ["js/recommended"], languageOptions: { globals: globals.node } },
tseslint.configs.recommended, // added at the end, not as part of the first config's extend key
]);
```
On the other hand, here's the recommended esling.config.mjs from typescript-eslint:
```ts
// eslint.config.mjs
// @ts-check
import js from '@eslint/js';
import { defineConfig } from 'eslint/config';
import tseslint from 'typescript-eslint';
export default defineConfig({
files: ['**/*.{js,ts}'],
extends: [js.configs.recommended, tseslint.configs.recommended], // the plugin is part of the extends array of the config object
});
```
As shown, the `tseslint`config is combined with the initial, custom config.
### What do you think is the correct solution?
I believe the config recommended by `tseslint`’s docs is simpler and easier to work with.
When the `tseslint` config is defined in a second config, it overrides any custom, conflicting rules in the initial config, which is unexpected. Instead, having the `tseslint`‘s in the extend key of the initial, custom config makes custom defined rules work as expected.
### Participation
- [x] I am willing to submit a pull request for this change.
### AI acknowledgment
- [x] I did not use AI to generate this issue report.
- [x] (If the above is not checked) I have reviewed the AI-generated content before submitting.
### Additional comments
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.