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

fix: normalized eslint.config.js ordering and trimming #1723

Merged
merged 7 commits into from
Dec 3, 2024

Conversation

JoshuaKGoldberg
Copy link
Owner

@JoshuaKGoldberg JoshuaKGoldberg commented Dec 3, 2024

PR Checklist

Overview

Applies the standard ordering prototyped in #1670. That is, the flat config array elements are in the following order:

  1. Necessary metadata: first ignores (now sorted), then linterOptions
  2. Straightforward preset properties, in alphabetical order
  3. Object literals, in alphabetical order of files

💖

{
extends: [vitest.configs.recommended],
files: ["**/*.test.*"],
rules: {
// These on-by-default rules aren't useful in test files.
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed intentionally. I don't think it was worth the space. This block is clearly for test files, and this list isn't something any project of mine has reasonably added to IIRC.

"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Very happy that this has since been made unnecessary. I haven't looked deeply, but I'm betting some improvement to Vitest types changed an any to something more precise.

For no-unsafe-assignment, it's down to two any types in Vitest. Filed: vitest-dev/vitest#7015

@JoshuaKGoldberg JoshuaKGoldberg changed the title fix: normalized eslint.config.js ordering fix: normalized eslint.config.js ordering and trimming Dec 3, 2024
@JoshuaKGoldberg JoshuaKGoldberg merged commit b10aa13 into main Dec 3, 2024
16 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the normalized-eslint-config branch December 3, 2024 18:57
Copy link

🎉 This is included in version v1.77.0 🎉

The release is available on:

Cheers! 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Bug: Normalize ordering and printing of ESLint options and extensions
1 participant