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

chore(eslint): restore header rule #4619

Merged
merged 3 commits into from
Oct 8, 2024
Merged

chore(eslint): restore header rule #4619

merged 3 commits into from
Oct 8, 2024

Conversation

wjhsf
Copy link
Contributor

@wjhsf wjhsf commented Oct 8, 2024

Details

When doing the refactor in #4618, I noticed that the header/header rule was not being enforced. Turns out we removed it in #4378, because of Stuk/eslint-plugin-header#57. However, there's a simple workaround, so this PR restores the rule.

Does this pull request introduce a breaking change?

  • 😮‍💨 No, it does not introduce a breaking change.
  • 💔 Yes, it does introduce a breaking change.

Does this pull request introduce an observable change?

  • 🤞 No, it does not introduce an observable change.
  • 🔬 Yes, it does include an observable change.

GUS work item

@wjhsf wjhsf requested a review from a team as a code owner October 8, 2024 16:21
},
],

// Rules without config, sorted alphabetically by namespace, then rule
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't like how these rules were sorted before, so I fixed it.

@@ -70,8 +89,47 @@ export default tseslint.config(
'no-iterator': 'error',
'no-lone-blocks': 'error',
'no-proto': 'error',
'no-new-require': 'error',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Astute observers may note that this rule has been removed because it's deprecated. It's a pattern we're unlikely to use in modern code, so it's not really worth switching to the replacement.

@wjhsf wjhsf merged commit 79a60a4 into master Oct 8, 2024
11 checks passed
@wjhsf wjhsf deleted the wjh/eslint-header branch October 8, 2024 17:56
package: readJsonSync(join(path, 'package.json')),
}));
export const PRIVATE_PACKAGES = ALL_PACKAGES.filter((data) => data.package.private);
export const PUBLIC_PACKAGES = ALL_PACKAGES.filter((data) => !data.package.private);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Incidentally this file is missing a header. Maybe because it's .mjs?

Copy link
Collaborator

Choose a reason for hiding this comment

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

n/m – not published, so not necessary.

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.

3 participants