Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Feature: Better use tseslint.config extends and otherwise simplify eslint.config.js #1690

Closed
2 tasks done
JoshuaKGoldberg opened this issue Nov 25, 2024 · 2 comments · Fixed by #1697 or #1699
Closed
2 tasks done
Assignees
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request

Comments

@JoshuaKGoldberg
Copy link
Owner

JoshuaKGoldberg commented Nov 25, 2024

Bug Report Checklist

Overview

Splitting out of #1670: I realized that eslint.config.js file is missing some size-cutting optimizations:

  • It has a nested tseslint.config. The inner one is redundant.
  • Instead of manually configuring perfectionist/sort-objects, it could use the newer settings available as of feat: allow specifying cross-rule settings azat-io/eslint-plugin-perfectionist#206
  • I think the plugins: { vitest } block could use the cleaner vitest.configs.recommended
  • I think n/no-missing-import is no longer necessary now that lint relies on building No, it's just that create-typescript-app itself doesn't have a ts code block in its README.md...
  • I think tseslint.disableTypeChecked on .md/*.ts files is no longer necessary now that lint relies on building No, it's just that create-typescript-app itself doesn't have a ts code block in its README.md...
  • The disable of no-constant-condition can be removed now that it allows while(true) by default in ESLint v9.1.0
  • "@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "all" }], is now redundant too
  • parserOptions.projectService.defaultProject can be omitted now that its default is 'tsconfig.json' as of TSESLint 8.5.0
  • The files: ["*.jsonc"], overrides are no longer necessary now that no .jsonc files exist

See https://github.com/JoshuaKGoldberg/create-typescript-app/blob/48c734da02f14e4e890d955607d9ad2426d2052a/eslint.config.js for the trimmed-down version.

Additional Info

💖

@JoshuaKGoldberg JoshuaKGoldberg added type: feature New enhancement or request status: accepting prs Please, send a pull request to resolve this! labels Nov 25, 2024
@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Nov 25, 2024
@JoshuaKGoldberg JoshuaKGoldberg changed the title 🚀 Feature: Better use tseslint.config extends in eslint.config.js 🚀 Feature: Better use tseslint.config extends and otherwise simplify eslint.config.js Nov 25, 2024
JoshuaKGoldberg added a commit that referenced this issue Nov 25, 2024
…1697)

## PR Checklist

- [x] Addresses an existing open issue: fixes #1690
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

Applies the changes in the issue. This brings the file line count
-including comments- from 166 to 140.

Removes the `files: ["**/*.md/*.ts"],` from this repo's
`eslint.config.js` because there's no `ts` codeblock in the README.md.

Updates the `typescript-eslint` package by necessity for the
`defaultProject` default.

💖
Copy link

🎉 This is included in version v1.74.0 🎉

The release is available on:

Cheers! 📦🚀

JoshuaKGoldberg added a commit that referenced this issue Nov 26, 2024
<!-- 👋 Hi, thanks for sending a PR to create-typescript-app! 💖.
Please fill out all fields below and make sure each item is true and [x]
checked.
Otherwise we may not be able to review your PR. -->

## PR Checklist

- [x] Addresses an existing open issue: fixes #1690 (continues, really)
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

I'd left in this bit by accident.

💖
Copy link

🎉 This is included in version v1.74.1 🎉

The release is available on:

Cheers! 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment